News for hackers. Stuff that matters.
Re:Show HN: Micro HTTP server in 22 lines of C by a-dub on Saturday July 31, 2021 @12:44PM (#28019693)
for the basics, however http/1.x is pretty simple. you can test webserver health by literally typing in the request.

i suspect the complexity you speak of is similar to MIME. where SMTP/POP/IMAP are pretty simple, things got pretty hairy with the introduction of MIME, SASL and friends.

i think, though, that most of the complicated stuff in http is optional, is it not? like if you don't send a header that compression is supported, the server won't compress... or am I misremembering?

either way, simpler to understand from a packet capture than a grpc stream or spdy/http2 stream.

Re:Show HN: Micro HTTP server in 22 lines of C by jart on Saturday July 31, 2021 @03:04PM (#28020761)
Pretty much everything is optional if you stick to http/1.0. If you implement http/1.1 then you're required to do a lot of non-essential stuff like chunk encoding, pipelining, and provisionals which themselves are reasonably trivial too but they make the server code less elegant. If you want a protocol that's actually hard, implement SIP.
Re:Show HN: Micro HTTP server in 22 lines of C by jsjohnst on Saturday July 31, 2021 @02:29PM (#28020519)
I once heard that it’s impossible to build a “spec compliant” IMAP4 library as the spec itself is contradictory. Don’t have a reference to prove it, so I could be wrong.