Change HeaderMap extractor to clone the headers (#698)

* Change `HeaderMap` extractor to clone the headers

* fix docs

* changelog

* inline variable

* also add changelog item to axum

* don't list types from axum in axum-core's changelog

* document that `HeaderMap::from_request` clones the headers

* fix typo

* a few more typos
This commit is contained in:
David Pedersen
2022-01-23 18:01:52 +01:00
parent d5694f0d0d
commit 184ea656c0
16 changed files with 92 additions and 144 deletions
@@ -73,9 +73,6 @@ where
JsonRejection::MissingJsonContentType(err) => {
(StatusCode::BAD_REQUEST, err.to_string().into())
}
JsonRejection::HeadersAlreadyExtracted(err) => {
(StatusCode::INTERNAL_SERVER_ERROR, err.to_string().into())
}
err => (
StatusCode::INTERNAL_SERVER_ERROR,
format!("Unknown internal error: {}", err).into(),