Forum Discussion
iRule inspecting body response
Hello Devcentral community,
How i can detect if the following content of the HTTP BODY is present in the HTTP RESPONSE ?
the following line :
this.location.replace ("
Thanks in advance,
BG
4 Replies
- giltjr
Nimbostratus
I think you can do something like:
STREAM::disable STREAM::expression "this.location.replace("https://" STREAM::enableThen use the STREAM_MATCHED event:
when STREAM_MATCHED { log local0. "Stream found." }You may need to play with it some, I can't remember exactly how to do this, but it can be done. You can search with stream and then NOT replace.
- MDPF52_180608
Nimbostratus
Hello when i try to log the payload of the response i can see that the output is in the following "format" : Iû¥ç€°¨±%¯$CØ=û¿ß‘_±CÒ$½ý¶¤ÑÌhæ7y¸V��œáš
³5ýezÅÜö8µŸ.�*ª|âL±O$:@|E¥¢.¼¢)+!ú”�¢µ KÛXR o˜2ӕÒ@‚ø¶!Õfׄ(ÃJW�P!³U„WÄ6¾ã N& $…+«×뵒)ÙòA03¿KؚÎ9•Ê«¹È--y-6S<,_Cÿ·_Â)How i can scan it successfully ? I expect that the response is an html format response.
Thank you.
- giltjr
Nimbostratus
Two possibilities:
1) the server is compressing the response 2) what you are looking at is a binary file: gif, png, jpeg, pdf, or something else like those.
- Arie
Altostratus
You should also be able to do this by using a Content Profile HTML Rule. It can trigger the corresponding event you can use in an iRule.
https://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ltm-profiles-reference-11-6-0/3.htmlreferenceid
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