On 11/12/2012 5:59 PM, Cameron Simpson wrote:
On 12Nov2012 16:35, Terry Reedy <tjre...@udel.edu> wrote:
| On 11/12/2012 10:52 AM, Johannes Kleese wrote:
| > While at it, I noticed that urllib.request.Request.has_header() and
| > .get_header() are case-sensitive,
|
| Python is case sensitive.

To be more precise, Python string comparisons are by codepoints. If one wants normalized comparison, one usually has to do do the normalization oneself.

But headers are not. I'd be very inclined to consider case sensitivity
in has_header and get_header to be a bug, absent a compelling argument
against it.

It appears that the behavior is not consistent with doc examples and other header name handling. I added a note to
http://bugs.python.org/issue12455

--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to