simplegy / httplib2

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

non GET redirects are changed into GET #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When receiving a 303 response + a Location:-header with a non-GET request
method (e.g. POST/PUT/DELETE), the request is changed into a GET and
redirected to the location defined in the Location:-header.

I would rather get an exception so this can be handled by the user instead
of  a transparent change to a GET. Or the possibility to indicate that the
method in the redirected request should not change.

Alternatively, this can be worked around by using the follow_redirects
attribute.

Original issue reported on code.google.com by hoegqvist@gmail.com on 31 Aug 2007 at 9:16

GoogleCodeExporter commented 9 years ago
That behavior for a 303 is correct per RFC 2616. The follow_redirects attribute 
is
there if you don't like the default behavior and wish to manually handle 
redirects.

Original comment by joe.gregorio@gmail.com on 4 Sep 2007 at 3:57