diff options
Diffstat (limited to 'src')
-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) |