-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Depend on URL parsing library #6183
Comments
I'd love to use a well-tested URL parsing library for C++, providing it meets other quality metrics. The It looks promising, but I also see some warning signs. We'd probably need to devote some time to trying it out and seeing if it meets our quality bar, or whether we'd need to write something from scratch. |
I wonder how much trouble it would be to extract Edit: Never mind, that particular implementation looks very new. But maybe one of the browser projects has something ready-made. |
Does not appear maintained, so not a viable contender (https://github.com/bnoordhuis/uriparser2), but dropping here nonetheless for reference. |
How about http-parser. It has a function called |
Node.js' As far as the scope of this goes: Do we need Punycode parsing/normalization? IPv6 IP support? Auth ( |
Another thing I was worried about is an object-oriented, RFC-compliant URL parsing library would be too heavy for Mapbox GL Native. Benchmarks would also affected. So I would rather suggest to keep it simple. @kkaefer I do not think we need these Punycode staff features until some use cases come out. |
Good here with #7464. |
We’ve had some hairy issues with the code in
mbgl::util::mapbox
that relies on artisanal string parsing to manipulate URL components. For example: #5554 #5723. At one point, it was manageable because we were only manipulating schemes and paths. But increasingly we need to work with query parameters as well (#6182). I guess I’m spoiled by the robustness ofURL
on the Web and NSURL and NSURLComponents on Apple platforms, which provide object-oriented, RFC-compliant URL parsing. Could we makembgl::util::mapbox
depend on a similarly robust, well-tested URL parsing library for C++?/cc @kkaefer @jfirebaugh
The text was updated successfully, but these errors were encountered: