Class: Thin::Request
- Inherits:
-
Object
- Object
- Thin::Request
- Defined in:
- lib/sockjs/faye.rb
Constant Summary collapse
- WEBSOCKET_RECEIVE_CALLBACK =
'websocket.receive_callback'.freeze
- GET =
'GET'.freeze
Instance Method Summary collapse
Instance Method Details
#websocket? ⇒ Boolean
9 10 11 12 13 14 |
# File 'lib/sockjs/faye.rb', line 9 def websocket? @env['REQUEST_METHOD'] == GET and @env['HTTP_CONNECTION'] and @env['HTTP_CONNECTION'].split(/\s*,\s*/).include?('Upgrade') and ['WebSocket', 'websocket'].include?(@env['HTTP_UPGRADE']) end |