-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting and unsetting CURLOPT_NOBODY causes hang #5725
Comments
This does indeed change the behavior, but let me also point out that setting |
Yeah that's the workaround I found, although it wasn't obvious. Perhaps that should be called out more clearly in the documentation for |
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 brought back. Reported-by: causal-agent on github Isssue: #5725
@causal-agent do #5728 and #5729 improve things for you? |
Looks good, thanks! |
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 whenCURLOPT_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-8fb104c402dc51bdffef05a372f32aa2L4000I did this
I expected the following
A HEAD request followed by a GET request (behaviour prior to 7.71.0). Instead, the second request is still a HEAD request, but curl waits to receive a body, causing a hang.
curl/libcurl version
operating system
The text was updated successfully, but these errors were encountered: