Skip to content

Conversation

@Fishrock123
Copy link
Member

As suggested in discord, I think.

pub use encode::Encoder;

lazy_static! {
static ref DEFAULT_USER_AGENT: String = format!("http-rs-h1/{}", env!("CARGO_PKG_VERSION"));
Copy link
Member Author

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.

Copy link
Member

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)

@Fishrock123 Fishrock123 marked this pull request as draft September 14, 2020 23:03
@Fishrock123
Copy link
Member Author

Note: the tests for this are brittle. The order of added header is non-deterministic (HashMap iterator).

@jbr
Copy link
Member

jbr commented Oct 4, 2020

Seems reasonable to sort headers by either addition order or alphabetically

@Fishrock123
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants