shawno_84086
Feb 06, 2012Nimbostratus
response collect error payload respond
I have a stupid application that is throwing errors but using an http status of 200 to do so. I have written this irule snippet to replace the responses,
when HTTP_RESPONSE {
if { [HTTP::status] == 200} {
HTTP::collect 50 }
}
when HTTP_RESPONSE_DATA {
if { [HTTP::payload] contains "reported an error" } {
HTTP::respond 404 }
}
and it works, but i'm curious about the HTTP::collect element. I have set it to 1 and set it to a million, and my connection doesn't stall and it works and the response time is about the same. what is a recommended collection amount? what is the unit of measure for integers and this command? i'm assuming bytes.
Thanks,
Shawn