Forum Discussion
EB-Peter
Apr 20, 2021Nimbostratus
STREAM::expression matches on single char only
STREAM::expression {@AUSEFPPKI03@ZZ.ZZ@} never matches on the string "AUSEFPPKI03". If I substitute it with just an "A" (or any other character in the string), it does match but obviously doesn't giv...
spalande
Nacreous
What does the logging says? Does it even find the string?
Would it be possible to try below iRule to see if this makes any difference just for testing?
when RULE_INIT {
set static::stream_response_body
{
"AUSEFPPKI03====ZZ.ZZ"
"ausefppki03====ZZ.ZZ"
}
}
when HTTP_REQUEST {
STREAM::disable
HTTP::header remove "Accept-Encoding"
}
when HTTP_RESPONSE {
if {[llength $static::stream_response_body] > 0}
{
set expression ""
foreach stream_request_rewriteRecord $static::stream_response_body
{
set stream_request_find [getfield $stream_request_rewriteRecord "====" 1]
set stream_request_replace [getfield $stream_request_rewriteRecord "====" 2]
if {$stream_request_replace == "nothing"}
{
set stream_request_replace ""
}
set expression "$expression@$stream_request_find@$stream_request_replace@"
}
if {[HTTP::header Content-Type] contains "text" } {
if { [catch
{
STREAM::expression $expression
STREAM::enable
} result] }
{
#log local0. "fffffffffff $result"
}
}
}
}
EB-Peter
Apr 21, 2021Nimbostratus
My logging shows a match on any single char, but no match for two or more consecutive chars in the string.
Your iRule produces the same http response as if there was no match.
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