Martin Panter added the comment:

But it is not natural to do things like this (based on headers sent by Firefox):

putheader("User-Agent", "Mozilla/5.0", "(X11;", "Linux", "x86_64;", "rv:25.0)", 
"Gecko/20100101", "Firefox/25.0")
putheader("Accept-Encoding", "gzip,", "deflate")

A way to properly encode different kinds of header values would be nice, but I 
don’t think the current putheader() API is it.

Also, I still think it would be good to allow non-ASCII characters in header 
values. At least when an already-encoded byte string is supplied. For instance, 
RTSP is based on HTTP but uses UTF-8 as a default encoding, rather than HTTP’s 
Latin-1. Otherwise, retaining the one_value.encode('latin-1') call is confusing 
when later on it rejects non-ASCII-encoded characters.

----------

_______________________________________
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