1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-06-13 10:49:26 +00:00

fix connection upgrade

This commit is contained in:
Nikolay Kim 2017-10-10 12:39:24 -07:00
parent 9653a1fa98
commit 78e6149d9f

View file

@ -138,8 +138,12 @@ impl Task {
}
}
// Connection upgrade
if msg.upgrade() {
msg.headers.insert(CONNECTION, HeaderValue::from_static("upgrade"));
}
// keep-alive
if msg.keep_alive() {
else if msg.keep_alive() {
if msg.version < Version::HTTP_11 {
msg.headers.insert(CONNECTION, HeaderValue::from_static("keep-alive"));
}