News for hackers. Stuff that matters.
Re:Let’s Build a Web Server, Part 3 by falcolas on Monday August 03, 2015 @10:48AM (#9996236)
This is actually something that breaks my heart a bit, because this might not work (or be heavily deprecated) at some point in the near future.

If, or when, HTTP/2 is the only protocol available suddenly you can't just return a string with a few newlines and have it mean something. Instead, you have to send a connection preface, then start building and sending frames of data in specific orders with specific binary packing formats.

Length, 24 bits. Type, 8. Flags, 8, an ignored reserved bit, an identifier which must be odd (except when it must be even), padding lengths, and finally a payload (don't forget that padding!)

I know there's value in moving to HTTP/2, but it's yet another stumbling block in the path to understanding how our environments work. The straw hasn't fractured the camel's back yet, but I imagine the camel is wishing it would all just end.

Maybe this tutorial just needs a part 4, how to respond properly to HTTP/2 requests.

There are no comments on this comment yet.