1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 11:41:15 +02:00

Fix S3BinaryCacheStore

It failed with

   AWS error uploading ‘6gaxphsyhg66mz0a00qghf9nqf7majs2.ls.xz’: Unable to parse ExceptionName: MissingContentLength Message: You must provide the Content-Length HTTP header.

possibly because the istringstream_nocopy introduced in
0d2ebb4373 doesn't supply the seek
method that the AWS library expects. So bring back the old version,
but only for S3BinaryCacheStore.
This commit is contained in:
Eelco Dolstra 2016-12-08 15:31:27 +01:00
parent 8df1a3b579
commit e6a61b8da7
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
4 changed files with 11 additions and 53 deletions

View file

@ -18,6 +18,15 @@
namespace nix {
struct istringstream_nocopy : public std::stringstream
{
istringstream_nocopy(const std::string & s)
{
rdbuf()->pubsetbuf(
(char *) s.data(), s.size());
}
};
struct S3Error : public Error
{
Aws::S3::S3Errors err;