Demian Brecht added the comment:

After a chat with David and getting my head wrapped more around backwards 
compatibility, I also agree that the changes in the patch are far too strict. 
It's much more important to preserve backwards compatibility than to strictly 
conform to the RFC.

I've updated the patch to allow for (what should be) anything that was 
previously allowed as header name/value pairs minus carriage returns not 
immediately followed by a tab or space (obs-fold: CRLF 1*( SP / HTAB )). This 
change fixes the reported issue but should not otherwise affect backwards 
compatibility.

Additionally, even though line folding is deprecated by RFC 7230, I don't think 
it's necessarily an issue to support line folding until proven to be a problem 
in practice. With the current implementation, users have the ability to conform 
to the target server/proxy requirements, based on errors (if obs-fold isn't 
transparently dealt with as suggested) yielded by each as defined in the RFC. 
In light of that, I don't think that it's even worthwhile to start deprecating 
multi-parameter putheader at this point (but I'm open to argument on that one).

One note on the deprecation is that if we deprecate multi-parameter, we should 
also add a warning if an embedded line fold is detected in a single headers 
value.

----------
Added file: http://bugs.python.org/file38399/issue22928_4.patch

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

Reply via email to