rugk added the comment:
Yeah, it might not be the standard or best practise to send such headers, but
at least all mayor browsers and curl do not complain about this. Mayor browsers
even threat this HPKP header as it is supposed.
But instead of showing complex error messages Python could just
Martin Panter added the comment:
HTTP header fields are not supposed to have line breaks unless followed by a
space or tab. So the server is actually providing a faulty response.
However Python could do better at handling this case. There is already a bug
open for this: Issue 24363.
For the r
New submission from rugk:
Test file: https://gist.github.com/rugk/3ea35d04d66c2295e02d0b6cb6d822a2
Python version: 2.7.5+
Issue description: When Urllib gets a HTTP header with line breaks/new line
characters it shows the following error:
```
Traceback (most recent call last):
File "./downlo