[issue2464] urllib2 can't handle http://www.wikispaces.com

Facundo Batista report at bugs.python.org
Sat Aug 16 21:30:09 CEST 2008


Facundo Batista <facundo at taniquetil.com.ar> added the comment:

Senthil:

Look at that URL that the server returned in the second redirect:

http://www.wikispaces.com?responseToken=ee3fca88a9b0dc865152d8a9e5b6138d

See that the "?" appears without a path between the host and it.

Check the item 3.2.2 in the RFC 2616, it says that a HTTP URL should be:

  http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]

So, we should fix that URL that the server returned. Guess what: if we
put a "/" (as obligates the RFC), everything works ok.

The patch I attach here does that. All tests pass ok.

What do you think?

----------
keywords: +patch
Added file: http://bugs.python.org/file11127/issue2464-facundo.diff

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


More information about the Python-bugs-list mailing list