Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #33211
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: Bugs: Content-Length not updated by reused urllib.request.Request / has_header() case-sensitive |
| Date | 2012-11-12 20:41 -0500 |
| References | <k7rq3f$d6e$1@ger.gmane.org> <20121112225907.GA6983@cskk.homeip.net> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3602.1352770923.27098.python-list@python.org> (permalink) |
On 11/12/2012 5:59 PM, Cameron Simpson wrote: > On 12Nov2012 16:35, Terry Reedy <tjreedy@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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Bugs: Content-Length not updated by reused urllib.request.Request / has_header() case-sensitive Terry Reedy <tjreedy@udel.edu> - 2012-11-12 20:41 -0500
csiph-web