feat(services/gcs): propagate response header overrides into presigned XML requests - #8206
Merged
Xuanwo merged 1 commit intoSep 1, 2026
Conversation
SatyamPandey-07
force-pushed
the
feat/gcs-presign-response-overrides
branch
from
August 31, 2026 14:22
893f51a to
c824ce4
Compare
Member
|
The only thing is to get CI happy, otherwise LGTM. Thank you! |
SatyamPandey-07
force-pushed
the
feat/gcs-presign-response-overrides
branch
from
August 31, 2026 15:52
c824ce4 to
fc79da7
Compare
Contributor
Author
|
done @Xuanwo sir |
SatyamPandey-07
force-pushed
the
feat/gcs-presign-response-overrides
branch
from
August 31, 2026 16:11
fc79da7 to
e5995af
Compare
…d XML requests Propagate override_content_disposition, override_content_type, and override_cache_control into query parameters (response-content-disposition, response-content-type, response-cache-control) for GCS XML GET and HEAD presigned requests. Closes apache#8187.
SatyamPandey-07
force-pushed
the
feat/gcs-presign-response-overrides
branch
from
August 31, 2026 17:37
e5995af to
990bc42
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #8187.
Rationale for this change
OpenDAL's GCS backend generates presigned URLs for read and stat requests via the GCS XML API (
gcs_get_object_xml_requestandgcs_head_object_xml_request). However, response header overrides (override_content_disposition,override_content_type, andoverride_cache_control) provided onOpRead/OpStatwere previously dropped and not appended to the URL before signing.The GCS XML API supports
response-content-disposition,response-content-type, andresponse-cache-controlquery parameters on GET/HEAD requests. This PR propagates those overrides into the query string so the presigned URLs return the requested response headers.What changes are included in this PR?
core/services/gcs/src/core.rs:response-content-disposition,response-content-type, andresponse-cache-control.gcs_get_object_xml_requestandgcs_head_object_xml_requestto percent-encode and append response override query parameters when set inOpRead/OpStat.test_gcs_get_object_xml_request_with_response_overridesandtest_gcs_head_object_xml_request_with_response_overrides.Are there any user-facing changes?
Yes. Calling
presign_read_withorpresign_stat_withon GCS withoverride_content_disposition,override_content_type, oroverride_cache_controlnow includes the corresponding query parameters in the generated signed URL.AI Usage Statement
AI assisted in drafting the query parameter propagation and unit tests for GCS XML requests. The changes, XML query parameters, and test cases were reviewed and verified.