]> Cypherpunks repositories - gostls13.git/commitdiff
net/http/pprof: Use relative links to profiles in index html
authorMatt Joiner <anacrolix@gmail.com>
Wed, 11 Mar 2015 06:52:57 +0000 (17:52 +1100)
committerAndrew Gerrand <adg@golang.org>
Thu, 12 Mar 2015 01:13:26 +0000 (01:13 +0000)
This allows /debug/pprof/ and descendents to be used through
http.StripPrefix and other path rewriting handlers.

Change-Id: I53673876c107bbfaf430123ead78e6524b42ac21
Reviewed-on: https://go-review.googlesource.com/7351
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/net/http/pprof/pprof.go

index f5a352da41cf123ed9b29c5c82095fbf2c479a17..61ac67f3b18f57ad5d86e644725d2a4310760c97 100644 (file)
@@ -228,11 +228,11 @@ var indexTmpl = template.Must(template.New("index").Parse(`<html>
 profiles:<br>
 <table>
 {{range .}}
-<tr><td align=right>{{.Count}}<td><a href="/debug/pprof/{{.Name}}?debug=1">{{.Name}}</a>
+<tr><td align=right>{{.Count}}<td><a href="{{.Name}}?debug=1">{{.Name}}</a>
 {{end}}
 </table>
 <br>
-<a href="/debug/pprof/goroutine?debug=2">full goroutine stack dump</a><br>
+<a href="goroutine?debug=2">full goroutine stack dump</a><br>
 </body>
 </html>
 `))