News for hackers. Stuff that matters.
Re:Althttpd: Simple webserver in a single C file by kijin on Tuesday June 08, 2021 @04:59AM (#27432066)
HTTP is serious about backward compatibility, so a client that speaks HTTP/1.1 (or HTTP/1.0 + Host header) can still talk to most servers out there.

Similarly, if you write a server that only speaks HTTP/1.1 (or HTTP/1.0 + Host header), you can put it behind a reverse proxy or load balancer that handles higher versions, does connection management, and terminates TLS. It will work perfectly fine, only without some of the latest performance optimizations that you might or might not even need.

Re:Althttpd: Simple webserver in a single C file by chippiewill on Tuesday June 08, 2021 @05:40AM (#27432277)
> you can put it behind a reverse proxy or load balancer that handles higher versions, does connection management, and terminates TLS

This is even standard practice in many production deployments. Typically you want the proxy or load balancer anyway and there's often little benefit (if any) to using HTTP/2 or HTTP/3 over a very low-latency, high reliability local network.

Re:Althttpd: Simple webserver in a single C file by bawolff on Tuesday June 08, 2021 @05:22AM (#27432173)
That seems like a high risk of http desync attacks, if you're only implementing a subset of http/1.1.
Re:Althttpd: Simple webserver in a single C file by unixhero on Tuesday June 08, 2021 @05:41AM (#27432283)
How would one attack a static page?
Re:Althttpd: Simple webserver in a single C file by bawolff on Tuesday June 08, 2021 @11:15AM (#27436290)
Who said anything about static? This webserver supports cgi, which means it supports php, perl, etc.

However even if it didn't, js based client-side apps are probably still attackable in the right set of circumstances.

Re:Althttpd: Simple webserver in a single C file by ric2b on Tuesday June 08, 2021 @06:47AM (#27433233)
Why would you even need a reverse proxy for a static page? This isn't about that.
Re:Althttpd: Simple webserver in a single C file by unixhero on Tuesday June 08, 2021 @07:35AM (#27433746)
I see. Thanks!