[Patches] [ python-Patches-1668132 ] Fix for 767111, 'AttributeError thrown by urllib.open_http'
SourceForge.net
noreply at sourceforge.net
Sun Feb 25 01:53:42 CET 2007
Patches item #1668132, was opened at 2007-02-25 00:53
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1668132&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
Private: No
Submitted By: Atul Varma (varmaa)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix for 767111, 'AttributeError thrown by urllib.open_http'
Initial Comment:
This is a fix for bug 767111:
http://sourceforge.net/tracker/index.php?func=detail&aid=767111&group_id=5470&atid=105470
I am also attaching a unit test that reliably reproduces the bug using an in-process web server.
I didn't want to modify httplib because it would mean altering its interface such that the HTTP.getfile() method would never return None, and that could break existing code. So instead I modified urllib at a point that it appears to assume that HTTP.getfile() will always return a file object. I hope this is a reasonable place to fix the problem, and I don't think it can break any existing code. I also ran the existing "test/test_urllib.py" and "test/test_urllibnet.py" test suites and they both work fine with this patch.
Looking at the code, I also believe that a "parallel bug" exists with urllib.open_https(), and I fixed that as well (though I don't have a unit test to prove this).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1668132&group_id=5470
More information about the Patches
mailing list