Buy commercial curl support. We
help you work out your issues, debug your libcurl applications, use the API,
port to new platforms, add new features and more. With a team lead by the
curl founder Daniel himself.
Re: CURLOPT_FOLLOWLOCATION and request body
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Jeroen Ooms via curl-library <curl-library_at_lists.haxx.se>
Date: Mon, 26 May 2025 11:18:53 +0200
On Mon, May 26, 2025 at 10:54 AM Daniel Stenberg via curl-library
<curl-library_at_lists.haxx.se> wrote:
>
> On Mon, 26 May 2025, jeanchristophe.amiel_at_orange.com wrote:
>
> > Thanks for the quick reply and the PR Daniel. Just to be crystal clear: does
> > it mean that the new request retains the request body when there is no
> > method change (for instance a POST with 308, or a redirection on a PUT
> > request)?
>
> Yes. I extended the PR to say:
>
> When libcurl switches method to GET, it then uses that method without sending
> any request body. If it does not change the method, it sends the subsequent
> request the same way as the previous one; including the request body if one
> was provided.
Perhaps also worth explaining that libcurl will then error if the body
was given via CURLOPT_READFUNCTION because it can only be consumed
once?
Date: Mon, 26 May 2025 11:18:53 +0200
On Mon, May 26, 2025 at 10:54 AM Daniel Stenberg via curl-library
<curl-library_at_lists.haxx.se> wrote:
>
> On Mon, 26 May 2025, jeanchristophe.amiel_at_orange.com wrote:
>
> > Thanks for the quick reply and the PR Daniel. Just to be crystal clear: does
> > it mean that the new request retains the request body when there is no
> > method change (for instance a POST with 308, or a redirection on a PUT
> > request)?
>
> Yes. I extended the PR to say:
>
> When libcurl switches method to GET, it then uses that method without sending
> any request body. If it does not change the method, it sends the subsequent
> request the same way as the previous one; including the request body if one
> was provided.
Perhaps also worth explaining that libcurl will then error if the body
was given via CURLOPT_READFUNCTION because it can only be consumed
once?
-- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2025-05-26