3 ms·
This is a common issue with text based formats and ietf/RFCs. HTTP allows comments in some headers. And allows line breaks: H: hi Mom Is the same as
by MichaelGG 9y ago
This is a common issue with text based formats and ietf/RFCs. HTTP allows comments in some headers. And allows line breaks:
H: hi
Mom
Is the same as
H: hi Mom
Bets on how many http clients and servers get this right? Without losing speed?
My guess is when you're not responsible for ensuring compatibility or having to deal with writing robust, fast, code, the temptation to be cute with your format overtakes things.
- loeg 9y agoI expect all commonly used HTTP clients (Chrome, Firefox, IE, even libcurl) and servers (Apache, Nginx, does IIS still exist?) get this right.
- MichaelGG 9y agoI, too, would expect that the most common pieces of software with massive amounts of engineering time invested get it right (but almost certainly with a performance hit). But I'd be unsurprised to find that one doesn't handle the http parsing spec correctly somewhere. The issue is that such a spec is entirely unneeded and overly complicated. No benefit, only downsides. And for something as simple as basic parsing rules! Not even getting into anything that should be difficult.