Added check for httprof_path

This commit is contained in:
Trial97
2019-02-25 16:59:33 +02:00
committed by Dan Christian Bogos
parent 491be710d5
commit 7f98299b73

View File

@@ -203,6 +203,9 @@ func handleRequest(w http.ResponseWriter, r *http.Request) {
}
func (s *Server) RegisterProfiler(addr string) {
if addr[len(addr)-1] != '/' {
addr = addr + "/"
}
s.httpMux.HandleFunc(addr, pprof.Index)
s.httpMux.HandleFunc(addr+"cmdline", pprof.Cmdline)
s.httpMux.HandleFunc(addr+"profile", pprof.Profile)