Class: Thin::FunRackLike
- Defined in:
- lib/thin/fun_embed.rb
Constant Summary collapse
- ASYNC_CALLBACK =
'async.callback'.freeze
- FUN_EMBED =
'async.fun_embed'.freeze
- AsyncResponse =
[-1, {}.freeze, [].freeze].freeze
Constants inherited from FunEmbed
Thin::FunEmbed::CLOSE, Thin::FunEmbed::CONNECTION, Thin::FunEmbed::CONTENT_LENGTH, Thin::FunEmbed::CONTENT_LENGTH_DT, Thin::FunEmbed::FULL_KEEP_ALIVE, Thin::FunEmbed::HTTP_STATUS_CODES, Thin::FunEmbed::KEEP_ALIVE, Thin::FunEmbed::NL, Thin::FunEmbed::RN, Thin::FunEmbed::RNRN, Thin::FunEmbed::TEXT_PLAIN, Thin::FunEmbed::VERSION
Constants included from Thin::FunEmbed::Constants
Thin::FunEmbed::Constants::DELETE, Thin::FunEmbed::Constants::GET, Thin::FunEmbed::Constants::PATH_INFO, Thin::FunEmbed::Constants::POST, Thin::FunEmbed::Constants::PUT, Thin::FunEmbed::Constants::QUERY_STRING, Thin::FunEmbed::Constants::REQUEST_METHOD, Thin::FunEmbed::Constants::SCRIPT_NAME, Thin::FunEmbed::Constants::SERVER_NAME, Thin::FunEmbed::Constants::SERVER_PORT
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
Attributes inherited from FunEmbed
Instance Method Summary collapse
Methods inherited from FunEmbed
#consider_keep_alive, #force_close!, #post_init, #receive_data, #send_200_ok, #send_rack_response, #send_raw_string, #send_status_body, #unbind
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
199 200 201 |
# File 'lib/thin/fun_embed.rb', line 199 def app @app end |
Instance Method Details
#handle_http_request(env) ⇒ Object
203 204 205 206 207 208 209 210 |
# File 'lib/thin/fun_embed.rb', line 203 def handle_http_request(env) env[ASYNC_CALLBACK] = method(:send_rack_response) env[FUN_EMBED] = self res = app.call(env) if res[0] != -1 send_rack_response(*res) end end |