[Python-bugs-list] [Bug #110619] urllib.py fails with username/password proxies (PR#221)

noreply@sourceforge.net noreply@sourceforge.net
Fri, 25 Aug 2000 11:01:59 -0700


Bug #110619, was updated on 2000-Jul-31 14:06
Here is a current snapshot of the bug.

Project: Python
Category: Library
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: urllib.py fails with username/password proxies (PR#221)

Details: Jitterbug-Id: 221
Submitted-By: tarka@zip.com.au
Date: Tue, 29 Feb 2000 19:15:45 -0500 (EST)
Version: 1.5.2
OS: Irix


urllib.py fails to handle proxies with user and password information 
included in the proxy URL, e.g. http://ssmith:testpass@10.11.12.13:1234

The following example ...

	import os, urllib
	os.environ['http_proxy'] = "http://ssmith:testpass01@10.11.12.13:1234"
	f = urllib.urlopen('http://www.python.org')
	data = f.read()
	print data

fails with the following errors :

Traceback (innermost last):
  File "url.py", line 3, in ?
    f = urllib.urlopen('http://www.python.org')
  File "/var/share//lib/python1.5/urllib.py", line 59, in urlopen
    return _urlopener.open(url)
  File "/var/share//lib/python1.5/urllib.py", line 157, in open
    return getattr(self, name)(url)
  File "/var/share//lib/python1.5/urllib.py", line 253, in open_http
    h = httplib.HTTP(host)
  File "/var/share//lib/python1.5/httplib.py", line 51, in __init__
    if host: self.connect(host, port)
  File "/var/share//lib/python1.5/httplib.py", line 75, in connect
    raise socket.error, "nonnumeric port"
IOError: [Errno socket error] nonnumeric port






====================================================================
Audit trail:
Mon May 22 17:35:04 2000	guido	moved from incoming to open

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110619&group_id=5470