Repository navigation
util/network/http: Use cargo/1.2.3 user-agent header - #13548
Conversation
... instead of `cargo 1.2.3`. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent#syntax declares that the product and product version are usually separated by a slash. This commit changes the cargo `User-Agent` header to follow that syntax instead of using whitespace for the separator.
|
some more data:
|
weihanglo
left a comment
There was a problem hiding this comment.
You might also want to update here:
|
I don't think we have any compatibility guarantee for the user agent header Cargo sends, and user agent parsing is notoriously imprecise. However, this could still potentially break data collections and analysis done by some proxy and private registry providers. Do you know any of them that we might want to contact in advance for this change? |
|
Could post to build-integration as the people likely to be there are likely to be ones relying on this. There would also be custom registries. |
✅
The only one I know is our cargo versions dashboard on DataDog, but I've already adjusted the parser there to allow both styles :) |
weihanglo
left a comment
There was a problem hiding this comment.
Going to merge this. It's always good to follow the specs!
|
@bors r+ |
util/network/http: Use `cargo/1.2.3` user-agent header ... instead of `cargo 1.2.3`. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent#syntax declares that the product and product version are usually separated by a slash. This commit changes the cargo `User-Agent` header to follow that syntax instead of using whitespace for the separator.
|
Wait. Let me post it on Zulip first, as this doesn't seem to be really urgent. @bors r- |
|
yeah, no urgency :) |
|
☀️ Try build successful - checks-actions |
|
@bors r+ Thanks! |
|
☀️ Test successful - checks-actions |
Update cargo 9 commits in a4c63fe5388beaa09e5f91196c86addab0a03580..7065f0ef4aa267a7455e1c478b5ccacb7baea59c 2024-03-06 22:15:17 +0000 to 2024-03-12 13:25:15 +0000 - chore: remove repetitive word (rust-lang/cargo#13575) - refactor(lockfile): Make diffing/printing more reusable (rust-lang/cargo#13564) - test: Add tests for using worktrees and sparse checkouts (rust-lang/cargo#13567) - util/network/http: Use `cargo/1.2.3` user-agent header (rust-lang/cargo#13548) - fix: Consistently compare MSRVs (rust-lang/cargo#13537) - refactor(shell): Use alternate to close links (rust-lang/cargo#13562) - fix(doc): Collapse down Generated statuses without --verbose (rust-lang/cargo#13557) - doc: Add doc for -Zpublic-dependency (rust-lang/cargo#13556) - docs: add link to the exported_private_dependencies lint (rust-lang/cargo#13547) r? ghost
... instead of
cargo 1.2.3.https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent#syntax declares that the product and product version are usually separated by a slash. This commit changes the cargo
User-Agentheader to follow that syntax instead of using whitespace for the separator.