Skip to content

Commit 0462aad

Browse files
committed
net/url: fix URL Opaque notes on making client requests
Fixes #4860 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7375047
1 parent 782cbb4 commit 0462aad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pkg/net/url/url.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ func escape(s string, mode encoding) string {
225225
// slashes in the raw URL and which were %2f. This distinction is rarely important,
226226
// but when it is a client must use other routines to parse the raw URL or construct
227227
// the parsed URL. For example, an HTTP server can consult req.RequestURI, and
228-
// an HTTP client can use URL{Opaque: "/Go%2f"} instead of URL{Path: "/Go/"}.
228+
// an HTTP client can use URL{Host: "example.com", Opaque: "//example.com/Go%2f"}
229+
// instead of URL{Host: "example.com", Path: "/Go/"}.
229230
type URL struct {
230231
Scheme string
231232
Opaque string // encoded opaque data

0 commit comments

Comments
 (0)