1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-28 15:57:47 +02:00

guarantee ordering of header map get_all (#2467)

This commit is contained in:
Rob Ede
2021-11-28 19:23:29 +00:00
committed by GitHub
parent 89c6d62656
commit 39243095b5
5 changed files with 111 additions and 15 deletions

View File

@@ -29,16 +29,14 @@ pub use http::header::{
X_FRAME_OPTIONS, X_XSS_PROTECTION,
};
use crate::error::ParseError;
use crate::HttpMessage;
use crate::{error::ParseError, HttpMessage};
mod as_name;
mod into_pair;
mod into_value;
mod utils;
pub(crate) mod map;
mod shared;
mod utils;
#[doc(hidden)]
pub use self::shared::*;
@@ -46,10 +44,10 @@ pub use self::shared::*;
pub use self::as_name::AsHeaderName;
pub use self::into_pair::IntoHeaderPair;
pub use self::into_value::IntoHeaderValue;
#[doc(hidden)]
pub use self::map::GetAll;
pub use self::map::HeaderMap;
pub use self::utils::*;
pub use self::map::{GetAll, HeaderMap, Removed};
pub use self::utils::{
fmt_comma_delimited, from_comma_delimited, from_one_raw_str, http_percent_encode,
};
/// A trait for any object that already represents a valid header field and value.
pub trait Header: IntoHeaderValue {
@@ -68,7 +66,7 @@ impl From<http::HeaderMap> for HeaderMap {
}
/// This encode set is used for HTTP header values and is defined at
/// https://tools.ietf.org/html/rfc5987#section-3.2.
/// <https://tools.ietf.org/html/rfc5987#section-3.2>.
pub(crate) const HTTP_VALUE: &AsciiSet = &CONTROLS
.add(b' ')
.add(b'"')