Author nobody
Recipients
Date 2000-08-01.21:16:33
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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
History
Date User Action Args
2007-08-23 13:49:49adminlinkissue210849 messages
2007-08-23 13:49:49admincreate