Forum Discussion
spark_86682
Feb 29, 2012Historic F5 Account
If I understand you correctly, you're trying to sometimes alter the HTTP status code of a response passing through the BIG-IP. You could just do this at the TCP level and bypass all of the messing about at the HTTP layer altogether. Something like (totally untested):
when SERVER_CONNECTED {
if { $should_alter_response_status } {
TCP::collect 12
}
}
when SERVER_DATA {
set payload [TCP::payload 12]
regsub 200 $payload 503 payload
TCP::payload replace 0 12 $payload
TCP::release
}