Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v2.1.0) is shown here.
parse_result()
private
Parses the result of the response and extracts the various values, like
cookies, status, headers, etc.
# File actionpack/lib/action_controller/integration.rb, line 310
def parse_result
response_headers, result_body = @result.split(/\r\n\r\n/, 2)
@headers = Hash.new { |h,k| h[k] = [] }
response_headers.to_s.each_line do |line|
key, value = line.strip.split(/:\s*/, 2)
@headers[key.downcase] << value
end
(@headers['set-cookie'] || [] ).each do |string|
name, value = string.match(/^([^=]*)=([^;]*);/)[1,2]
@cookies[name] = value
end
@status, @status_message = @headers["status"].first.to_s.split(/ /)
@status = @status.to_i
end