cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: POST after the first POST returned 303

From: Andrei Cipu <acipu_at_ixiacom.com>
Date: Mon, 2 Apr 2012 13:24:21 +0000

> -----Original Message-----
> From: curl-library-bounces_at_cool.haxx.se [mailto:curl-library-
> bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
> Sent: Sunday, April 01, 2012 4:17 PM
> To: libcurl development
> Subject: Re: POST after the first POST returned 303
>
> > However, RFC 2616 states [1] that " a different URI [...] SHOULD be
> > retrieved using a GET method on that resource" (only SHOULD, not
> > MUST). As it turns out, there are servers out there that want a POST
> > after they returned 303 to a previous POST request.
>
> And there are browsers doing that as well? The "bad" 301 and 302 behaviors
> were due to how things were in the early HTTP 1.0 days. 303 wasn't
> introduced until HTTP 1.1 and the phrasing was quite clear IMHO. Why would
> anyone to blatantly and clearly violate the spec and not obey the SHOULD? It
> doesn't really make sense to me. Do you know?

First of all, I don't think of this as a blatant violation, but rather a bending of the spec. That's why I believe the server I'm working with might not be the only one implementing it, thus making the patch potentially useful to other libcurl users (but I have no proof for this).

To answer your question, the behavior appears when the server is talking (HTTP) to a dedicated client, so I believe the answer is "because they can". I cannot test that particular server using a full browser or give you any other data points, but I suspect the browser will follow the rfc. Very likely, the message exchange with the browser will be slightly different.

Thanks,
   Andrei

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-04-02