instance method process

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.2.3

Signature

process(request, response)

Construct a Mongrel::CGIWrapper and dispatch.

Parameters

request req
response req
Source
# File railties/lib/rails/mongrel_server/handler.rb, line 35
      def process(request, response)
        return if response.socket.closed?

        cgi = Mongrel::CGIWrapper.new(request, response)
        cgi.handler = self
        # We don't want the output to be really final until we're out of the lock
        cgi.default_really_final = false

        ActionController::Dispatcher.dispatch(cgi, ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS, response.body)

        # This finalizes the output using the proper HttpResponse way
        cgi.out("text/html",true) {""}
      rescue Errno::EPIPE
        response.socket.close
      rescue Object => rails_error
        STDERR.puts "#{Time.now.httpdate}: Error dispatching #{rails_error.inspect}"
        STDERR.puts rails_error.backtrace.join("\n")
      end

Defined in railties/lib/rails/mongrel_server/handler.rb line 35 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails::MongrelServer::RailsHandler

Type at least 2 characters to search.

↑↓ navigate · open · esc close