Previous Post of code was messed up:
If you are going to use a Stream Profile in an iRule you need several things.
1. A Blank Stream Profile (create a stream profile, name it, and save it with the options empty)
2. An HTTP Profile (Suggest building a Custom Profile for using a Stream Profile with an iRule) that has "Response Chunking" set to "Rechunk"
3. The iRule. This is also the way that you can "Overload" a Stream Profile to do multiple replacements (You can do it to a normal stream profile as well, but you have to totally do it command line).
Stream Profile:
-----------------------------------------------------------------
profile stream blank.stream.profile {
defaults from stream
}
iRule 1:
-----------------------------------------------------------------
when HTTP_RESPONSE {
STREAM::disable
STREAM::expression "@Hello@45678@ @Goodbye@12345@"
STREAM::enable
}
}
iRule 2:
-----------------------------------------------------------------
when HTTP_REQUEST {
set uri [HTTP::uri]
}
when HTTP_RESPONSE {
STREAM::disable
STREAM::expression "@Hello@45678@ @Goodbye@12345@"
if { !($uri contains "somefile.xml") || !($uri contains "/some/folder/") } {
STREAM::enable
}
}