Skip to content

Commit

Permalink
web: WebSocket.openServer echo back the Sec-WebSocket-Protocol header
Browse files Browse the repository at this point in the history
  • Loading branch information
briansfrank committed Aug 16, 2023
1 parent e6ad821 commit 692aced
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/web/fan/WebSocket.fan
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class WebSocket
res.headers["Upgrade"] = "websocket"
res.headers["Connection"] = "Upgrade"
res.headers["Sec-WebSocket-Accept"] = secDigest(key)
res.headers.addNotNull("Sec-WebSocket-Protocol", req.headers["Sec-WebSocket-Protocol"])

// take ownership of the underlying socket
socket := res.upgrade(101)
Expand Down

0 comments on commit 692aced

Please sign in to comment.