[New-bugs-announce] [issue18119] urllib.FancyURLopener does not treat URL fragments correctly

Shuhei Takahashi report at bugs.python.org
Sun Jun 2 12:22:10 CEST 2013


New submission from Shuhei Takahashi:

When urllib.FancyURLopener encounters 302 redirection to a URL with fragments, it sends wrong URL to servers.

For example, if we run:
  urllib.urlopen('http://example.com/foo')
and the server responds like following.
  HTTP/1.1 302 Found
  Location: /bar#test
Then urllib tries next to fetch http://example.com/bar#test, instead of http://example.com/bar.

Correctly, urllib should strip fragment part of URL before issuing requests.

----------
components: Library (Lib)
messages: 190480
nosy: takahashi.shuhei
priority: normal
severity: normal
status: open
title: urllib.FancyURLopener does not treat URL fragments correctly
type: behavior
versions: Python 2.7

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


More information about the New-bugs-announce mailing list