mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-07 00:00:12 +02:00
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:
@@ -8,13 +8,6 @@ define_rejection! {
|
||||
pub struct BodyAlreadyExtracted;
|
||||
}
|
||||
|
||||
define_rejection! {
|
||||
#[status = INTERNAL_SERVER_ERROR]
|
||||
#[body = "Headers taken by other extractor"]
|
||||
/// Rejection used if the headers has been taken by another extractor.
|
||||
pub struct HeadersAlreadyExtracted;
|
||||
}
|
||||
|
||||
define_rejection! {
|
||||
#[status = INTERNAL_SERVER_ERROR]
|
||||
#[body = "Extensions taken by other extractor"]
|
||||
@@ -47,7 +40,6 @@ composite_rejection! {
|
||||
/// [`Request<_>`]: http::Request
|
||||
pub enum RequestAlreadyExtracted {
|
||||
BodyAlreadyExtracted,
|
||||
HeadersAlreadyExtracted,
|
||||
ExtensionsAlreadyExtracted,
|
||||
}
|
||||
}
|
||||
@@ -79,7 +71,6 @@ composite_rejection! {
|
||||
///
|
||||
/// Contains one variant for each way the [`http::request::Parts`] extractor can fail.
|
||||
pub enum RequestPartsAlreadyExtracted {
|
||||
HeadersAlreadyExtracted,
|
||||
ExtensionsAlreadyExtracted,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user