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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user