mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-04-12 18:10:24 +08:00
Fix for cURL >7.69
Found on conda-forge (which is now running 7.71.1), that byte-range requests would stall. It turns out this is due to CURLOPT_NOBODY--apparently setting this to 0 disables the HEAD request, but does not restore downloading the body. The way to fix this is to reset to CURLOPT_HTTPGET when done with a HEAD request.
This commit is contained in:
parent
cee0a9332d
commit
6ea54a76ed
@ -377,7 +377,7 @@ execute(NC_HTTP_STATE* state, int headcmd)
|
||||
if(cstat != CURLE_OK) state->httpcode = 0;
|
||||
|
||||
if(headcmd) {
|
||||
cstat = CURLERR(curl_easy_setopt(state->curl, CURLOPT_NOBODY, 0L));
|
||||
cstat = CURLERR(curl_easy_setopt(state->curl, CURLOPT_HTTPGET, 1L));
|
||||
if(cstat != CURLE_OK) goto fail;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user