| 411 | } |
| 412 | |
| 413 | bool S3InterfaceService::checkKeyExistence(const S3Url &s3Url) { |
| 414 | HTTPHeaders headers; |
| 415 | |
| 416 | headers.Add(HOST, s3Url.getHostForCurl()); |
| 417 | headers.Add(X_AMZ_CONTENT_SHA256, |
| 418 | "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"); // sha256hex |
| 419 | // of empty |
| 420 | // string |
| 421 | |
| 422 | SignRequestV4("HEAD", &headers, s3Url.getRegion(), s3Url.getPathForCurl(), "", |
| 423 | this->params.getCred()); |
| 424 | |
| 425 | return isKeyExisted(headResponseWithRetries(s3Url.getFullUrlForCurl(), headers)); |
| 426 | } |
| 427 | |
| 428 | string S3InterfaceService::getUploadId(const S3Url &s3Url) { |
| 429 | HTTPHeaders headers; |