Forum Discussion
jvuong004_98902
Oct 14, 2011Nimbostratus
Stream::Replace Will Not Work
Hopefully someone can help me out and tell me what I'm doing wrong. I currently am trying to append a domain name to an IMAP login name. I am able to do so with a simple regular expression in STREAM...
Michael_Yates
Oct 14, 2011Nimbostratus
Hi jvuong004,
Try moving the STREAM::expression to the HTTP_RESPONSE event since a stream profile replaces things on the response and inside of your STREAM_MATCHED, execute the replacement for each of your stream expressions.
when HTTP_RESPONSE {
STREAM::expression ":foo:: :bar::"
STREAM::enable
}
when STREAM_MATCHED {
log local0. "Stream filter matched: [STREAM::match]"
STREAM::replace "[string map {"foo" "I replaced foo" "bar" "I replaced bar"} [STREAM::match]]"
}
Hope this helps.
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