Home | History | Annotate | Download | only in url

Lines Matching refs:Path

100 			// meaning to individual path segments. This package
101 // only manipulates the path as a whole, so we allow those
235 // scheme://[userinfo@]host/path[?query][#fragment]
241 // Note that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.
242 // A consequence is that it is impossible to tell which slashes in the Path were
244 // but when it is, code must not use Path directly.
246 // Go 1.5 introduced the RawPath field to hold the encoded form of Path.
247 // The Parse function sets both Path and RawPath in the URL it returns,
248 // and URL's String method uses RawPath if it is a valid encoding of Path,
253 // construct a URL struct directly and set the Opaque field instead of Path.
260 Path string
261 RawPath string // encoded path hint (Go 1.5 and later only; see EscapedPath method)
316 // Maybe rawurl is of the form scheme:path.
318 // If so, return scheme, path; else return "", rawurl.
319 func getscheme(rawurl string) (scheme, path string, err error) {
376 // only as an absolute URI or an absolute path.
385 // in which case only absolute URLs or path-absolute relative URLs are allowed.
397 url.Path = "*"
430 if url.Path, err = unescape(rest, encodePath); err != nil {
433 // RawPath is a hint as to the encoding of Path to use
527 // EscapedPath returns the escaped form of u.Path.
528 // In general there are multiple possible escaped forms of any path.
529 // EscapedPath returns u.RawPath when it is a valid escaping of u.Path.
539 if err == nil && p == u.Path {
543 if u.Path == "*" {
546 return escape(u.Path, encodePath)
549 // validEncodedPath reports whether s is a valid encoded path.
550 // It must not contain any bytes that require escaping during path encoding.
595 // scheme://userinfo@host/path?query#fragment
599 // To obtain the path, String uses u.EncodedPath().
607 // - if u.Host is non-empty and u.Path begins with a /,
608 // the form host/path does not add its own /.
630 path := u.EscapedPath()
631 if path != "" && path[0] != '/' && u.Host != "" {
634 buf.WriteString(path)
756 // resolvePath applies special path segments from refs and applies
786 // Add final slash to the joined path.
821 url.Path = resolvePath(ref.Path, "")
827 url.Path = ""
830 if ref.Path == "" {
841 url.Path = resolvePath(u.Path, ref.Path)
851 // RequestURI returns the encoded path?query or opaque?query