mirror of
https://github.com/golang/go
synced 2024-11-12 09:50:21 -07:00
net/url: fix URL Opaque notes on making client requests
Fixes #4860 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7375047
This commit is contained in:
parent
782cbb4f90
commit
0462aad9a4
@ -225,7 +225,8 @@ func escape(s string, mode encoding) string {
|
|||||||
// slashes in the raw URL and which were %2f. This distinction is rarely important,
|
// slashes in the raw URL and which were %2f. This distinction is rarely important,
|
||||||
// but when it is a client must use other routines to parse the raw URL or construct
|
// but when it is a client must use other routines to parse the raw URL or construct
|
||||||
// the parsed URL. For example, an HTTP server can consult req.RequestURI, and
|
// the parsed URL. For example, an HTTP server can consult req.RequestURI, and
|
||||||
// an HTTP client can use URL{Opaque: "/Go%2f"} instead of URL{Path: "/Go/"}.
|
// an HTTP client can use URL{Host: "example.com", Opaque: "//example.com/Go%2f"}
|
||||||
|
// instead of URL{Host: "example.com", Path: "/Go/"}.
|
||||||
type URL struct {
|
type URL struct {
|
||||||
Scheme string
|
Scheme string
|
||||||
Opaque string // encoded opaque data
|
Opaque string // encoded opaque data
|
||||||
|
Loading…
Reference in New Issue
Block a user