Forum Discussion
bl0ndie_127134
Oct 31, 2005Historic F5 Account
Expression syntax :
The expression syntax should be fairly familiar to most UNIX users, as it’s a 'SED' like replacement pairs of source and targets shown below. expression := /// // //. If the *last* target expression is empty, then a match event will be fired but there will be no replacement performed. The only caveat is that an empty target *must* be specified in the *last* expression. When the filter matches one of the expressions say for example ‘source1’, the matching content will be replaced by ‘target1’.
Configuration :
The new stream behavior can be enabled by applying the new expression to the ‘target’ stream profile and leaving the ‘source’ profile *empty*. If both ‘source’ and ‘target’ values are set, the stream filter will default to the original behavior of looking for string literals.
STREAM_MATCHED - Fired when a when a stream expression matches. This event can be used to skip or change the replacement target.
STREAM::disable - Disables any further processing on the stream filter for this connection. This can be called from HTTP events.
STREAM::enable - Enables the stream filter. This can be called from HTTP events.
STREAM::expression - Replace the stream expression specified in the profile with this value. The syntax is identical to the profile syntax. NOTE that this change affects just this connection and is sticky for the duration of the connection. Use this rule wisely!
STREAM::match - Returns the matching characters.
STREAM::replace [] - Can be used to change the target replacement string specified in the profile. This call is not sticky and will be applied only once during the current match. If the ‘target’ expression is missing, the replacement will be skipped.