Hacker News new | ask | show | jobs
by kmike84 2839 days ago
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.

2 comments

> 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/

I've touched on a few URL parsing issues lately. Valid UTF-8 code points depending on TLD and determining the user level of the host e.g. 3rd level for co.uk seem to require gathering a bunch of disparate sources and making a best guess.

I agree it's a large task, and it'll be interesting to see the scope of libcurl's API for it.