Forum Discussion
ramann_75062
Nimbostratus
Jan 25, 2008Change Response Code
Hi @all,
is the a way to change the resonse code from a web server?
For example:
The Client call http://www.example.com/test.html
Then the client will get the contend from the requestet side but with return code 210 and not with return code 200
Thanks for help
bjoern
- JRahm
Admin
here's how to do it, though I wasn't sure which code you wanted it changed to, so reverse them if I got it wrong.when HTTP_RESPONSE { if { [HTTP::status] == 210 } { HTTP::collect [HTTP::header Content-Length] } } when HTTP_RESPONSE_DATA { HTTP::respond 200 content [HTTP::payload] }
- ramann_75062
Nimbostratus
it works! - hoolio
Cirrostratus
Out of curiosity, is 210 just an example? It's not defined in RFC2616 and I've never heard of it. Regardless, can you explain why you want to change the response that the app is responding with? - ramann_75062
Nimbostratus
our caching provieder is ask the status for the waintroom on our webservers with the status code 210 - ramann_75062
Nimbostratus
do i disable http 1.1 with this irule? - JRahm
Admin
Hmmm, I'm not really an app guy, so I tend to forget about the details...good catch. I would try the stream profile myself, but you could also just collect X if the content-length header isn't there as detailed in this thread:
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