[New-bugs-announce] [issue10671] urllib2 redirect to another host doesn't work

Kirill Subbotin 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)
files: urllib2.diff
keywords: patch
messages: 123729
nosy: Kirax
priority: normal
severity: normal
status: open
title: urllib2 redirect to another host doesn't work
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file19997/urllib2.diff

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


More information about the New-bugs-announce mailing list