Skip to content

fix: wire up HTTP definition headers orthogonally from auth - #125

Merged
its-mash merged 1 commit into
mainfrom
feat/http-headers-orthogonal
Feb 19, 2026
Merged

fix: wire up HTTP definition headers orthogonally from auth#125
its-mash merged 1 commit into
mainfrom
feat/http-headers-orthogonal

Conversation

@its-mash

Copy link
Copy Markdown
Member

Summary

  • Definition headers are now always applied as default_headers on the reqwest::Client, regardless of auth strategy (OAuth, PAT, or no-auth)
  • If headers contain an Authorization header (e.g., PAT), OAuth is skipped entirely
  • If headers have no Authorization, they ride alongside OAuth tokens on every request
  • Removed broken confirm() dialog from server uninstall action (was executing before user selection)
  • Added 19 unit tests for HttpTransport covering header building, auth routing, and error detection

Test plan

  • cargo check --workspace passes
  • cargo clippy --workspace -- -D warnings clean
  • 19 new unit tests in http.rs all pass
  • All 240 existing tests pass
  • Manual test: install GitHub PAT server, verify Authorization: Bearer <token> header is sent
  • Manual test: install OAuth server with custom headers, verify headers accompany OAuth token

…uninstall confirm

- Headers from server definitions are now always applied as default_headers
  on the reqwest::Client regardless of auth strategy (OAuth, PAT, or no-auth)
- If headers contain an Authorization header, OAuth is skipped entirely
- If headers have no Authorization, they ride alongside OAuth tokens
- Add build_default_headers() and build_http_client() helpers
- Remove standalone connect_with_headers() in favor of orthogonal design
- Add 19 unit tests for HttpTransport (requires_oauth, header building,
  connect routing logic, transport_type, description)
- Remove broken confirm() dialog from server uninstall action

Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
@its-mash its-mash changed the title feat: wire up HTTP definition headers orthogonally from auth fix: wire up HTTP definition headers orthogonally from auth Feb 19, 2026
@its-mash
its-mash merged commit 04380e0 into main Feb 19, 2026
13 checks passed
@its-mash
its-mash deleted the feat/http-headers-orthogonal branch February 19, 2026 11:22
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