[issue10671] urllib2 redirect to another host doesn't work
report at bugs.python.org
Fri Dec 10 13:16:47 CET 2010
New submission from Kirill Subbotin <kirrax at gmail.com>:
When you open url which redirects to another host (either with 301 or 302), HTTPRedirectHandler keeps "Host" header from the previous request, which leads to a error. Instead a host should be taken from a new location url.
Attached patch is tested with Python 2.6.5.
components: Library (Lib)
title: urllib2 redirect to another host doesn't work
versions: Python 2.6
Added file: http://bugs.python.org/file19997/urllib2.diff
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list