Skip to content

Commit

Permalink
net/url: fix mentions of URL.EscapedPath method
Browse files Browse the repository at this point in the history
Fixes golang#12862.

Change-Id: I6921ae31bd5515f344fd97d08eafc317228b98a0
Reviewed-on: https://go-review.googlesource.com/15590
Reviewed-by: Andrew Gerrand <[email protected]>
  • Loading branch information
minux committed Oct 23, 2015
1 parent 9238cbd commit 9b6069b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/net/url/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func escape(s string, mode encoding) string {
// Go 1.5 introduced the RawPath field to hold the encoded form of Path.
// The Parse function sets both Path and RawPath in the URL it returns,
// and URL's String method uses RawPath if it is a valid encoding of Path,
// by calling the EncodedPath method.
// by calling the EscapedPath method.
//
// In earlier versions of Go, the more indirect workarounds were that an
// HTTP server could consult req.RequestURI and an HTTP client could
Expand Down Expand Up @@ -449,7 +449,7 @@ func parse(rawurl string, viaRequest bool) (url *URL, err error) {
goto Error
}
// RawPath is a hint as to the encoding of Path to use
// in url.EncodedPath. If that method already gets the
// in url.EscapedPath. If that method already gets the
// right answer without RawPath, leave it empty.
// This will help make sure that people don't rely on it in general.
if url.EscapedPath() != rest && validEncodedPath(rest) {
Expand Down Expand Up @@ -614,7 +614,7 @@ func validOptionalPort(port string) bool {
//
// If u.Opaque is non-empty, String uses the first form;
// otherwise it uses the second form.
// To obtain the path, String uses u.EncodedPath().
// To obtain the path, String uses u.EscapedPath().
//
// In the second form, the following rules apply:
// - if u.Scheme is empty, scheme: is omitted.
Expand Down

0 comments on commit 9b6069b

Please sign in to comment.