[Patches] [ python-Patches-1542948 ] urllib2 regression

SourceForge.net noreply at sourceforge.net
Sat Aug 19 07:35:41 CEST 2006


Patches item #1542948, was opened at 2006-08-18 18:48
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1542948&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: John J Lee (jjlee)
Assigned to: Nobody/Anonymous (nobody)
Summary: urllib2 regression

Initial Comment:
Patch 1459963 (applied in 50842) needlessly breaks the
old (albeit undocumented) interface of direct access to
request.headers (which existed prior to the
introduction of method.  That patch changes the case of
the keys of the request.headers dictionary.  That seems
guaranteed to break existing code.

The attached patch reverts 50842's changes to urllib2
(it does not revert the changes to urllib) and fixes
the reported issue with a one-line fix in
AbstractHTTPHandler (.title()-case the HTTP headers
before sending them to httplib).  That fix is also more
localised to HTTP -- urllib2 knows about other
protocols too.  This patch also corrects a mis-wording
in Misc/NEWS: the old case convention was not strictly
incorrect (according to RFC 2616), but just did not
follow the usual title-case convention.

If the original patch was applied to the 2.4
maintenance branch, I guess this patch should be
applied there too.


----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2006-08-18 22:35

Message:
Logged In: YES 
user_id=33168

I would like to see additional tests to ensure something
like this doesn't happen again.

----------------------------------------------------------------------

Comment By: John J Lee (jjlee)
Date: 2006-08-18 18:50

Message:
Logged In: YES 
user_id=261020

s/(which existed prior to the introduction of method/(which
existed prior to the introduction of the .get_header() &c.
methods)/


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1542948&group_id=5470


More information about the Patches mailing list