Message76777
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). |
|
Date |
User |
Action |
Args |
2008-12-02 20:46:12 | jjlee | set | recipients:
+ jjlee |
2008-12-02 20:46:12 | jjlee | set | messageid: <1228250772.41.0.047917224679.issue4493@psf.upfronthosting.co.za> |
2008-12-02 20:46:11 | jjlee | link | issue4493 messages |
2008-12-02 20:46:10 | jjlee | create | |
|