Xuanwo opened a new pull request, #9305: URL: https://github.com/apache/opendal/pull/9305
# Which issue does this PR close? Refs #6274. # Rationale for this change A B2 single-object presigned POST could succeed while dropping `WriteOptions::cache_control`. On a real B2 bucket, the upload receipt and a download by file ID both lacked the requested policy. A native upload using B2's reserved file-info header stored it. # What changes are included in this PR? The presign builder emits the percent-encoded policy once in B2's reserved upload file-info header. The service docs describe the precedence rule. The public-entry regression checks default, metadata-only, and conflicting inputs, including differently cased keys. # Are there any user-facing changes? For single-object B2 presigned uploads, an explicit `cache_control` takes precedence over the `cache-control` metadata key and the corresponding B2 reserved key, matched case-insensitively. Other metadata passes through. Omitting the dedicated option preserves metadata-only uploads. On B2, sending the returned POST unchanged with conflicting metadata stored `private, max-age=137`. An independent lookup by file ID found the policy and the unrelated metadata. A download by the same ID returned one `Cache-Control: private, max-age=137` header and all 23 original bytes. # Breaking changes # AI Usage Statement All agents used Pi. `magpie/codex/gpt-6.2-sol` (max) reproduced the issue, implemented the change, and verified it on B2. The same model at high effort independently reviewed the patch and evidence. `magpie/codex/gpt-6.2-astra` (high) coordinated the work and edited the description. `magpie/agy-cli/gemini-4-neon` (high) drafted the 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]
