Skip to content

Commit

Permalink
chore: update status code 302 to 307 in /debug/pprof
Browse files Browse the repository at this point in the history
  • Loading branch information
chengshiwen committed Sep 29, 2024
1 parent cca9019 commit 01cb2f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion services/httpd/pprof.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (h *Handler) handleProfiles(w http.ResponseWriter, r *http.Request) {
case "/debug/pprof":
// Redirect to /debug/pprof/ to avoid jumping to a blank page
// after clicking the links on the /debug/pprof webpage.
http.Redirect(w, r, "/debug/pprof/", http.StatusFound)
http.Redirect(w, r, "/debug/pprof/", http.StatusTemporaryRedirect)
default:
httppprof.Index(w, r)
}
Expand Down
2 changes: 1 addition & 1 deletion services/meta/pprof.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (h *handler) handleProfiles(w http.ResponseWriter, r *http.Request) {
case "/debug/pprof":
// Redirect to /debug/pprof/ to avoid jumping to a blank page
// after clicking the links on the /debug/pprof webpage.
http.Redirect(w, r, "/debug/pprof/", http.StatusFound)
http.Redirect(w, r, "/debug/pprof/", http.StatusTemporaryRedirect)
default:
httppprof.Index(w, r)
}
Expand Down

0 comments on commit 01cb2f3

Please sign in to comment.