Xuanwo opened a new pull request, #9304:
URL: https://github.com/apache/opendal/pull/9304

   # Which issue does this PR close?
   
   Refs #6274.
   
   # Rationale for this change
   
   Tencent COS supports overriding GET response `Cache-Control`, 
`Content-Disposition`, and `Content-Type` headers via signed query parameters 
(`response-cache-control`, `response-content-disposition`, and 
`response-content-type`). Previously, `CosCore::cos_get_object_request` ignored 
these options, so ordinary and presigned COS GET reads returned the stored 
headers even when callers supplied overrides, including the 
`presign_read_options` use case in #6273.
   
   # What changes are included in this PR?
   
   `CosCore::cos_get_object_request` percent-encodes each requested override 
(`override_cache_control`, `override_content_disposition`, and 
`override_content_type`) independently before signing. Ordinary and presigned 
GET reads share this request builder. `CosBuilder` advertises 
`read_with_override_cache_control`, `read_with_override_content_disposition`, 
and `read_with_override_content_type`, and `website/data/capabilities.json` is 
regenerated to match. A focused `presign_read_options` unit test checks decoded 
query values, omission, and inclusion in `q-url-param-list` for each override 
individually, all three together, and none.
   
   On Tencent COS, native signed GETs and the candidate's 
`presign_read_options` and `read_options` returned the requested 
`Content-Disposition` and `Cache-Control` headers individually and together. 
The candidate also honored all three overrides together on a version-pinned 
ordinary GET (`read_options`) and an unpinned presigned GET 
(`presign_read_options`). Every successful GET returned HTTP 200 with matching 
version ID, ETag, and all 41 object bytes. Omission controls and pre/post 
native readbacks confirmed stored metadata (`Content-Disposition`, 
`Cache-Control`, `Content-Type`, length, and `Last-Modified`) remained 
unchanged, and cleanup deleted the test version.
   
   # Are there any user-facing changes?
   
   COS advertises `read_with_override_cache_control`, 
`read_with_override_content_disposition`, and `read_with_override_content_type` 
and honors those options on ordinary and presigned GET requests only.
   
   # Breaking changes
   
   # AI Usage Statement
   
   - Pi (`magpie/codex/gpt-6.2-sol`, `max`): reproduced the missing options on 
Tencent COS, implemented the GET mappings, capability updates, and presign 
regression, and verified the signed candidate and version cleanup. This 
combination also implemented and verified the earlier `Content-Type` change 
incorporated here.
   - Pi (`magpie/codex/gpt-6.2-sol`, `high`): performed the final independent 
review of the diff and evidence, and reviewed the earlier `Content-Type` diff 
and evidence.
   - Pi (`magpie/codex/gpt-6.2-astra`, `high`): coordinated the earlier 
`Content-Type` work, added its capability and matrix entry, and ran the COS 
behavior test.
   - Pi (`magpie/agy-cli/gemini-4-neon`, Gemini 4 Neon, `high`): finalized this 
PR description.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to