| 401 | } |
| 402 | |
| 403 | std::string constructResourcePath(Reference<S3BlobStoreEndpoint> b, |
| 404 | const std::string& bucket, |
| 405 | const std::string& object) { |
| 406 | std::string resource; |
| 407 | |
| 408 | if (b->getHost().find(bucket + ".") != 0) { |
| 409 | resource += std::string("/") + bucket; // not virtual hosting mode |
| 410 | } |
| 411 | |
| 412 | if (!object.empty()) { |
| 413 | resource += "/"; |
| 414 | resource += object; |
| 415 | } |
| 416 | |
| 417 | return resource; |
| 418 | } |
| 419 | |
| 420 | ACTOR Future<bool> bucketExists_impl(Reference<S3BlobStoreEndpoint> b, std::string bucket) { |
| 421 | wait(b->requestRateRead->getAllowance(1)); |
no test coverage detected