Forum Discussion
Chris_Wentland
Apr 07, 2017Nimbostratus
Hey Josiah! Basically, yes. That was my initial suspicion of what was occurring, although I am able to request specifically the /vdesk/resource_list.xml after logging in, and it will not process the HTTP_response section either. As a test,I logged in to the webtop. I changed the HTTP_response section to set the flag to 1 to begin with instead of zeroing it. I then changed my URL to /vdesk.resource_list.xml and the page loads. I never get a log entry from HTTP_response or HTTP_response_data.
If you take this exact same iRule and replace the file with resource_info_v2.xml, it works with no issues. I've got that irule (listed below) applied to the same VS and it hits every time with no issues.
when CLIENT_ACCEPTED {
Required in order to fire HTTP_* events on an APM enabled virtual server.
ACCESS::restrict_irule_events disable
}
when HTTP_REQUEST {
set debug 1
set resource_info_capture 0
if {$debug} { log local0. "Setting resource_list_capture variable to $resource_info_capture" }
if {$debug} { log local0. "HTTP Resquest for: [HTTP::uri] " }
if { [HTTP::path] ends_with "/resource_info_v2.xml" } {
set capture_path [HTTP::path]
if {$debug} { log local0.alert "resource_info_v2.xml request Identified" }
set resource_info_capture 1
if {$debug} { log local0. "Flag to capture resource_info_v2.xml is set: $resource_info_capture" }
}
}
when HTTP_RESPONSE {
if { $resource_info_capture } {
if {$debug} { log local0. "Original request path: $capture_path" }
if {$debug} { log local0. "Flag to capture resource_info_v2.xml in HTTP Response: $capture_path" }
if { [HTTP::header exists "Content-Length"] and [HTTP::header "Content-Length"] <= 1048576 } {
HTTP::collect [HTTP::header Content-Length]
} else {
HTTP::collect 1048576
}
} else {
if {$debug} { log local0. "Flag to capture resource_info_v2.xml NOT FOUND during HTTP Response" }
}
}
when HTTP_RESPONSE_DATA {
if { $resource_info_capture } {
if {$debug} { log local0. "Flag to capture resource_info_v2.xml in HTTP Response DATA: $resource_info_capture" }
set log_payload [HTTP::payload]
if {$debug} { log local0. "HTTP Payload: [HTTP::payload]" }
} else {
if {$debug} { log local0. "Flag to capture resource_info_v2.xml NOT FOUND during HTTP Response Data" }
}
}