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 _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com