3 module ActionController
5 # Publicize the CGI's internal input stream so we can lazy-read
6 # request.body. Make it writable so we don't have to play $stdin games.
8 def self.included(base
)
10 remove_method
:stdinput
11 attr_accessor
:stdinput
14 base
.alias_method_chain
:initialize, :stdinput
17 def initialize_with_stdinput(type
= nil, stdinput
= $stdin)
19 @stdinput.set_encoding(Encoding
::BINARY) if @stdinput.respond_to
?(:set_encoding)
20 initialize_without_stdinput(type
|| 'query')