News for hackers. Stuff that matters.
Re:“I Could Rewrite Curl” by flohofwoe on Thursday May 20, 2021 @09:13AM (#27220671)
Yeah, very easy to write an HTTP client on top of Berkley sockets. Until chunked responses come into play, and HTTPS, and HTTP/2, and HTTP/3...

(this is actually something I'm very worried about, it used to be easy to cobble together a very basic HTTP client, not anymore with the new HTTP protocol versions, and all the bells and whistles).

Re:“I Could Rewrite Curl” by ricardo81 on Thursday May 20, 2021 @09:28AM (#27220842)
And of course, CURL deals with multiple protocols as the OP mentioned. I've used libcurl for sending emails and FTP but mainly for HTTP.

Using the multi interface it's relatively trivial (a few hundred lines of C) to fetch using hundreds or thousands of concurrent connections. There's even some courtesy opts for rate limiting per host.

It's so good he/they built c-ares for asynchronous DNS lookups, IIRC something that wasn't so readily available in years gone by.

Re:“I Could Rewrite Curl” by parhamn on Thursday May 20, 2021 @09:19AM (#27220736)
Agreed. They're harder to debug, MITM, trace, etc.

As a silver lining: I have been less worried recently seeing that most of the adoption of http/2-3 (at least their odd features) have been at the edge. Most developers are still writing http/1 endpoints and leaving the edge to optionally up-convert them for transport efficiency.