Fix panics in `Headers::try_insert` and `Headers::try_append` (#3157)
The `try_insert` and `try_append` methods on `Headers` would panic when passing a non-ASCII value for the key, or an invalid UTF-8 value for the value. This was due to them using the http crate's `from_static` method, which panics on these invalid values. This PR makes them always use `try_from` instead. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
Loading
Please register or sign in to comment