Forum Discussion
stream profile-- using irule need to replace text
when i access a url, below is the page content displayed. InstallApplication
I am using stream profile with irule to replace the text "InstallApplication" with some garbage text. I tried below url with stream profile, this is not working. Kindly help.
when HTTP_REQUEST {
Disable the stream filter for client requests
STREAM::disable HTTP::header remove "Accept-Encoding" } when HTTP_RESPONSE {
Enable the stream filter for XML responses only
if { [HTTP::header value Content-Type] contains "text/xml"} {
Replace 'InstallApplication' with 'MisMatch000'
STREAM::expression {@InstallApplication@MisMatch000@} STREAM::enable } }
2 Replies
Hi,
I regularly use similar irule that do not rely on stream profiles :
when HTTP_REQUEST { HTTP::header remove "Accept-Encoding" } when HTTP_RESPONSE { if { [HTTP::header Content-Type] contains "text/xml" } { if { [HTTP::header exists "Content-Length"] } { set content_length [HTTP::header "Content-Length"] } else { set content_length 1000000 } if { $content_length > 0 } { HTTP::collect $content_length } } } when HTTP_RESPONSE_DATA { HTTP::payload replace 0 $content_length [string map "InstallApplication" "MisMatch000" [HTTP::payload]] HTTP::release }- JG
Cumulonimbus
They are HTML-encoded and you can treat those characters just as a string.
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