Senko Rasic added the comment:

I vote for the parse method converting the spaces (and only the spaces) 
explicitly, for the following reasons:

* the spaces must be encoded for the server to accept them
* no user-encoded url will ever have spaces in them
* space quoting is idempotent: quote(quote(' ')) == quote(' ')
* if the user did get an exception from Request in case of invalid url 
containing the spaces, the only thing he or she can do is to quote the url 
string

Here's a patch implementing this. The change allows for any whitespace 
character in the selector part of the url (and in particular, '\n'), not only ' 
'.

----------
nosy: +senko
Added file: http://bugs.python.org/file30795/urllib-request-space-encode.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13359>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to