R. David Murray added the comment:

No, the point is to do "best practical" error recovery when faced with dirty 
data that may be dirty in various ways, and it doesn't really matter whether it 
is http headers or email headers.  A line with leading whitespace is treated as 
part of the preceding header line now, and this is the way it should behave, 
since the older http standards adopted that behavior from rfc822.  You will 
note that the standard referenced by Ian is explicit about that, in the 
obs-fold clause.  That is, we are required by the standard to support that 
behavior, which is why I posit that the best recovery is to assume an invalid 
line followed by what look like headers is in fact an incorrectly folded 
obs-fold continuation line.  That this will also conform to the email standard 
is a not-accidental consequence of how these standards evolved.  (That is, 
email and http header handling are *not* "different" specs in the sense of 
being disjoint, they are derivatives of a common ancestor spec and some effort 
is
  spent keeping them interoperable, to my understanding.)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24363>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to