    # File lib/mongrel/rails.rb, line 50
          def process(request, response)
            return if response.socket.closed?

            path_info = request.params[Mongrel::Const::PATH_INFO]
            rest_operator = request.params[Mongrel::Const::REQUEST_URI][/^#{Regexp.escape path_info}(;[^\?]+)/, 1].to_s
            path_info.chomp!("/")

            page_cached = path_info + rest_operator + ActionController::Base.page_cache_extension
            get_or_head = @@file_only_methods.include? request.params[Mongrel::Const::REQUEST_METHOD]

            if get_or_head and @files.can_serve(path_info)
              # File exists as-is so serve it up
              @files.process(request,response)
            elsif get_or_head and @files.can_serve(page_cached)
              # Possible cached page, serve it up
              request.params[Mongrel::Const::PATH_INFO] = page_cached
              @files.process(request,response)
            else
              begin
                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

                @guard.synchronize {
                  @active_request_path = request.params[Mongrel::Const::PATH_INFO]
                  Dispatcher.dispatch(cgi, ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS, response.body)
                  @active_request_path = nil
                }

                # 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}: Error calling Dispatcher.dispatch #{rails_error.inspect}"
                STDERR.puts rails_error.backtrace.join("\n")
              end
            end
          end