class PhusionPassenger::Railz::RequestHandler

A request handler for Ruby on Rails applications.

def initialize(owner_pipe, options = {})

def initialize(owner_pipe, options = {})
	super(owner_pipe, options)
	NINJA_PATCHING_LOCK.synchronize do
		ninja_patch_action_controller
	end
end

def ninja_patch_action_controller

def ninja_patch_action_controller
	if !@@ninja_patched_action_controller && defined?(::ActionController::Base) \
	&& ::ActionController::Base.private_method_defined?(:perform_action)
		@@ninja_patched_action_controller = true
		::ActionController::Base.class_eval do
			alias passenger_orig_perform_action perform_action
			
			def perform_action(*whatever)
				headers[X_POWERED_BY] = PASSENGER_HEADER
				passenger_orig_perform_action(*whatever)
			end
		end
	end
end

def perform_action(*whatever)

def perform_action(*whatever)
	headers[X_POWERED_BY] = PASSENGER_HEADER
	passenger_orig_perform_action(*whatever)
end

def process_request(headers, input, output)

Overrided method.
def process_request(headers, input, output)
	cgi = CGIFixed.new(headers, input, output)
	::Dispatcher.dispatch(cgi,
		::ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS,
		cgi.stdoutput)
end