Permalink
Browse files

Bump Rack to 1.0.1. Ensure integration test input is ASCII.

  • Loading branch information...
1 parent a3e129f commit fd0289f3ddf16ca08d6e9510dbf1a7e3ef4126df @jeremy jeremy committed Nov 9, 2009
Showing with 4 additions and 2 deletions.
  1. +1 −1 actionpack/lib/action_controller.rb
  2. +3 −1 actionpack/lib/action_controller/integration.rb
@@ -31,7 +31,7 @@
end
end
-gem 'rack', '~> 1.0.0'
+gem 'rack', '~> 1.0.1'
require 'rack'
require 'action_controller/cgi_ext'
@@ -269,7 +269,9 @@ def process(method, path, parameters = nil, headers = nil)
env["QUERY_STRING"] ||= ""
- data = data.is_a?(IO) ? data : StringIO.new(data || '')
+ data ||= ''
+ data.force_encoding(Encoding::ASCII_8BIT) if data.respond_to?(:force_encoding)
+ data = data.is_a?(IO) ? data : StringIO.new(data)
env.update(
"REQUEST_METHOD" => method.to_s.upcase,

0 comments on commit fd0289f

Please sign in to comment.