Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'argument': 0.04; 'python': 0.09; 'absent': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'terry': 0.09; 'subject:not': 0.11; 'bug,': 0.16; 'handling.': 0.16; 'inclined': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'simpson': 0.16; 'subject:case': 0.16; 'string': 0.17; 'wrote:': 0.17; 'headers': 0.17; 'skip:u 30': 0.17; 'examples': 0.18; 'jan': 0.18; 'appears': 0.18; 'doc': 0.22; "i'd": 0.22; 'header': 0.24; 'url:bugs': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'am,': 0.27; 'header:X-Complaints-To:1': 0.28; 'noticed': 0.28; 'usually': 0.30; 'url:python': 0.32; 'not.': 0.32; 'to:addr:python-list': 0.33; 'consistent': 0.35; 'pm,': 0.35; 'received:org': 0.36; 'but': 0.36; 'url:org': 0.36; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'subject:-': 0.40; 'header:Received:5': 0.40; 'skip:n 10': 0.63; 'more': 0.63; 'behavior': 0.64; 'received:fios.verizon.net': 0.84; 'sensitivity': 0.84; 'subject:updated': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Bugs: Content-Length not updated by reused urllib.request.Request / has_header() case-sensitive Date: Mon, 12 Nov 2012 20:41:36 -0500 References: <20121112225907.GA6983@cskk.homeip.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-251-66.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 In-Reply-To: <20121112225907.GA6983@cskk.homeip.net> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1352770923 news.xs4all.nl 6934 [2001:888:2000:d::a6]:58599 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:33211 On 11/12/2012 5:59 PM, Cameron Simpson wrote: > On 12Nov2012 16:35, Terry Reedy 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