about summary refs log tree commit diff
path: root/src/libstore/download.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-09-18T09·07+0200
committerEelco Dolstra <edolstra@gmail.com>2017-09-18T09·07+0200
commitaca4f7dff0ee615164668e923deaf5cc96ab1c8a (patch)
treeb15c70471ab332a1dbb86d3698e429179b8ba45c /src/libstore/download.cc
parent5324bb9399b87782227cc98d83bc3c2d55b102fa (diff)
Don't remove Content-Encoding in fetchurl / nix-prefetch-url
Fixes #1568.
Diffstat (limited to 'src/libstore/download.cc')
-rw-r--r--src/libstore/download.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc
index f5304daeefd2..3f5e744dde19 100644
--- a/src/libstore/download.cc
+++ b/src/libstore/download.cc
@@ -269,7 +269,8 @@ struct CurlDownloader : public Downloader
                 done = true;
 
                 try {
-                    result.data = decodeContent(encoding, ref<std::string>(result.data));
+                    if (request.decompress)
+                        result.data = decodeContent(encoding, ref<std::string>(result.data));
                     callSuccess(success, failure, const_cast<const DownloadResult &>(result));
                     act.progress(result.data->size(), result.data->size());
                 } catch (...) {