userver-framework/userver

Websocket http connection headers: connection, upgrade MUST be case insensitive, key MUST have len eq 16

Closed this issue · 0 comments

PTAL Websocket RFC 6455

4.2.1
...
   3.   An |Upgrade| header field containing the value "websocket",
        treated as an ASCII case-insensitive value.
   4.   A |Connection| header field that includes the token "Upgrade",
        treated as an ASCII case-insensitive value.
   5.   A |Sec-WebSocket-Key| header field with a base64-encoded (see
        [Section 4 of [RFC4648]](https://datatracker.ietf.org/doc/html/rfc4648#section-4)) value that, when decoded, is 16 bytes in
        length.

The sibling of:
processone/ejabberd#510
fasthttp/websocket#15
etc

Upd. 24.07.2024: I've added 5. (key) to kill 2 birds with one stone may be.