mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
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,8 +179,7 @@ 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) {
|
||||||
Error err =
|
Error err =
|
||||||
|
|
Loading…
Reference in a new issue