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-01-25 11:15:26 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-01-25 11:15:26 +0000
commit2f11b7cfeeb9a25225c2f31e95afabcd3e43bb41 (patch)
tree178cbe46704edea6a8d88cd727636ecbb7b2fa73 /actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb
parentfd67e3befc748e91b4ad0b09be7f3cca69bb7380 (diff)
downloadrails-2f11b7cfeeb9a25225c2f31e95afabcd3e43bb41.tar.gz
rails-2f11b7cfeeb9a25225c2f31e95afabcd3e43bb41.tar.bz2
rails-2f11b7cfeeb9a25225c2f31e95afabcd3e43bb41.zip
Added @request.raw_post as a convenience access to @request.env['RAW_POST_DATA'] and fixed the patch problems with the session #534 [Tobias Luetke]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@502 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, 5 insertions, 3 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 706654e52b..ce6722f3a4 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
@@ -13,10 +13,12 @@ class CGI #:nodoc:
@multipart = false
@params = CGI::parse(read_query_params)
end
+
+ @cookies = CGI::Cookie::parse((env_table['HTTP_COOKIE'] or env_table['COOKIE']))
end
private
- MULTIPART_FORM_BOUNDARY_RE = %r|\Amultipart/form-data.*boundary=\"?([^\";,]+)\"?|n
+ MULTIPART_FORM_BOUNDARY_RE = %r|\Amultipart/form-data.*boundary=\"?([^\";,]+)\"?|n #"
def multipart_form_boundary
if env_table['REQUEST_METHOD'] == 'POST'
@@ -27,7 +29,7 @@ class CGI #:nodoc:
def read_query_params
case env_table['REQUEST_METHOD']
when 'GET', 'HEAD'
- if defined? MOD_RUBY
+ if defined? MOD_RUBY
Apache::request.args or ''
else
env_table['QUERY_STRING'] or ''
@@ -41,4 +43,4 @@ class CGI #:nodoc:
end
end
end # module QueryExtension
-end \ No newline at end of file
+end