Skip to content

Commit 8f95f65

Browse files
committed
Merge pull request lipp#41 from DavidFeng/master
[Bug Fix] I was stuck almost two days by this bug!
2 parents f5ef817 + a1985da commit 8f95f65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/websocket/handshake.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ local accept_upgrade = function(request,protocols)
8787
'HTTP/1.1 101 Switching Protocols',
8888
'Upgrade: websocket',
8989
'Connection: '..headers['connection'],
90-
string.format('Sec-Websocket-Accept: %s',sec_websocket_accept(headers['sec-websocket-key'])),
90+
string.format('Sec-WebSocket-Accept: %s',sec_websocket_accept(headers['sec-websocket-key'])),
9191
}
9292
if prot then
93-
tinsert(lines,string.format('Sec-Websocket-Protocol: %s',prot))
93+
tinsert(lines,string.format('Sec-WebSocket-Protocol: %s',prot))
9494
end
9595
tinsert(lines,'\r\n')
9696
return table.concat(lines,'\r\n'),prot

0 commit comments

Comments
 (0)