1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

S3BinaryCacheStore: Set Content-Type

This is necessary for serving log files to browsers.
This commit is contained in:
Eelco Dolstra 2017-03-14 15:26:01 +01:00
parent 8b1d65bebe
commit 45c70382ac
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
5 changed files with 25 additions and 13 deletions

View file

@ -30,7 +30,9 @@ protected:
bool fileExists(const std::string & path) override;
void upsertFile(const std::string & path, const std::string & data) override;
void upsertFile(const std::string & path,
const std::string & data,
const std::string & mimeType) override;
void getFile(const std::string & path,
std::function<void(std::shared_ptr<std::string>)> success,
@ -83,7 +85,9 @@ bool LocalBinaryCacheStore::fileExists(const std::string & path)
return pathExists(binaryCacheDir + "/" + path);
}
void LocalBinaryCacheStore::upsertFile(const std::string & path, const std::string & data)
void LocalBinaryCacheStore::upsertFile(const std::string & path,
const std::string & data,
const std::string & mimeType)
{
atomicWrite(binaryCacheDir + "/" + path, data);
}