about summary refs log tree commit diff
path: root/src/libstore/download.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-04-06T14·57+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-04-06T14·57+0200
commitdc82160164d6c74586b448a13443c19b5a6709c1 (patch)
treeb49d9e0f701771f5d36c72fbdcbde3b22854d159 /src/libstore/download.cc
parentb654381eb38b98aa92df343e3c4a939c1e584443 (diff)
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.
Diffstat (limited to 'src/libstore/download.cc')
-rw-r--r--src/libstore/download.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc
index b3a79e82a3..c34fa4ab87 100644
--- a/src/libstore/download.cc
+++ b/src/libstore/download.cc
@@ -179,8 +179,7 @@ struct CurlDownloader : public Downloader
         if (res == CURLE_WRITE_ERROR && etag == options.expectedETag) return false;
 
         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) {
             Error err =