1

All browsers (and all libraries) that I know of, upon receiving a 302 Found in response to a POST will treat it as a 303 See Other and make a simple GET request to the Location, rather than redirecting the POST as the spec requires. Response codes 307 and 308 are proposed as a way to emphatically retain the verb and contents as 301 and 302 are inconsistently applied.

Is there any browser or library, preferably a major browser, that has the specified, uncommon behaviour?

MatthewWilkes
  • 1,048
  • 8
  • 15
  • [the wiki page on 302](http://en.wikipedia.org/wiki/HTTP_302), which explains why it remains even though it could be replaced by 303/307: *302 code is still employed in web frameworks to preserve compatibility with browsers that do not implement the HTTP/1.1 specification*. Also [this Q&A on StackOverflow](http://stackoverflow.com/questions/4764297/difference-between-http-redirect-codes). – David Zemens May 17 '14 at 03:23
  • I'm not asking for the reasoning, I'm asking what browsers behave in a certain way. – MatthewWilkes May 17 '14 at 15:56
  • 2
    Possibly relvant, it seems the answer is "none", or at least none of the "major" browsers. Check in IE under settings -> advanced -> Use HTTP 1.1 maybe? Or Chrome Advanced -> Network -> Proxy Settings -> Use HTTP1.1? http://stackoverflow.com/questions/535053/which-webbrowsers-use-http-1-1-by-default – David Zemens May 17 '14 at 17:34
  • That's a very real possibility, yeah. There are some very old versions of IE around, wonder what, say, 5 or 6 do? – MatthewWilkes May 17 '14 at 18:44

1 Answers1

0

The HTTP spec defines that POST can be rewritten to GET for 301 and 302. (see http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p2-semantics-26.html#status.301 and http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p2-semantics-26.html#status.302)

Neither 307 or 308 have anything to do with HTTP/2. 307 has been specified in the obsolete HTTP/1.1 spec from 1999 (RFC 2616), 308 is an experimental specification.

Julian Reschke
  • 40,156
  • 8
  • 95
  • 98