aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-02-07 14:23:19 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-02-07 14:23:19 +0000
commitb8e4c78abba471ec3bcce29237644df24925d1a7 (patch)
treeb14f890045873a85d31961015685cfafea0b7f15 /actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb
parent098fa943565e06dafa67ca59ccf433939d2941b4 (diff)
downloadrails-b8e4c78abba471ec3bcce29237644df24925d1a7.tar.gz
rails-b8e4c78abba471ec3bcce29237644df24925d1a7.tar.bz2
rails-b8e4c78abba471ec3bcce29237644df24925d1a7.zip
Fixed that query params could be forced to nil on a POST due to the raw post fix #562 [moriq@moriq.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@526 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb')
-rw-r--r--actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb8
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 ce6722f3a4..1905fdf9b2 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
@@ -14,7 +14,7 @@ class CGI #:nodoc:
@params = CGI::parse(read_query_params)
end
- @cookies = CGI::Cookie::parse((env_table['HTTP_COOKIE'] or env_table['COOKIE']))
+ @cookies = CGI::Cookie::parse((env_table['HTTP_COOKIE'] || env_table['COOKIE']))
end
private
@@ -30,13 +30,13 @@ class CGI #:nodoc:
case env_table['REQUEST_METHOD']
when 'GET', 'HEAD'
if defined? MOD_RUBY
- Apache::request.args or ''
+ Apache::request.args || ''
else
- env_table['QUERY_STRING'] or ''
+ env_table['QUERY_STRING'] || ''
end
when 'POST'
stdinput.binmode if stdinput.respond_to?(:binmode)
- content = stdinput.read(Integer(env_table['CONTENT_LENGTH'])) or ''
+ content = stdinput.read(Integer(env_table['CONTENT_LENGTH'])) || ''
env_table['RAW_POST_DATA'] = content.freeze
else
read_from_cmdline