Skip to content

Comment on HTTP 2.0: GTFO (General Termination of Future Operations)parent

Comments

Let's not pretend that HTTP 1.1 was simple. Text formats break down whenever they need to contain arbitrary (possible non-text) data.

You get one of:

* complex escaping rules (and assorted inefficiencies)

* non-text portions embedded within the text protocol (ever tried to parse HTTP with a Java InputStreamReader? you can't properly switch back to binary mode at the end of the headers...)

* variable end-of-content markers that cannot occur in the content

Of course, HTTP 1.x uses ALL of the above (see possible values for Transfer-Encoding). It's a horribly complicated mess that is only surpassed by MIME email.

Binary protocols usually just specify the length of the data, followed by a binary blob with the data. MUCH simpler!

Binary protocols usually just specify the length of the data, followed by a binary blob with the data. MUCH simpler!

It is possible to have the same simplicity with a textual protocol, it is just that most text protocol designers don't bother with explicit prefixed lengths:

For example, see: http://cr.yp.to/proto/netstrings.txt

When people say "text protocol" I think they really mean "something I can type into telnet"; stuff like netstrings and BEEP don't really count.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.