preserve 'amz-sdk-invocation-id' and 'amz-sdk-request' headers with gcp

This commit is contained in:
Sema Checherinda 2024-01-19 21:07:47 +01:00
parent f16bfcad0b
commit 539451bbe3
2 changed files with 4 additions and 4 deletions

View File

@ -705,9 +705,9 @@ void Client::BuildHttpRequest(const Aws::AmazonWebServiceRequest& request,
if (api_mode == ApiMode::GCS) if (api_mode == ApiMode::GCS)
{ {
/// some GCS requests don't like S3 specific headers that the client sets /// some GCS requests don't like S3 specific headers that the client sets
/// all "x-amz-*" headers have to be either converted or deleted
/// note that "amz-sdk-invocation-id" and "amz-sdk-request" are preserved
httpRequest->DeleteHeader("x-amz-api-version"); httpRequest->DeleteHeader("x-amz-api-version");
httpRequest->DeleteHeader("amz-sdk-invocation-id");
httpRequest->DeleteHeader("amz-sdk-request");
} }
} }

View File

@ -497,12 +497,12 @@ void PocoHTTPClient::makeRequestInternalImpl(
LOG_TEST(log, "Written {} bytes to request body", size); LOG_TEST(log, "Written {} bytes to request body", size);
} }
setTimeouts(*session, getTimeouts(method, first_attempt, /*first_byte*/ false));
if (enable_s3_requests_logging) if (enable_s3_requests_logging)
LOG_TEST(log, "Receiving response..."); LOG_TEST(log, "Receiving response...");
auto & response_body_stream = session->receiveResponse(poco_response); auto & response_body_stream = session->receiveResponse(poco_response);
setTimeouts(*session, getTimeouts(method, first_attempt, /*first_byte*/ false));
watch.stop(); watch.stop();
addMetric(request, S3MetricType::Microseconds, watch.elapsedMicroseconds()); addMetric(request, S3MetricType::Microseconds, watch.elapsedMicroseconds());