-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
client: add default user agent #140
base: main
Are you sure you want to change the base?
Conversation
b30a2d5
to
6b2ce9d
Compare
6b2ce9d
to
0c2fa7b
Compare
|
||
mod decode; | ||
mod encode; | ||
|
||
pub use decode::decode; | ||
pub use encode::Encoder; | ||
|
||
lazy_static! { | ||
static ref DEFAULT_USER_AGENT: String = format!("http-rs-h1/{}", env!("CARGO_PKG_VERSION")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsure what to call it, async-h1
seems wrong when used by e.g. surf, but also maybe surf should override it anyways. Unsure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for surf overriding or appending. why not async-h1
, though, since that's the name of the crate? Then it could be something like surf/2.0.0 (async-h1/6.0.0)
Note: the tests for this are brittle. The order of added header is non-deterministic (HashMap iterator). |
Seems reasonable to sort headers by either addition order or alphabetically |
The problem is we are comparing to raw output files and unless headers are always going to be sorted there isn't a way to do that just for test output without re-writing the tests. |
As suggested in discord, I think.