Skip to content
Unverified Commit a94a5e08 authored by John DiSanti's avatar John DiSanti Committed by GitHub
Browse files

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._
parent 7eb008c4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment