Page MenuHomePhabricator

D4649.id15201.diff
No OneTemporary

D4649.id15201.diff

diff --git a/services/blob/src/Reactors/server/GetReactor.h b/services/blob/src/Reactors/server/GetReactor.h
--- a/services/blob/src/Reactors/server/GetReactor.h
+++ b/services/blob/src/Reactors/server/GetReactor.h
@@ -63,21 +63,20 @@
void initialize() override {
this->s3Path = tools::findS3Path(this->request.holder());
- this->fileSize =
- getBucket(s3Path.getBucketName()).getObjectSize(s3Path.getObjectName());
-
- this->getRequest.SetBucket(this->s3Path.getBucketName());
- this->getRequest.SetKey(this->s3Path.getObjectName());
AwsS3Bucket bucket = getBucket(this->s3Path.getBucketName());
if (!bucket.isAvailable()) {
throw std::runtime_error(
"bucket [" + this->s3Path.getBucketName() + "] not available");
}
- const size_t fileSize = bucket.getObjectSize(this->s3Path.getObjectName());
+
+ this->fileSize = bucket.getObjectSize(this->s3Path.getObjectName());
if (this->fileSize == 0) {
throw std::runtime_error("object empty");
}
+
+ this->getRequest.SetBucket(this->s3Path.getBucketName());
+ this->getRequest.SetKey(this->s3Path.getObjectName());
};
void doneCallback() override{};

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 19, 6:41 AM (22 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2536763
Default Alt Text
D4649.id15201.diff (1 KB)

Event Timeline