Fix "tar: This does not look like a tar archive" with fetchTarball / -I http://
The 304 Not Modified was not handled correctly, so the empty result from the conditional request would overwrite the previous tarball.
This commit is contained in:
parent
b654381eb3
commit
dc82160164
1 changed files with 1 additions and 2 deletions
|
@ -179,7 +179,6 @@ struct CurlDownloader : public Downloader
|
||||||
if (res == CURLE_WRITE_ERROR && etag == options.expectedETag) return false;
|
if (res == CURLE_WRITE_ERROR && etag == options.expectedETag) return false;
|
||||||
|
|
||||||
long httpStatus = -1;
|
long httpStatus = -1;
|
||||||
if (res == CURLE_HTTP_RETURNED_ERROR)
|
|
||||||
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &httpStatus);
|
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &httpStatus);
|
||||||
|
|
||||||
if (res != CURLE_OK) {
|
if (res != CURLE_OK) {
|
||||||
|
|
Loading…
Reference in a new issue