Sha256: 1fd8ba99b827261c3946c0f10b05941f8093c91dc6eb6f2807e8ca44d2e01a6a

Contents?: true

Size: 683 Bytes

Versions: 97

Compression:

Stored size: 683 Bytes

Contents

require 'cgi'

class CGI #:nodoc:
  module QueryExtension
    # Remove the old initialize_query method before redefining it.
    remove_method :initialize_query

    # Neuter CGI parameter parsing.
    def initialize_query
      # Fix some strange request environments.
      env_table['REQUEST_METHOD'] ||= 'GET'

      # POST assumes missing Content-Type is application/x-www-form-urlencoded.
      if env_table['CONTENT_TYPE'].blank? && env_table['REQUEST_METHOD'] == 'POST'
        env_table['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'
      end

      @cookies = CGI::Cookie::parse(env_table['HTTP_COOKIE'] || env_table['COOKIE'])
      @params = {}
    end
  end
end

Version data entries

97 entries across 94 versions & 18 rubygems

Version Path
vibes-bj-1.2.2 spec/rails_root/vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb
vibes-bj-1.2.1 spec/rails_root/vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb
webroar-0.4.0 src/admin_panel/vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb
radiant-0.9.1 vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb
actionpack-2.3.8 lib/action_controller/cgi_ext/query_extension.rb
actionpack-2.3.8.pre1 lib/action_controller/cgi_ext/query_extension.rb
actionpack-2.3.7 lib/action_controller/cgi_ext/query_extension.rb
actionpack-2.3.6 lib/action_controller/cgi_ext/query_extension.rb
radiant-0.8.2 vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb
radiant-0.9.0.rc2 vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb
webroar-0.3.1 src/admin_panel/vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb
webroar-0.3.0 src/admin_panel/vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/actionpack/pkg/actionpack-2.2.2/lib/action_controller/cgi_ext/query_extension.rb
usher-0.7.0 spec/rails2_3/vendor/rails/vendor/rails/actionpack/pkg/actionpack-2.3.3/lib/action_controller/cgi_ext/query_extension.rb
usher-0.7.0 spec/rails2_3/vendor/rails/vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb
ginst-2009.12.8 vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb
actionpack-2.3.5 lib/action_controller/cgi_ext/query_extension.rb
ginst-2009.11.24 vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb
ginst-2009.11.23 vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb