From 6ea54a76ed33c0c624146d8d4185e692cfd5403c Mon Sep 17 00:00:00 2001 From: Ryan May Date: Wed, 22 Jul 2020 02:19:43 -0600 Subject: [PATCH] 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. --- libdispatch/dhttp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdispatch/dhttp.c b/libdispatch/dhttp.c index b0cc90121..9489546ca 100644 --- a/libdispatch/dhttp.c +++ b/libdispatch/dhttp.c @@ -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; }