Join GitHub today
ISO-8859-1 encoded http headers #1102
gunicorn uses utf8 encoding for http response headers. I don't know
The tests don't pass.
Also reading the new RFC 7230:
Not sure how to handle opaque data there. Also including such change we should also test if it works with some value given as unicode (which happen sometime in some countries...). Maybe we should have more tests there. Ideally we shouldn't transform anything there.
Of course, according to the WSGI spec, that's not supposed to happen in Python 2. Headers are specified to be given as the "native string type", so they should already be bytes and applications that send
So either case will enter implementation-defined behaviour and not be interoperable.