mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-25 09:59:21 +02:00
Correct settings headers for HTTP2
Add test to verify number of Set-Cookies
This commit is contained in:
@ -112,7 +112,7 @@ impl<H: 'static> Writer for H2Writer<H> {
|
||||
DATE => has_date = true,
|
||||
_ => (),
|
||||
}
|
||||
resp.headers_mut().insert(key, value.clone());
|
||||
resp.headers_mut().append(key, value.clone());
|
||||
}
|
||||
|
||||
// set date header
|
||||
@ -151,6 +151,8 @@ impl<H: 'static> Writer for H2Writer<H> {
|
||||
.insert(CONTENT_ENCODING, HeaderValue::try_from(ce).unwrap());
|
||||
}
|
||||
|
||||
trace!("Response: {:?}", resp);
|
||||
|
||||
match self
|
||||
.respond
|
||||
.send_response(resp, self.flags.contains(Flags::EOF))
|
||||
@ -159,8 +161,6 @@ impl<H: 'static> Writer for H2Writer<H> {
|
||||
Err(_) => return Err(io::Error::new(io::ErrorKind::Other, "err")),
|
||||
}
|
||||
|
||||
trace!("Response: {:?}", msg);
|
||||
|
||||
let body = msg.replace_body(Body::Empty);
|
||||
if let Body::Binary(bytes) = body {
|
||||
if bytes.is_empty() {
|
||||
|
Reference in New Issue
Block a user