From 1d5d277ac7bf8a4bc601358b38746005416e935e Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 26 Jan 2018 11:12:30 -0800 Subject: HttpBinaryCacheStore: Support upsertFile with PUT. Some servers, such as Artifactory, allow uploading with PUT and BASIC auth. This allows nix copy to work to upload binaries to those servers. Worked on together with @adelbertc --- src/libstore/download.hh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/libstore/download.hh') diff --git a/src/libstore/download.hh b/src/libstore/download.hh index f2d65ad8d61d..0a278a05e0e1 100644 --- a/src/libstore/download.hh +++ b/src/libstore/download.hh @@ -18,9 +18,11 @@ struct DownloadRequest unsigned int baseRetryTimeMs = 250; ActivityId parentAct; bool decompress = true; + std::shared_ptr data; + std::string mimeType; - DownloadRequest(const std::string & uri) - : uri(uri), parentAct(curActivity) { } + DownloadRequest(const std::string & uri, std::shared_ptr data = nullptr, std::string mimeType = "") + : uri(uri), parentAct(curActivity), data(std::move(data)), mimeType(std::move(mimeType)) { } }; struct DownloadResult -- cgit 1.4.1