From 2f11b7cfeeb9a25225c2f31e95afabcd3e43bb41 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 25 Jan 2005 11:15:26 +0000 Subject: 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 --- actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_controller/cgi_ext') 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 -- cgit v1.2.3