Forum Discussion
http::respond in HTTP_RESPONSE
Hey guys,
i'm currently trying to write a iRule which spits out a HTML site for redirection purposes.
For this I have a HTTP_REQUEST in which I set a varible. In the HTTP_RESPONSE i check if this variable exists and if the status code is 404.
If so, I do a HTTP::respond 200 content "...html content here"
I tried it before without the status code check and put the same HTTP::respond code within the HTTP_REQUEST part which was working like a charm.
But as soon as I put it within the HTTP_RESPONSE part the site just gives me a RESET.
I also tried it plain without any ifs which also wasn't working.
when HTTP_RESPONSE {
log local0. "Test"
HTTP::respond 200 content "bla"
}
The HTTP_RESPONSE fires which I can see in the log but then I just get a reset.
Do you know this behavior? Am I doing anythin wrong??
Best Regards
Sam
1 Reply
- nitass
Employee
does curl work?[root@ve10:Active] config b virtual bar list virtual bar { snat automap pool foo destination 172.28.19.252:80 ip protocol 6 rules myrule profiles { http {} tcp {} } } [root@ve10:Active] config b rule myrule list rule myrule { when HTTP_RESPONSE { log local0. "Test" HTTP::respond 200 content "bla\r\n" } } [root@ve10:Active] config curl -i http://172.28.19.252 HTTP/1.0 200 OK Server: BigIP Connection: Keep-Alive Content-Length: 5 bla
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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