We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2843d15 commit 1c4bed6Copy full SHA for 1c4bed6
src/trans-websocket.coffee
@@ -12,18 +12,10 @@ transport = require('./transport')
12
13
exports.app =
14
_websocket_check: (req, connection, head) ->
15
- # Request via node.js magical 'upgrade' event.
16
- if (req.headers.upgrade || '').toLowerCase() isnt 'websocket'
+ if not FayeWebsocket.isWebSocket(req)
17
throw {
18
status: 400
19
- message: 'Can "Upgrade" only to "WebSocket".'
20
- }
21
- conn = (req.headers.connection || '').toLowerCase()
22
-
23
- if (conn.split(/, */)).indexOf('upgrade') is -1
24
- throw {
25
- status: 400
26
- message: '"Connection" must be "Upgrade".'
+ message: 'Not a valid websocket request'
27
}
28
29
sockjs_websocket: (req, connection, head) ->
0 commit comments