]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: fix reference to URL.RawPath in docs
authorBjorn Tipling <bjorn.tipling@gmail.com>
Sat, 11 Feb 2012 00:39:57 +0000 (22:39 -0200)
committerGustavo Niemeyer <gustavo@niemeyer.net>
Sat, 11 Feb 2012 00:39:57 +0000 (22:39 -0200)
R=go.peter.90, n13m3y3r, gustavo
CC=golang-dev
https://golang.org/cl/5655053

src/pkg/net/http/doc.go

index 652d729e0844833ce2d729eb0cd9dd6a7e01b291..b6ae8b87a2f0de952d44198eedc3c4a370c2d040 100644 (file)
@@ -60,7 +60,7 @@ Handle and HandleFunc add handlers to DefaultServeMux:
        http.Handle("/foo", fooHandler)
 
        http.HandleFunc("/bar", func(w http.ResponseWriter, r *http.Request) {
-               fmt.Fprintf(w, "Hello, %q", html.EscapeString(r.URL.RawPath))
+               fmt.Fprintf(w, "Hello, %q", html.EscapeString(r.URL.Path))
        })
 
        log.Fatal(http.ListenAndServe(":8080", nil))