1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

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
This commit is contained in:
Shea Levy 2018-01-26 11:12:30 -08:00
parent e09161d05c
commit 1d5d277ac7
No known key found for this signature in database
GPG key ID: 5C0BD6957D86FE27
3 changed files with 38 additions and 4 deletions

View file

@ -18,9 +18,11 @@ struct DownloadRequest
unsigned int baseRetryTimeMs = 250;
ActivityId parentAct;
bool decompress = true;
std::shared_ptr<std::string> data;
std::string mimeType;
DownloadRequest(const std::string & uri)
: uri(uri), parentAct(curActivity) { }
DownloadRequest(const std::string & uri, std::shared_ptr<std::string> data = nullptr, std::string mimeType = "")
: uri(uri), parentAct(curActivity), data(std::move(data)), mimeType(std::move(mimeType)) { }
};
struct DownloadResult