Page MenuHomePhabricator

D4649.diff
No OneTemporary

D4649.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, 4:43 AM (21 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2536763
Default Alt Text
D4649.diff (1 KB)

Event Timeline