[Python-bugs-list] [Bug #110849] Fwd: Debian Bug#42318: urllib.py has problems with malformed proxy env. variables (PR#59)

noreply@sourceforge.net noreply@sourceforge.net
Sat, 16 Sep 2000 15:10:47 -0700


Bug #110849, was updated on 2000-Aug-01 14:16
Here is a current snapshot of the bug.

Project: Python
Category: None
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: Fwd: Debian Bug#42318: urllib.py has problems with malformed proxy env. variables (PR#59)

Details: Jitterbug-Id: 59
Submitted-By: flight@debian.org
Date: Fri, 20 Aug 1999 13:40:04 -0400 (EDT)
Version: 1.5.2
OS: Debian potato


Summary: Python's urllib expects a fully qualified URL in HTTP_PROXY (like
"http://proxy:8080/"). Many applications allow short forms in HTTP_PROXY
(like "proxy:8080"). If HTTP_PROXY is set to a short form, urllib.py will
fail with an uncomprehensible error message.


Long form:

Francesco Potorti` <F.Potorti@cnuce.cnr.it> says (in the Debian bug report
http://www.debian.org/Bugs/db/42/42318.html):

  "when setting a proxy variable that is not parsed by urllib, urllib does
   not print a comprehensible error message."

An example:


Short form HTTP_PROXY:

  master% HTTP_PROXY="proxy.cnr.it:8081" \
    python -c 'import urllib; print
urllib.urlretrieve("http://www.olemiss.edu/")'
  Traceback (innermost last):
    File "<string>", line 1, in ?
    File "/usr/lib/python1.5/urllib.py", line 69, in urlretrieve
      return _urlopener.retrieve(url)
    File "/usr/lib/python1.5/urllib.py", line 186, in retrieve
      fp = self.open(url)
    File "/usr/lib/python1.5/urllib.py", line 154, in open
      return self.open_unknown(fullurl)
    File "/usr/lib/python1.5/urllib.py", line 168, in open_unknown
      raise IOError, ('url error', 'unknown url type', type)
  IOError: ('url error', 'unknown url type', 'http')


Fully qualified URL in HTTP_PROXY:

  master% HTTP_PROXY="http://proxy.cnr.it:8081" \
    python -c 'import urllib; print
urllib.urlretrieve("http://www.olemiss.edu/")'
  ('/tmp/@15884.1', <mimetools.Message instance at 80adb08>)



====================================================================
Audit trail:
Mon Aug 30 12:35:03 1999	guido	moved from incoming to request

Follow-Ups:

Date: 2000-Sep-07 15:06
By: jhylton

Comment:
Please do triage on this bug.
-------------------------------------------------------

Date: 2000-Sep-14 22:52
By: tim_one

Comment:
Assigned to Barry because I think of him as being the Potato Man.
-------------------------------------------------------

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