Xuanwo opened a new pull request, #9297: URL: https://github.com/apache/opendal/pull/9297
# Which issue does this PR close? Refs #6274. # Rationale for this change Tencent COS stores `Content-Encoding` on `PutObject`. OpenDAL accepted the option, but its single-PUT request builder omitted the header. In a real COS bucket, both ordinary and presigned uploads succeeded with HTTP 200 and lost the requested encoding. # What changes are included in this PR? `CosCore::cos_put_object_request` now forwards `Content-Encoding` before signing when the caller supplies it. The regression test exercises the public presign API with and without `gzip` and checks both the returned header and the COS `q-header-list` signature parameter. On a versioned COS bucket, we verified ordinary single PUT, `presign_write_options`, and `presign_write_with` with the option set and omitted. Independent HEAD and GET requests returned the expected stored metadata, and every GET returned the original 61 bytes. We deleted all seven test versions, including the native PUT control, and confirmed the scoped version listing was empty. # Are there any user-facing changes? COS callers can set `Content-Encoding` on a single PUT, including a presigned PUT. The general `write_with_content_encoding` capability stays `false` because multipart and append use separate request builders and were outside this trial. # Breaking changes None. # AI Usage Statement - Pi, `magpie/codex/gpt-6.2-sol` (`max`) reproduced the issue, implemented the fix and regression test, and verified the candidate against COS. The same model at `high` independently reviewed the change and evidence. - Pi, `magpie/codex/gpt-6.2-astra` (`high`) coordinated scope, reviewed the test choice, and checked publication readiness. - Pi, `magpie/agy-cli/gemini-4-neon` (`high`) drafted the PR description from the verified results. -- 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]
