Documentation
¶
Overview ¶
Package weburl holds what mimicry shares about URLs as browsers send them (the WHATWG URL standard, as the urls capture measures it): the percent-encode sets every browser measured applies, and a URL's path serialized as mimicry's canonical form leaves it, where Go's own (url.URL.EscapedPath) would encode characters a browser sends as they are ('|' for Firefox and Safari).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InPathSet ¶
InPathSet reports whether c is in the path percent-encode set as every browser measured applies it: the query set, '?', '^', '`', '{' and '}'. A browser may encode more (profile.URLs.PathEncodes: '|' for Chrome).
func InQuerySet ¶
InQuerySet reports whether c is in the URL standard's query percent-encode set: C0 controls, space, '"', '#', '<', '>' and every byte above '~'.
func OpaquePath ¶
OpaquePath is the path an http(s) URL's Opaque names, as net/http and x/net/http2 read it: "/raw/path" itself, "//host/raw/path" without its authority ("/" for none).
func Path ¶
Path is u's path as sent: with Opaque, the caller's own (OpaquePath); else RawPath when set (mimicry's canonical form sets it to what the browser sends), else Go's EscapedPath; "/" for none.
func PercentEncode ¶
PercentEncode percent-encodes the bytes of s that in reports, keeping every other byte (a % included) as it is.
func RequestURI ¶
RequestURI is u's request target in origin form: Path, then the query.
Types ¶
This section is empty.