You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Since curl 7.71.0, setting and unsetting CURLOPT_NOBODY causes the request following unsetting it to hang. This behaviour was introduced in 9c845be, which sets the request method to HEAD when CURLOPT_NOBODY is set, but does not change it away from HEAD when it is unset. Notably, this comment and the behaviour it describes was removed 9c845be#diff-8fb104c402dc51bdffef05a372f32aa2L4000
/* ... but if unset there really is no perfect method that is the "opposite" of HEAD but in reality most people probably think GET then. The important thing is that we can't let it remain HEAD if the opt_no_body is set FALSE since then we'll behave wrong when getting HTTP. */
This does indeed change the behavior, but let me also point out that setting CURLOPT_NOBODY to 0L is not how to reset a handle back to doing a GET (precisely because the "opposite" of HEAD is not necessarily GET) and it is not documented to do that. We added CURLOPT_HTTPGET for exactly that purpose
Unsetting CURLOPT_NOBODY with 0L when doing HTTP has no documented
action but before 7.71.0 that used to switch back to GET and with this
change (assuming the method is still set to HEAD) this behavior is
Reported-by: causal-agent on github