Forum Discussion

shawno_84086's avatar
Icon for Nimbostratus rankNimbostratus
Feb 06, 2012

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,






if { [HTTP::status] == 200} {


HTTP::collect 50 }






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.












1 Reply

  • i think we should collect only amount of data we need i.e. reported an error message. the length is in octets (8-bit bytes).