diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-06-05T12·44+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-06-05T13·26+0200 |
commit | ca06a9cea706bf06374efeed276cf3a90d2eaa80 (patch) | |
tree | 16d1ae7e65eab6b77d186af2b9c9ac634a254584 /src/libstore/download.cc | |
parent | a2ec7a3bfd33a4792185a74e2ae20b48f7ac2de9 (diff) |
Improve binary cache fallback test
Diffstat (limited to 'src/libstore/download.cc')
-rw-r--r-- | src/libstore/download.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc index 9a2d0dafa518..c7cffedbadc8 100644 --- a/src/libstore/download.cc +++ b/src/libstore/download.cc @@ -574,6 +574,11 @@ struct CurlDownloader : public Downloader void enqueueItem(std::shared_ptr<DownloadItem> item) { + if (item->request.data + && !hasPrefix(item->request.uri, "http://") + && !hasPrefix(item->request.uri, "https://")) + throw nix::Error("uploading to '%s' is not supported", item->request.uri); + { auto state(state_.lock()); if (state->quit) |