homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: urllib2 regression
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, jjlee, nnorwitz
Priority: normal Keywords: patch

Created on 2006年08月19日 01:48 by jjlee, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
header-case.patch jjlee, 2006年08月19日 01:48
header-case-with-tests.patch jjlee, 2006年08月19日 17:15
Messages (5)
msg50952 - (view) Author: John J Lee (jjlee) Date: 2006年08月19日 01:48
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.
msg50953 - (view) Author: John J Lee (jjlee) Date: 2006年08月19日 01:50
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)/
msg50954 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006年08月19日 05:35
Logged In: YES 
user_id=33168
I would like to see additional tests to ensure something
like this doesn't happen again.
msg50955 - (view) Author: John J Lee (jjlee) Date: 2006年08月19日 17:15
Logged In: YES 
user_id=261020
Quite right, here's a patch with the missing test.
msg50956 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006年08月20日 13:15
Logged In: YES 
user_id=849994
Applied as rev. 51416, 51417 (2.5)
History
Date User Action Args
2022年04月11日 14:56:19adminsetgithub: 43858
2006年08月19日 01:48:11jjleecreate

AltStyle によって変換されたページ (->オリジナル) /