News for hackers. Stuff that matters.
Re:HTTP 2.0: GTFO (General Termination of Future Operations) by ynik on Monday January 27, 2014 @11:00AM (#7130975)
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!

Re:HTTP 2.0: GTFO (General Termination of Future Operations) by pwg on Monday January 27, 2014 @11:59AM (#7131424)
> 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

Re:HTTP 2.0: GTFO (General Termination of Future Operations) by wmf on Monday January 27, 2014 @02:38PM (#7132606)
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.