On Mon, 2007-04-30 at 11:41 +0000, rm@tuxteam.de wrote:
Hmm - IIRC that was causing the problems in Java way back ... imagine the sequence "blah blah<cr>" (some network delay "<lf>blub more bah". And then there is "<cr><cr><lf>" (which i've seen at least once!). Is this one or two or even three newlines. Iff your answer is > 1 than you might start reading header lines as content ....
It would be 2 here, and would quite possibly leave headers unconsumed, which is in error. The current behaviour is definitely preferred for this case (signalling an error) but my feeling is that this behaviour, while quite acceptable in this example, is not the best for all cases (news.ycombinator.com for example).
In the same vein the approach I've suggested is definitely not the best for all cases, merely a method to workaround servers that do not honour RFC 2616[1].
Cheers, Sean.
[1] Granted this is done by ascribing semantics to single CR's and LF's in an essentially ad hoc manner.