This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jjlee
Recipients jjlee
Date 2008-12-02.20:46:10
SpamBayes Score 1.8913295e-09
Marked as misclassified No
Message-id <1228250772.41.0.047917224679.issue4493@psf.upfronthosting.co.za>
In-reply-to
Content
As required by RFC 2616 section 3.2.2, for all HTTP requests sent by
urllib2, the path component of the URI should be normalized to "/"
before the Request-URI derived from it gets passed to httplib (or
something functionally equivalent to that).  This was fixed in one case
in #2464, but the fix is in the wrong place, since it's a general
problem not specific to redirects.  See the longer discussion here:

http://bugs.python.org/msg76736

(hmm, let's see if I can just say msg76736 and get a hyperlink)

Example:

import urllib2
urllib2.urlopen("http://python.org?spam")

Expect: sends "/?spam" in request line.

Got: sends "?spam" in request line.

Probably should be fixed by making Request.get_selector() return the
normalized URI reference (with the slash always present).  When fixing,
remember that the Request-URI of RFC 2616 (returned by .get_selector())
is sometimes a relative reference, and sometimes a URI (in RFC 3986's
terminology).
History
Date User Action Args
2008-12-02 20:46:12jjleesetrecipients: + jjlee
2008-12-02 20:46:12jjleesetmessageid: <1228250772.41.0.047917224679.issue4493@psf.upfronthosting.co.za>
2008-12-02 20:46:11jjleelinkissue4493 messages
2008-12-02 20:46:10jjleecreate