Sha256: 901d8a74a586bfbf0fec41aa1023e424e0ea425877d3248737d24d4c2e139f0e

Contents?: true

Size: 688 Bytes

Versions: 84

Compression:

Stored size: 688 Bytes

Contents

require 'cgi'

module ActionController
  module CgiExt
    # Publicize the CGI's internal input stream so we can lazy-read
    # request.body. Make it writable so we don't have to play $stdin games.
    module Stdinput
      def self.included(base)
        base.class_eval do
          remove_method :stdinput
          attr_accessor :stdinput
        end

        base.alias_method_chain :initialize, :stdinput
      end

      def initialize_with_stdinput(type = nil, stdinput = $stdin)
        @stdinput = stdinput
        @stdinput.set_encoding(Encoding::BINARY) if @stdinput.respond_to?(:set_encoding)
        initialize_without_stdinput(type || 'query')
      end
    end
  end
end

Version data entries

84 entries across 81 versions & 17 rubygems

Version Path
actionpack-2.3.18 lib/action_controller/cgi_ext/stdinput.rb
actionpack_csi-2.3.5.p8 lib/action_controller/cgi_ext/stdinput.rb
actionpack-2.3.17-rack-upgrade-2.3.17 lib/action_controller/cgi_ext/stdinput.rb
actionpack-2.3.17 lib/action_controller/cgi_ext/stdinput.rb
actionpack_csi-2.3.5.p7 lib/action_controller/cgi_ext/stdinput.rb
actionpack_csi-2.3.5.p6 lib/action_controller/cgi_ext/stdinput.rb
actionpack-2.3.16 lib/action_controller/cgi_ext/stdinput.rb
actionpack-rack-upgrade-2-2.3.16 lib/action_controller/cgi_ext/stdinput.rb
actionpack-rack-upgrade-2-2.3.15 lib/action_controller/cgi_ext/stdinput.rb
actionpack-2.3.15 lib/action_controller/cgi_ext/stdinput.rb
actionpack-rack-upgrade-2.3.16 lib/action_controller/cgi_ext/stdinput.rb
actionpack-rack-upgrade-2.3.15 lib/action_controller/cgi_ext/stdinput.rb
actionpack-rack-upgrade-2.3.14 lib/action_controller/cgi_ext/stdinput.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/cgi_ext/stdinput.rb
vanity-1.7.1 vendor/ruby/1.9.1/gems/actionpack-2.3.12/lib/action_controller/cgi_ext/stdinput.rb
actionpack-2.3.14 lib/action_controller/cgi_ext/stdinput.rb
kajam-1.0.3.rc2 vendor/rails/actionpack/lib/action_controller/cgi_ext/stdinput.rb
actionpack-2.3.12 lib/action_controller/cgi_ext/stdinput.rb
radiant-1.0.0.rc2 vendor/rails/actionpack/lib/action_controller/cgi_ext/stdinput.rb
radiant-1.0.0.rc1 vendor/rails/actionpack/lib/action_controller/cgi_ext/stdinput.rb