3 ms·
Not exactly. The original URI syntax didn't allow several characters including "{|`><}\^ plus whitespaces anywhere; the quoted section of RFC 3986 assumes that
by lifthrasiir 5y ago
Not exactly. The original URI syntax didn't allow several characters including "{|`><}\^ plus whitespaces anywhere; the quoted section of RFC 3986 assumes that the string is already well-formed (thus the regex can't be used for the validation). Even the modern URL Standard has an outright failure [1].
[1] https://url.spec.whatwg.org/#example-url-parsing https://url.spec.whatwg.org/#example-url-parsing
- formerly_proven 5y agoI remember the pains of working on a tool that supported a path (/some/foo or C:\Some\Window), URI-style (ssh://user@host:port//somewhere) and SCP-style (user@host:/somewhere) in the same spot. That was not nice code and it of course had many failure modes.