2 ms·
Hm, but I think he's right. The problem comes when you try to break down the authority portion into host and port; TFA's parser treats the first colon as introd
by quuxplusone 2mo ago
Hm, but I think he's right. The problem comes when you try to break down the authority portion into host and port; TFA's parser treats the first colon as introducing the port, which is wrong.
https://github.com/bkaradzic/bx/blob/0b001f5f36579e8aea07efa5af139ca18dad9505/src/url.cpp#L48-L123 https://github.com/bkaradzic/bx/blob/0b001f5f36579e8aea07efa...
- meindnoch 2mo ago>The problem comes when you try to break down the authority portion into host and port That's a problem orthogonal to URI parsing. You parse the URI with the RFC 3986 regex, which gives you the components: scheme, authority, path, query, fragment. You're then free to parse any of the components according to your own bespoke rules, e.g. the query string often follows the key=value&key=value&... pattern.