Skip to content

feat: support Content-Language object metadata - #8576

Merged
Xuanwo merged 1 commit into
mainfrom
xuanwo/support-content-language
Nov 21, 2026
Merged

Xuanwo merged 1 commit into
mainfrom
xuanwo/support-content-language

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Nov 21, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #6496.

Supersedes #6494. The commit credits @codephage2020 for the original implementation.

Rationale for this change

OpenDAL callers need to store and retrieve the standard Content-Language object attribute. object_store callers already have an attribute for it, so the adapter can now carry it through the OpenDAL write and read paths.

What changes are included in this PR?

  • Add WriteOptions::content_language, Capability::write_with_content_language, and a compact Metadata::content_language value.
  • Persist the attribute on Memory and on S3 single and multipart uploads. The S3 behavior tests passed against the Silo and SeaweedFS fixtures used by CI. AWS-hosted S3 was not exercised locally.
  • Map Attribute::ContentLanguage in both object_store upload paths and return it in GET and HEAD results. Regenerate the .NET option, capability, and metadata bindings.

Are there any user-facing changes?

Callers can set Content-Language through write options or the write and writer builders, and retrieve it with stat when the operator advertises support. HTTP reads expose the response header when present.

Breaking changes

AI Usage Statement

  • Harness: pi
  • Model: magpie/codex/gpt-6.2-sol
  • Reasoning effort: xhigh
  • Role: Implemented the approved API and service changes, added regression coverage, verified the local fixtures, and drafted this PR.

Co-authored-by: codephage2020 <tingwangyan2020@163.com>
@Xuanwo
Xuanwo requested a review from tisonkun as a code owner November 21, 2026 13:14
@Xuanwo
Xuanwo merged commit 9c1b10f into main Nov 21, 2026
439 of 471 checks passed
@Xuanwo
Xuanwo deleted the xuanwo/support-content-language branch November 21, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracking Issue: support content_language in opendal::options::WriteOptions

2 participants