>   "When libcurl switches method to GET, it then uses that method without
>   sending any request body."

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)?




On 26/05/2025, 10:05, "Daniel Stenberg" <dan...@haxx.se 
<mailto:dan...@haxx.se>> wrote:


--------------------------------------------------------------------------------------------------------------
CAUTION : This email originated outside the company. Do not click on any links 
or open attachments unless you are expecting them from the sender.


ATTENTION : Cet e-mail provient de l'extérieur de l'entreprise. Ne cliquez pas 
sur les liens ou n'ouvrez pas les pièces jointes à moins de connaitre 
l'expéditeur.
--------------------------------------------------------------------------------------------------------------


On Mon, 26 May 2025, Jicea via curl-library wrote:


> I'm trying to get information on how libcurl behaves with
> CURLOPT_FOLLOWLOCATION and request body. Methods chosen for redirection are
> heavily documented, but I want to know how the request body is affected
> during redirection: is the initial body transmitted "as it", does libcurl
> send an empty body in the following request etc...


Fair question with I think a fairly simple answer. I made it as a PR:


https://github.com/curl/curl/pull/17454 
<https://github.com/curl/curl/pull/17454>


"When libcurl switches method to GET, it then uses that method without
sending any request body."


--


/ daniel.haxx.se || https://rock-solid.curl.dev/ <https://rock-solid.curl.dev/>



____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations 
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce 
message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou 
falsifie. Merci.

This message and its attachments may contain confidential or privileged 
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete 
this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been 
modified, changed or falsified.
Thank you.
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to