Module: Rack::WebSocket::Handler
- Defined in:
- lib/rack/websocket/handler.rb,
lib/rack/websocket/handler/base.rb,
lib/rack/websocket/handler/stub.rb,
lib/rack/websocket/handler/thin.rb,
lib/rack/websocket/handler/base/connection.rb
Defined Under Namespace
Class Method Summary collapse
-
.detect(env) ⇒ Object
Detect current server using software Rack string.
Class Method Details
.detect(env) ⇒ Object
Detect current server using software Rack string
10 11 12 13 14 15 16 17 |
# File 'lib/rack/websocket/handler.rb', line 10 def self.detect(env) server_software = env['SERVER_SOFTWARE'] if server_software.match(/\Athin /i) Thin else Stub end end |