[Patches] [ python-Patches-490515 ] urllib.open_https() protocol issue
noreply@sourceforge.net
noreply@sourceforge.net
Sat, 08 Dec 2001 09:09:28 -0800
Patches item #490515, was opened at 2001-12-07 19:50
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=490515&group_id=5470
Category: Library (Lib)
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Joe A (joefefifo)
Assigned to: Nobody/Anonymous (nobody)
Summary: urllib.open_https() protocol issue
Initial Comment:
This patch was made for Python version 2.2, using a
daily snapshot, python-20011207.tar.gz.
I'm running Red Hat Linux 7.2.
In urllib.py library module, URLopener.open_https()
returns a class instance of addinfourl() with its
self.url property missing the protocol.
Instead of "https://www.someurl.com", it becomes
"://www.someurl.com".
This happens because the variable "url" used in the
argument of the call to addinfourl() only represents
the part of the url other than the protocol.
In line 376 of urllib.py, instead of:
376: return addinfourl(fp, headers, url)
It should read:
376: return addinfourl(fp, headers, "https:" + url)
You can see that in URLopener.open_http() this is
already the case:
298: return addinfourl(fp, headers, "http:" + url)
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-12-08 09:09
Message:
Logged In: YES
user_id=6380
Thanks! Fixed in CVS rev. 1.135.
What's your full name (for the ACKS file)?
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=490515&group_id=5470