From 01cb2f32142031567239e2bd840a46653f32375d Mon Sep 17 00:00:00 2001 From: chengshiwen Date: Sun, 29 Sep 2024 14:49:31 +0800 Subject: [PATCH] chore: update status code 302 to 307 in /debug/pprof --- services/httpd/pprof.go | 2 +- services/meta/pprof.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/httpd/pprof.go b/services/httpd/pprof.go index 744ce1c..b7335f2 100644 --- a/services/httpd/pprof.go +++ b/services/httpd/pprof.go @@ -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) } diff --git a/services/meta/pprof.go b/services/meta/pprof.go index d4f677b..d8a9088 100644 --- a/services/meta/pprof.go +++ b/services/meta/pprof.go @@ -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) }