Message232384
This is actually more complicated than I initially thought.
According to https://www.python.org/dev/peps/pep-3333/#the-start-response-callable
"Each header_value must not include any control characters, including carriage returns or linefeeds, either embedded or at the end. (These requirements are to minimize the complexity of any parsing that must be performed by servers, gateways, and intermediate response processors that need to inspect or modify response headers.) "
There's a discussion at https://mail.python.org/pipermail/web-sig/2006-September/002244.html
It think the spec should be changed as parsing multi-line headers is really simple and sometimes necessary (e.g., when passing the X.509 client certificate).
Anyway, attached you find a patch for Python 2.7.8 which includes a test and allows CR/LF in header values. |
|
Date |
User |
Action |
Args |
2014-12-09 15:58:22 | tanner | set | recipients:
+ tanner, pje, pitrou, serhiy.storchaka, Alan.Braithwaite |
2014-12-09 15:58:22 | tanner | set | messageid: <1418140702.32.0.156256649738.issue21114@psf.upfronthosting.co.za> |
2014-12-09 15:58:22 | tanner | link | issue21114 messages |
2014-12-09 15:58:22 | tanner | create | |
|