[PR #2063] feat: Added support for "X-Goog-Stored-Content-Length" in object download headers. #2062

Open
opened 2026-03-03 13:29:35 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/2063
Author: @mmukada
Created: 11/6/2025
Status: 🔄 Open

Base: mainHead: dev


📝 Commits (3)

  • a67a250 feat: Added support for "X-Goog-Stored-Content-Length" in object download headers.
  • a626c7d Merge branch 'fsouza:main' into dev
  • 23650fd fix: Correctly report X-Goog-Stored-Content-Length before content transcoding and add new tests for this behavior.

📊 Changes

3 files changed (+145 additions, -11 deletions)

View changed files

📝 fakestorage/object.go (+2 -0)
📝 fakestorage/object_test.go (+1 -1)
📝 fakestorage/server_test.go (+142 -10)

📄 Description

According to the Google team, the X-Goog-Stored-Content-Length header is always included in GCS object downloads and corresponds to metadata.size (the object’s size at rest). The Rust SDK uses this header to convey the object size during downloads — see https://github.com/googleapis/google-cloud-rust/discussions/3713.

Documentation: https://docs.cloud.google.com/storage/docs/json_api/v1/parameters#xgoogstoredcontentlength


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fsouza/fake-gcs-server/pull/2063 **Author:** [@mmukada](https://github.com/mmukada) **Created:** 11/6/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `dev` --- ### 📝 Commits (3) - [`a67a250`](https://github.com/fsouza/fake-gcs-server/commit/a67a2502a174d7c0a80fe34907d61e157b81d9b5) feat: Added support for "X-Goog-Stored-Content-Length" in object download headers. - [`a626c7d`](https://github.com/fsouza/fake-gcs-server/commit/a626c7d49336372b1ed1f443baa50e49c9cffd3a) Merge branch 'fsouza:main' into dev - [`23650fd`](https://github.com/fsouza/fake-gcs-server/commit/23650fd30382a64c22cbbea5cb1cd0109825c971) fix: Correctly report X-Goog-Stored-Content-Length before content transcoding and add new tests for this behavior. ### 📊 Changes **3 files changed** (+145 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `fakestorage/object.go` (+2 -0) 📝 `fakestorage/object_test.go` (+1 -1) 📝 `fakestorage/server_test.go` (+142 -10) </details> ### 📄 Description According to the Google team, the `X-Goog-Stored-Content-Length` header is always included in GCS object downloads and corresponds to `metadata.size` (the object’s size at rest). The Rust SDK uses this header to convey the object size during downloads — see [https://github.com/googleapis/google-cloud-rust/discussions/3713](https://github.com/googleapis/google-cloud-rust/discussions/3713). Documentation: [https://docs.cloud.google.com/storage/docs/json_api/v1/parameters#xgoogstoredcontentlength](https://docs.cloud.google.com/storage/docs/json_api/v1/parameters#xgoogstoredcontentlength) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#2062
No description provided.