mirror of
https://github.com/fafhrd91/actix-web
synced 2025-01-18 13:51:50 +01:00
fix connection upgrade
This commit is contained in:
parent
9653a1fa98
commit
78e6149d9f
@ -138,8 +138,12 @@ impl Task {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Connection upgrade
|
||||||
|
if msg.upgrade() {
|
||||||
|
msg.headers.insert(CONNECTION, HeaderValue::from_static("upgrade"));
|
||||||
|
}
|
||||||
// keep-alive
|
// keep-alive
|
||||||
if msg.keep_alive() {
|
else if msg.keep_alive() {
|
||||||
if msg.version < Version::HTTP_11 {
|
if msg.version < Version::HTTP_11 {
|
||||||
msg.headers.insert(CONNECTION, HeaderValue::from_static("keep-alive"));
|
msg.headers.insert(CONNECTION, HeaderValue::from_static("keep-alive"));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user