Skip to content

Add typed User-Agent client request support - #922

Merged
fewensa merged 1 commit into
mainfrom
codeon/fewensa/FWN-325/a1
Sep 5, 2026
Merged

Add typed User-Agent client request support#922
fewensa merged 1 commit into
mainfrom
codeon/fewensa/FWN-325/a1

Conversation

@fewensa

@fewensa fewensa commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add HttpClient::user_agent that validates via rttp_protocol::user_agent::UserAgent and emits one canonical User-Agent field through header replace.
  • Preserve automatic Mozilla/5.0 rttp/{version} when unset; typed values win over raw headers and the default without duplication.
  • Re-export UserAgent, UserAgentMember, and UserAgentParseError; document behavior in the client README; cover HTTP/1.1, async, redirect, and HTTP/2 emission plus invalid-before-connect rejection.

Test plan

  • cargo test -p rttp_client --all-features
  • cargo test --all-features
  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings

codeon:
  version: 1
  authority: FWN-325
  description: |-
    Integrate rttp-protocol User-Agent into HttpClient so callers can set one validated canonical field that replaces raw and default values without changing automatic behavior when unset.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@fewensa
fewensa merged commit 6588f60 into main Sep 5, 2026
1 check passed
@fewensa
fewensa deleted the codeon/fewensa/FWN-325/a1 branch September 5, 2026 02:41
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.

1 participant