Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ruby 1.9 compat: don't confuse with headers method call

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9188 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 09ca8a6701b023f5658cb5e8c0da9ffa5792e61d 1 parent b79f7d1
@jeremy jeremy authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionpack/lib/action_controller/integration.rb
View
6 actionpack/lib/action_controller/integration.rb
@@ -306,10 +306,10 @@ def process(method, path, parameters = nil, headers = nil)
# Parses the result of the response and extracts the various values,
# like cookies, status, headers, etc.
def parse_result
- headers, result_body = @result.split(/\r\n\r\n/, 2)
+ response_headers, result_body = @result.split(/\r\n\r\n/, 2)
@headers = Hash.new { |h,k| h[k] = [] }
- headers.each_line do |line|
+ response_headers.to_s.each_line do |line|
key, value = line.strip.split(/:\s*/, 2)
@headers[key.downcase] << value
end
@@ -319,7 +319,7 @@ def parse_result
@cookies[name] = value
end
- @status, @status_message = @headers["status"].first.split(/ /)
+ @status, @status_message = @headers["status"].first.to_s.split(/ /)
@status = @status.to_i
end
Please sign in to comment.
Something went wrong with that request. Please try again.