Skip to content

fix(client): set User-Agent header in raw HTTP helpers - #256

Merged
platinummonkey merged 1 commit into
mainfrom
fix/ddsql-user-agent-header
Mar 27, 2026
Merged

fix(client): set User-Agent header in raw HTTP helpers#256
platinummonkey merged 1 commit into
mainfrom
fix/ddsql-user-agent-header

Conversation

@platinummonkey

Copy link
Copy Markdown
Collaborator

Summary

The raw HTTP helpers (raw_get, raw_patch, raw_post) in client.rs were never setting the User-Agent header, causing ddsql and any other commands using these helpers to send reqwest's default user agent instead of pup's versioned string (pup/<version> (rust; os ...; arch ...)).

Changes

  • Import useragent in client.rs (src/client.rs:223)
  • Add .header("User-Agent", useragent::get()) to raw_get, raw_patch, and raw_post (src/client.rs:511, 548, 584)

Testing

  • cargo fmt — no changes
  • cargo clippy -- -D warnings — clean
  • cargo check — clean

Notes

This also fixes the same missing header in acp.rs and synthetics.rs which use the same raw helpers.


🤖 Generated with Claude Code

All three raw HTTP helpers (raw_get, raw_patch, raw_post) were omitting
the User-Agent header, causing ddsql (and any other commands using these
helpers like acp and synthetics) to send reqwest's default user agent
instead of pup's versioned agent string.

- Add `useragent::get()` header to raw_get, raw_patch, raw_post

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@platinummonkey
platinummonkey merged commit 7a5da60 into main Mar 27, 2026
11 checks passed
@platinummonkey
platinummonkey deleted the fix/ddsql-user-agent-header branch March 27, 2026 21:02
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