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: Fri, 30 Mar 2012 11:19:53 +0000

> Hi,

> Currently libCURL assumes that if a POST request returns HTTP code 303, the follow-up must be a GET request. It even has a funny comment in the code: " doing a second POST when following isn't
> what anyone would want!". 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.

> The patch in the following email adds another value (CURL_REDIR_POST_303) for the CURLOPT_POSTREDIR option, allowing the user to send 2 consecutive POSTs.

Git send-email fail :) Attaching by hand...

Andrei

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2012-03-30