Skip to content

new feature: propagate response header overrides into GCS presigned reads #8187

Description

@hanneskuettner

Feature Description

OpenDAL’s GCS service accepts override_content_type and override_content_disposition through OpRead, but the presigned XML request currently drops both options.

gcs_get_object_xml_request receives the complete OpRead, but does not add either response override to the URL before it is signed.

The GCS XML API supports both query parameters for authenticated GET requests:

  • response-content-disposition
  • response-content-type

https://cloud.google.com/storage/docs/xml-api/reference-headers#response-content-disposition

Problem and Solution

This means a caller can provide both overrides through presign_read_with, receive a signed URL, and still get the object’s stored response headers.

Could gcs_get_object_xml_request propagate these options into the query string before V4 signing?

The service could then advertise:

  • read_with_override_content_disposition
  • read_with_override_content_type

It would be useful to cover this with a test that verifies both parameters are present in the canonical query and survive signing.

Additional Context

#1978 previously requested GCS override_content_disposition support, but it was closed because the GCS JSON API does not support the override.

OpenDAL’s current presign path uses the XML API, though, and the XML API supports both response parameters. I believe that makes the original closure rationale no longer applicable to presigned reads.

Are you willing to contribute to the development of this feature?

  • Yes, I am willing to contribute to the development of this feature.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestreleases-note/featThe PR implements a new feature or has a title that begins with "feat"services/gcs

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions