[issue14767] urllib.request.HTTPRedirectHandler raises HTTPError when Location header is relative

jspenguin report at bugs.python.org
Thu May 10 03:28:08 CEST 2012


New submission from jspenguin <jspenguin at gmail.com>:

If a server returns a relative URL in the 'Location:' header, HTTPRedirectHandler will fail because it checks the scheme of the URL before it calls urljoin() to convert it to an absolute URL.

----------
components: Library (Lib)
files: rel_redirect.py
messages: 160319
nosy: jspenguin
priority: normal
severity: normal
status: open
title: urllib.request.HTTPRedirectHandler raises HTTPError when Location header is relative
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file25513/rel_redirect.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14767>
_______________________________________


More information about the Python-bugs-list mailing list