KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
What is the correct behavior expected of a POST => 302 redirect to GET? In chrome (and likely most every browser), after I POST (to a resource that wants me to redirect) and I receive a 302 redirect, the browser automatically issues a GET on the 302 location. This is even a well known pattern . But the way I read the spec, it seems to suggest this should not happen. The HTTP spec says If the 302 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user , since this might change the conditions under which the request was issued. And fiddler is showing: REQUEST 1: POST URLA RESPONSE 1: 302 redirect to URLB REQUEST 2: GET URLB The section above seems to say that the browser should not make the GET request? What am I missing? Something earlier in the spec that makes this section irrelevant My understanding of automatically redirect is wrong (and the chrome browser that did the GET wasn't really automatically redirecting) My understanding of confirmed this as a user Something else?
Tags (comma-separated)
Save Edits
Cancel