Re: CURLOPT_FOLLOWLOCATION and request body

Jeroen Ooms via curl-library <[email protected]>
Newsgroups gmane.comp.web.curl.library
Message-ID <CABFfbXsMcwzoXrG=EHfCxALqF7khJMJstAV0v8OxqosHW1r78A@mail.gmail.com>
On Mon, May 26, 2025 at 10:54 AM Daniel Stenberg via curl-library
<[email protected]> wrote:
>
> On Mon, 26 May 2025, [email protected] 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.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.