Forum Discussion
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
- nitassEmployeei think we should collect only amount of data we need i.e. reported an error message. the length is in octets (8-bit bytes).
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects