Skip to content

Commit

Permalink
RFC 6455 Sec-WebSocket-Key
Browse files Browse the repository at this point in the history
Update amount of bytes used in Sec-WebSocket-Key header https://datatracker.ietf.org/doc/html/rfc6455#section-4.2.1
  • Loading branch information
Tanoshii authored Jun 11, 2023
1 parent 079d4a3 commit 8313638
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deps/websocket-codec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ end

-- Make a client handshake connection
local function handshake(options, request)
-- Generate 20 bytes of pseudo-random data
local key = concat({rand4(), rand4(), rand4(), rand4(), rand4()})
-- Generate 16 bytes of pseudo-random data
local key = concat({rand4(), rand4(), rand4(), rand4()})
key = base64(key)
local host = options.host
local path = options.path or "/"
Expand Down

0 comments on commit 8313638

Please sign in to comment.