Class Index [+]

Quicksearch

PhusionPassenger::Railz::RequestHandler

A request handler for Ruby on Rails applications.

Constants

NINJA_PATCHING_LOCK

Public Class Methods

new(owner_pipe, options = {}) click to toggle source
    # File lib/phusion_passenger/railz/request_handler.rb, line 38
38:         def initialize(owner_pipe, options = {})
39:                 super(owner_pipe, options)
40:                 NINJA_PATCHING_LOCK.synchronize do
41:                         ninja_patch_action_controller
42:                 end
43:         end

Protected Instance Methods

process_request(headers, input, output) click to toggle source

Overrided method.

    # File lib/phusion_passenger/railz/request_handler.rb, line 47
47:         def process_request(headers, input, output)
48:                 headers[CONTENT_LENGTH] = headers[HTTP_CONTENT_LENGTH]
49:                 cgi = CGIFixed.new(headers, input, output)
50:                 ::Dispatcher.dispatch(cgi,
51:                         ::ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS,
52:                         cgi.stdoutput)
53:         end

Private Instance Methods

ninja_patch_action_controller() click to toggle source
    # File lib/phusion_passenger/railz/request_handler.rb, line 56
56:         def ninja_patch_action_controller
57:                 if !@@ninja_patched_action_controller && defined?(::ActionController::Base)                  && ::ActionController::Base.private_method_defined?(:perform_action)
58:                         @@ninja_patched_action_controller = true
59:                         ::ActionController::Base.class_eval do
60:                                 alias passenger_orig_perform_action perform_action
61:                                 
62:                                 def perform_action(*whatever)
63:                                         headers[X_POWERED_BY] = PASSENGER_HEADER
64:                                         passenger_orig_perform_action(*whatever)
65:                                 end
66:                         end
67:                 end
68:         end
perform_action(*whatever) click to toggle source
    # File lib/phusion_passenger/railz/request_handler.rb, line 63
63:                                 def perform_action(*whatever)
64:                                         headers[X_POWERED_BY] = PASSENGER_HEADER
65:                                         passenger_orig_perform_action(*whatever)
66:                                 end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.