From 2bb8c5d5cc2c8c3635b0a84d895f1954ff378b54 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Wed, 23 Oct 2013 10:48:17 -0500 Subject: [PATCH] Bring back default redirect for profiling. Now that the RPC server uses its own mux, bring back the code which does the automatic 303 redirect for the root of the profile server. --- btcd.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/btcd.go b/btcd.go index f119f93e..7c3bb375 100644 --- a/btcd.go +++ b/btcd.go @@ -48,6 +48,9 @@ func btcdMain() error { go func() { listenAddr := net.JoinHostPort("", cfg.Profile) log.Infof("Profile server listening on %s", listenAddr) + profileRedirect := http.RedirectHandler("/debug/pprof", + http.StatusSeeOther) + http.Handle("/", profileRedirect) log.Errorf("%v", http.ListenAndServe(listenAddr, nil)) }() }