Forum Discussion
Wil_Schultz_101
Feb 28, 2012Nimbostratus
Need to change the HTTP Status code.
I have a maintenance page sitting on some servers, if all goes awry traffic is pointed at this page. I'd like to ba able to swap the status from HTTP 200 to HTTP 503. Can't seem to figure out a good w...
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
}
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