1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-01-18 05:41:50 +01:00

Allow HeaderMap to be cloned (#1014)

* Allow HeaderMap to be cloned

* Add entry to changelog
This commit is contained in:
Sven-Hendrik Haase 2019-07-29 06:11:23 +02:00 committed by Nikolay Kim
parent 81ab37f235
commit 511026cab0
2 changed files with 6 additions and 2 deletions

View File

@ -2,6 +2,10 @@
## [0.2.8] - 2019-07-xx
### Changed
* Add `Clone` impl for `HeaderMap`
### Fixed
* Invalid response with compression middleware enabled, but compression-related features disabled #997

View File

@ -9,12 +9,12 @@ use http::HttpTryFrom;
/// `HeaderMap` is an multimap of [`HeaderName`] to values.
///
/// [`HeaderName`]: struct.HeaderName.html
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct HeaderMap {
pub(crate) inner: HashMap<HeaderName, Value>,
}
#[derive(Debug)]
#[derive(Debug, Clone)]
pub(crate) enum Value {
One(HeaderValue),
Multi(Vec<HeaderValue>),