[Web-SIG] python bug issue2464

Thomas Broyer t.broyer at gmail.com
Sun Aug 17 15:30:54 CEST 2008


On Wed, Aug 13, 2008 at 4:17 PM, Jean-Paul Calderone wrote:
>
> Some things:
>
>  http://foo.com
>
> This is not a valid URL.

That's not what RFC 3986 says:
"  The scheme and path components are required, though the path may be
   empty (no characters).  When authority is present, the path must
   either be empty or begin with a slash ("/") character."
   -- http://www.ietf.org/rfc/rfc3986.txt (section 3, page 16)

>  The correct URL for the intended location here
> is:
>
>  http://foo.com/

That's the HTTP interpretation: connect to foo.com and send a request
for path "/", because HTTP cannot deal with empty paths (and they have
the exact same meaning; at least as far as HTTP is concerned, I'm not
sure about RFC 3986...)

> This is the root of the problem, I suspect.

So this is a bug in urllib2.

-- 
Thomas Broyer


More information about the Web-SIG mailing list