http-rs / http-types

Common types for HTTP operations
https://docs.rs/http-types
Apache License 2.0
200 stars 84 forks source link

fix: avoid panic when translating from hyperium #359

Closed Fishrock123 closed 3 years ago

Fishrock123 commented 3 years ago

The opposite direction also uses hyperium's append, but (I think) this was written before that same functionality existed in http-types.

This is somewhat important for my use and I intend to make a 2.11.1 release with this.

Fishrock123 commented 3 years ago

Err, actually, it theoretically overwrote previously but it actually just unconditionally panic-ed on any new header, since we're unwrapping the option from https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.insert ...

I'll update the commit message to clarify that this really did not work before.