
Libcurl gets a URL API - okket
https://daniel.haxx.se/blog/2018/09/09/libcurl-gets-a-url-api/
======
kmike84
The blog post mentions WHATWG URL spec and RFC 3986 - what is libcurl's URL
parser implementing, what is its goal?

By the way, parsing of URLs is a large-ish task; it'd be nice to have URL API
in a separate library, which libcurl depends on, and which can be used without
libcurl.

~~~
EvilTerran
> what is libcurl's URL parser implementing, what is its goal?

I get the impression the goal would be "parsing whatever users expect to be
able to use as a URL in practice". He's written before about the difficulty of
pinning down "the syntax of URLs":

[https://daniel.haxx.se/blog/2016/05/11/my-url-isnt-your-
url/](https://daniel.haxx.se/blog/2016/05/11/my-url-isnt-your-url/)

------
taf2
This is really excellent, it’s the main thing that curb the ruby binding I
work on never felt right. We used ruby URL for the parsing and as it turns out
it’s slightly less forgiving than libcurls internal parser.

------
EdSchouten
Serious question: what's the value of using this over
[https://uriparser.github.io/](https://uriparser.github.io/) ?

~~~
rpdillon
It will be consistent with the logic used by the codebase that actually
fetches the URL (curl), so it won't leave gaps between the expected behavior
and actual behavior the way two disjoint implementations would.

