trungn1992 / httplib2

Automatically exported from code.google.com/p/httplib2
0 stars 0 forks source link

When redirecting, paths should be quoted #117

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Send a request to some test URL
2. Let the server respond with a '302 Object Moved' with the new location 
containing unquoted characters. In my case Space instead of %20
3. httplib2 sends the invalid redirected request, to which the server answers 
with a '400 Bad Request'.

What is the expected output? What do you see instead?
If httplib2 would quote unquoted characters before sending, the redirection 
would work, giving me a 200 OK instead.

What version of the product are you using? On what operating system?
Rev: 259 on Python 3.1.2 (r312:79147, Apr 15 2010, 12:35:07) on Ubuntu 
10.04.1 LTS

Please provide any additional information below.
Of course you should not expect a server to send an invalid Location on 
redirection, but since for example browsers do not have a problem with this 
kind of redirect, httplib2 should take responsibility to always send only valid 
requests.

Original issue reported on code.google.com by klaus.bi...@gmail.com on 2 Oct 2010 at 12:36

GoogleCodeExporter commented 8 years ago
The server is running Microsoft SharePoint Team Services.

Original comment by klaus.bi...@gmail.com on 2 Oct 2010 at 12:36

GoogleCodeExporter commented 8 years ago

Original comment by joe.gregorio@gmail.com on 13 Jun 2011 at 4:48