Skip to content

Commit

Permalink
Fix a bug where redirected is always true
Browse files Browse the repository at this point in the history
This key was introduced in #1590 but it is likely that it has never
worked as expected.
  • Loading branch information
knu committed Nov 23, 2016
1 parent b8d88aa commit 833985d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/agents/http_status_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def check_this_url(url, local_headers)

# Deal with failures
if measured_result.result
final_url = boolify(interpolated['disable_redirect_follow']) ? url : measured_result.result.to_hash[:url]
final_url = boolify(interpolated['disable_redirect_follow']) ? url : measured_result.result.env.url.to_s
payload.merge!({ 'final_url' => final_url, 'redirected' => (url != final_url), 'response_received' => true, 'status' => current_status })
# Deal with headers
if local_headers.present?
Expand Down

0 comments on commit 833985d

Please sign in to comment.