diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-04 09:39:41 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-04 09:39:41 +0000 |
commit | 8b2598bb644b9c06eea0ab4a107c4f94b31c99db (patch) | |
tree | a33020be6bb02b87be47135f6e2a4d2a367628eb /actionpack/lib | |
parent | dacb61c8ca37154e9a813abc964df7f7973cea97 (diff) | |
download | rails-8b2598bb644b9c06eea0ab4a107c4f94b31c99db.tar.gz rails-8b2598bb644b9c06eea0ab4a107c4f94b31c99db.tar.bz2 rails-8b2598bb644b9c06eea0ab4a107c4f94b31c99db.zip |
Made it default to assuming a GET request and reading from command-line only in case of the new CMD method
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1282 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb b/actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb index d6dbbd737f..2a39c8c753 100644 --- a/actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb +++ b/actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb @@ -28,14 +28,14 @@ class CGI #:nodoc: def read_query_params case env_table['REQUEST_METHOD'] - when 'GET', 'HEAD', 'DELETE', 'OPTIONS' - (defined?(MOD_RUBY) ? Apache::request.args : env_table['QUERY_STRING']) || '' + when 'CMD' + read_from_cmdline when 'POST', 'PUT' stdinput.binmode if stdinput.respond_to?(:binmode) content = stdinput.read(Integer(env_table['CONTENT_LENGTH'])) || '' env_table['RAW_POST_DATA'] = content.split("&_").first.to_s.freeze # &_ is a fix for Safari Ajax postings that always append \000 - else - read_from_cmdline + else # when 'GET', 'HEAD', 'DELETE', 'OPTIONS' + (defined?(MOD_RUBY) ? Apache::request.args : env_table['QUERY_STRING']) || '' end end end # module QueryExtension |