mirror of
https://github.com/curl/curl.git
synced 2026-07-24 14:57:17 +03:00
setopt: unset NOBODY switches to GET if still HEAD
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 Fixes #5725 Closes #5728
This commit is contained in:
parent
14e63c19a0
commit
91cb16b21f
1 changed files with 2 additions and 0 deletions
|
|
@ -274,6 +274,8 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
|
|||
if(data->set.opt_no_body)
|
||||
/* in HTTP lingo, no body means using the HEAD request... */
|
||||
data->set.method = HTTPREQ_HEAD;
|
||||
else if(data->set.method == HTTPREQ_HEAD)
|
||||
data->set.method = HTTPREQ_GET;
|
||||
break;
|
||||
case CURLOPT_FAILONERROR:
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue