Forum Discussion
Search word in body content
Dear,
I run into the problem of making a irule you find a word in the body of the page that loads and take an action.
Try something like this but does not work
September static :: errocuerpo "invalid"
} Elseif {[findstr [HTTP :: payload] $ static :: errocuerpo] == "invalid"} { log local0. "login fail" }
The method without static group are?
thanks
2 Replies
- PeteWhite
Employee
Try this:
set static::errocuerpo {invalid} when HTTP_RESPONSE { if { [findstr [HTTP::payload] $static::errocuerpo] } { log local.0 "Login Fail" } } - IheartF5_45022
Nacreous
You can't reference HTTP::payload until you have actively collected the content. You can then examine HTTP::payload within the HTTP_RESPONSE_DATA event. There is an example here https://devcentral.f5.com/wiki/irules.HTTP__collect.ashx.
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