1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 00:21:08 +01:00

fix adding multiple response headers for http/2 #446

This commit is contained in:
Nikolay Kim 2018-08-04 08:56:33 -07:00
parent 84b27db218
commit 85e7548088
2 changed files with 4 additions and 2 deletions

View File

@ -17,6 +17,8 @@
* Fixed headers formating for CORS Middleware Access-Control-Expose-Headers #436 * Fixed headers formating for CORS Middleware Access-Control-Expose-Headers #436
* Fix adding multiple response headers #446
## [0.7.3] - 2018-08-01 ## [0.7.3] - 2018-08-01

View File

@ -112,7 +112,7 @@ impl<H: 'static> Writer for H2Writer<H> {
DATE => has_date = true, DATE => has_date = true,
_ => (), _ => (),
} }
resp.headers_mut().insert(key, value.clone()); resp.headers_mut().append(key, value.clone());
} }
// set date header // set date header
@ -159,7 +159,7 @@ impl<H: 'static> Writer for H2Writer<H> {
Err(_) => return Err(io::Error::new(io::ErrorKind::Other, "err")), Err(_) => return Err(io::Error::new(io::ErrorKind::Other, "err")),
} }
trace!("Response: {:?}", msg); trace!("HttpResponse: {:?}", msg);
let body = msg.replace_body(Body::Empty); let body = msg.replace_body(Body::Empty);
if let Body::Binary(bytes) = body { if let Body::Binary(bytes) = body {