Forum Discussion
mike_108881
Nimbostratus
Jan 08, 2010stream::expression just won't work
I'm running 9.4.6 and trying the most basic stream replacement possible. I have set the default stream profile on the virtual server and am trying to use an iRule to do a replacement:
when HTTP_RESPONSE {
Disable the stream filter by default
STREAM::disable
Check if response type is text
if {[HTTP::header value Content-Type] contains "text"}{
STREAM::expression "@test@blah@"
STREAM::enable
}
}
The response body contains "This is a test"
I did some logging and it does not find a match for "test". Occasionally it will find a match when I use a single letter, and sometimes it messes up the response so I get page cannot be displayed. I've never got it to find a match with more than one letter as the target text.
There has to be something obvious I'm missing here. Any help is appreciated.
4 Replies
- naladar_65658
Altostratus
I haven't messed with stream replacement in an iRule before mike, but the examples I have seen don't use quotation marks around @test@blah@ - mike_108881
Nimbostratus
Thanks for the link. I've read through that. The thing is I'm doing this exactly like every example I've seen but it just doesn't do anything. - hoolio
Cirrostratus
Is the response payload compressed? LTM won't decompress the the response content, so you need to disable compression on the servers or remove the Accept-Encoding header from the request. - mike_108881
Nimbostratus
Thanks Aaron, that was it. IIS was set to compress the response. Apparently this is the default setting for web sites within IIS 7.5.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects