summaryrefslogtreecommitdiffstats
path: root/Lib/statcache.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2003-05-04 23:44:49 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2003-05-04 23:44:49 (GMT)
commit828023b6b5d4d84a3fc01e9907142662a33d45a6 (patch)
tree1f7797a585fb80a1e618fd115d14e827190586fa /Lib/statcache.py
parent258dfebfb4286afe176cce1d6f6245d53112fc1a (diff)
downloadcpython-828023b6b5d4d84a3fc01e9907142662a33d45a6.zip
cpython-828023b6b5d4d84a3fc01e9907142662a33d45a6.tar.gz
cpython-828023b6b5d4d84a3fc01e9907142662a33d45a6.tar.bz2
Repair redirect handling and raise URLError on host-not-found.
The latest changes to the redirect handler couldn't possibly have been tested, because they did not compute a newurl and failed with a NameError. The __name__ == "__main__": block has a test for redirects. Also, fix SF bug 723831. A urlopen() that failed because the host was not found raised a socket.gaierror unlike earlier versions of urllib2. The problem is that httplib actually establishes the connection at a different point starting with Python 2.2. Move the try/except to endheaders(), which is where the connection gets established.
Diffstat (limited to 'Lib/statcache.py')
0 files changed, 0 insertions, 0 deletions