From 29094716f33b8a040163393634e8d78a863bf628 Mon Sep 17 00:00:00 2001 From: Yarik Briukhovetskyi <114298166+yariks5s@users.noreply.github.com> Date: Thu, 9 Jul 2026 14:38:07 +0000 Subject: [PATCH] Store GcsStoredContentEncoding to detect decompressive transcoding --- .../include/aws/s3/model/HeadObjectResult.h | 16 ++++++++++++++++ .../source/model/HeadObjectResult.cpp | 7 +++++++ 2 files changed, 23 insertions(+) diff --git a/generated/src/aws-cpp-sdk-s3/include/aws/s3/model/HeadObjectResult.h b/generated/src/aws-cpp-sdk-s3/include/aws/s3/model/HeadObjectResult.h index f6dca8e589eb..5fca429252c6 100644 --- a/generated/src/aws-cpp-sdk-s3/include/aws/s3/model/HeadObjectResult.h +++ b/generated/src/aws-cpp-sdk-s3/include/aws/s3/model/HeadObjectResult.h @@ -309,12 +309,25 @@ namespace Model * the Content-Type header field.
*/ inline const Aws::String& GetContentEncoding() const { return m_contentEncoding; } + inline bool ContentEncodingHasBeenSet() const { return m_contentEncodingHasBeenSet; } templateClickHouse extension: the
+ * x-goog-stored-content-encoding response header returned by
+ * Google Cloud Storage. Indicates the encoding the object is stored with,
+ * which differs from Content-Encoding when GCS applies
+ * decompressive transcoding
The language the content is in.
@@ -658,6 +671,9 @@ namespace Model Aws::String m_contentEncoding; bool m_contentEncodingHasBeenSet = false; + Aws::String m_gcsStoredContentEncoding; + bool m_gcsStoredContentEncodingHasBeenSet = false; + Aws::String m_contentLanguage; bool m_contentLanguageHasBeenSet = false; diff --git a/generated/src/aws-cpp-sdk-s3/source/model/HeadObjectResult.cpp b/generated/src/aws-cpp-sdk-s3/source/model/HeadObjectResult.cpp index 0976a1601804..dc7ba8f1ce56 100644 --- a/generated/src/aws-cpp-sdk-s3/source/model/HeadObjectResult.cpp +++ b/generated/src/aws-cpp-sdk-s3/source/model/HeadObjectResult.cpp @@ -168,6 +168,13 @@ HeadObjectResult& HeadObjectResult::operator =(const Aws::AmazonWebServiceResult m_contentEncodingHasBeenSet = true; } + // ClickHouse extension, GCS reports the stored (pre-transcoding) content encoding + const auto& gcsStoredContentEncodingIter = headers.find("x-goog-stored-content-encoding"); + if (gcsStoredContentEncodingIter != headers.end()) { + m_gcsStoredContentEncoding = gcsStoredContentEncodingIter->second; + m_gcsStoredContentEncodingHasBeenSet = true; + } + const auto& contentLanguageIter = headers.find("content-language"); if(contentLanguageIter != headers.end()) {