Skip to content

Commit

Permalink
Bump Rack to 1.0.1. Ensure integration test input is ASCII.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Nov 9, 2009
1 parent a3e129f commit fd0289f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller.rb
Expand Up @@ -31,7 +31,7 @@
end
end

gem 'rack', '~> 1.0.0'
gem 'rack', '~> 1.0.1'
require 'rack'
require 'action_controller/cgi_ext'

Expand Down
4 changes: 3 additions & 1 deletion actionpack/lib/action_controller/integration.rb
Expand Up @@ -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,
Expand Down

0 comments on commit fd0289f

Please sign in to comment.