mirror of https://github.com/fafhrd91/actix-web
Add camel-case support for connection upgrade
This commit is contained in:
parent
22ecbad4ba
commit
ed93dc1b8e
|
|
@ -111,7 +111,13 @@ pub(crate) trait MessageType: Sized {
|
|||
|
||||
// Connection
|
||||
match conn_type {
|
||||
ConnectionType::Upgrade => dst.put_slice(b"connection: upgrade\r\n"),
|
||||
ConnectionType::Upgrade => {
|
||||
if camel_case {
|
||||
dst.put_slice(b"Connection: upgrade\r\n")
|
||||
} else {
|
||||
dst.put_slice(b"connection: upgrade\r\n")
|
||||
}
|
||||
},
|
||||
ConnectionType::KeepAlive if version < Version::HTTP_11 => {
|
||||
if camel_case {
|
||||
dst.put_slice(b"Connection: keep-alive\r\n")
|
||||
|
|
|
|||
Loading…
Reference in New Issue