[web-devel] http-enumerator and redirects
aristidb at googlemail.com
Mon Jan 31 23:18:42 CET 2011
Michael Snoyman plans to expose http-enumerator's HTTP redirect logic in a
public API. For this reason, we had a short discussion over e-mail, which he
asked me to resume here.
The problem at stake is how to deal with redirects in the case of POST
requests, especially with streaming request bodies (streamingHttp as of
0.3.1). Currently, the same HTTP method is always used, but this is not
really the correct course of action.
RFC 2616 mandates that for 301 and 302 responses, the request should be
retried with the same HTTP method (side problem: restarting streams?). 303
triggers a GET, however, and I'm not sure about 304-307. RFC 2616 also
mentions that most existing clients actually unconditionally use GET for 302
responses, which we should take into account.
Michael proposed always forcing GET, but I'm not sure if this is correct
either, because for example 301 clearly demands POST to be re-used.
So, the question is, how do we solve these problems? Should there be an
element of configurability?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the web-devel