[New-bugs-announce] [issue12431] urllib2.Request.get_full_url() broken in newer versions of Python

Jon Siddle report at bugs.python.org
Tue Jun 28 15:37:28 CEST 2011


New submission from Jon Siddle <js at corefiling.co.uk>:

Issue8280 fixed an issue where the fragment was being sent to the server (and returned by get_selector).

Unfortunately the fix means that the "full" URL stored in the Request no longer includes the fragment either.

This is in contradiction to the documentation which states:

 Request.get_full_url()
  Return the URL given in the constructor.

Yet:

 >>> import urllib2
 >>> urllib2.Request("http://host/path#fragment").get_full_url()
 'http://host/path'

The particular use case is a custom scheme handler, which should be able to use the whole of the opaque part of the URL to operate. Ie, our code wants to do something like this:

 urllib2.Request("foo://opaquestring#opaquestring").get_full_url()

----------
messages: 139361
nosy: jonsiddle
priority: normal
severity: normal
status: open
title: urllib2.Request.get_full_url() broken in newer versions of Python
type: behavior
versions: Python 2.7

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


More information about the New-bugs-announce mailing list