Class: Rack::SockJS::MissingHandler
- Inherits:
-
Object
- Object
- Rack::SockJS::MissingHandler
- Defined in:
- lib/rack/sockjs.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(options) ⇒ MissingHandler
constructor
A new instance of MissingHandler.
Constructor Details
#initialize(options) ⇒ MissingHandler
Returns a new instance of MissingHandler.
73 74 |
# File 'lib/rack/sockjs.rb', line 73 def initialize() end |
Instance Method Details
#call(env) ⇒ Object
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/rack/sockjs.rb', line 76 def call(env) prefix = env["PATH_INFO"] method = env["REQUEST_METHOD"] body = " <!DOCTYPE html>\n <html>\n <body>\n <h1>Handler Not Found</h1>\n <ul>\n <li>Prefix: \#{prefix.inspect}</li>\n <li>Method: \#{method.inspect}</li>\n </ul>\n </body>\n </html>\n HTML\n ::SockJS.debug \"Handler not found!\"\n [404, {\"Content-Type\" => \"text/html; charset=UTF-8\", \"Content-Length\" => body.bytesize.to_s}, [body]]\nend\n" |