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