Parent

Methods

Unicorn::App::OldRails

Implements a handler that can run Rails.

Public Instance Methods

call(env) click to toggle source
# File lib/unicorn/app/old_rails.rb, line 19
def call(env)
  cgi = Unicorn::CGIWrapper.new(env)
  begin
    Dispatcher.dispatch(cgi,
        ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS,
        cgi.body)
  rescue => e
    err = env['rack.errors']
    err.write("#{e} #{e.message}\n")
    e.backtrace.each { |line| err.write("#{line}\n") }
  end
  cgi.out  # finalize the response
  cgi.rack_response
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.