diff options
author | Hans Svensson <[email protected]> | 2013-01-17 22:53:39 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2014-02-05 10:32:21 +0100 |
commit | 85a398ab59ed83db7825d8c03f573c23540acda6 (patch) | |
tree | 4de7b5ae33660a71c2652f8df029c73dae677014 /lib | |
parent | 2e24f6fe79cf532d1276cb53b4c2b36528e0ac8b (diff) | |
download | otp-85a398ab59ed83db7825d8c03f573c23540acda6.tar.gz otp-85a398ab59ed83db7825d8c03f573c23540acda6.tar.bz2 otp-85a398ab59ed83db7825d8c03f573c23540acda6.zip |
inets: fix autoredirect for POST requests responding 303
Changed httpc_response, for redirect '303 See Other' also POST
requests should be redirected (using GET). See RFC2616 sect. 10.3.4
for clarification.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/inets/src/http_client/httpc_response.erl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/inets/src/http_client/httpc_response.erl b/lib/inets/src/http_client/httpc_response.erl index 04976447cc..37f5f2ce6d 100644 --- a/lib/inets/src/http_client/httpc_response.erl +++ b/lib/inets/src/http_client/httpc_response.erl @@ -124,6 +124,11 @@ result(Response = {{_, Code, _}, _, _}, (Code =:= 303) orelse (Code =:= 307) -> redirect(Response, Request); +result(Response = {{_, 303, _}, _, _}, + Request = #request{settings = + #http_options{autoredirect = true}, + method = post}) -> + redirect(Response, Request#request{method = get}); result(Response = {{_,503,_}, _, _}, Request) -> |