|
|
@@ -83,7 +83,7 @@ module Agents
|
83
|
83
|
payload = { 'url' => url, 'response_received' => false, 'elapsed_time' => total_time }
|
84
|
84
|
|
85
|
85
|
# Deal with failures
|
86
|
|
- if measured_result.status != 0
|
|
86
|
+ if current_status != 0
|
87
|
87
|
final_url = boolify(options['disable_redirect_follow']) ? url : measured_result.to_hash[:url]
|
88
|
88
|
payload.merge!({ 'final_url' => final_url, 'redirected' => (url != final_url), 'response_received' => true, 'status' => current_status })
|
89
|
89
|
# Deal with headers
|
|
|
@@ -97,7 +97,7 @@ module Agents
|
97
|
97
|
memory['last_status'] = measured_result.status.to_s
|
98
|
98
|
else
|
99
|
99
|
create_event payload: payload
|
100
|
|
- memory['last_status'] = nil
|
|
100
|
+ memory['last_status'] = 0
|
101
|
101
|
end
|
102
|
102
|
|
103
|
103
|
end
|