Methods, Context, Usage – Brocade Virtual ADX OpenScript API Guide (Supporting ADX v03.1.00) User Manual
Page 122: Input parameters
110
Brocade Virtual ADX OpenScript API Guide
53-1003243-01
Methods
9
•
Content Inspection API operations are transactional:
-
The matching and replacing of content are within the boundary of each HTTP transaction.
You can choose to turn on or off content inspection based on predefined parameters such
as HTML Content-Type.
-
There is no partial matching capability. When scanning content for a pattern, either there
is a match or there is not. When replacement strings are placed into the content, it is final
and the content cannot be restored to its original string.
•
Brocade Virtual ADX does not withhold payload data any longer than necessary. After it
examines the payload for pattern matching and the content requires no further action, the
Brocade Virtual ADX immediately forwards the payload.
Methods
OS_PAYLOAD_INSPECT::substitute(regexp1, string1, [regexp2, string2
…])
Specifies the regular expressions to match and replace them with strings.
Context
This function can be called by the HTTP_REQUEST or HTTP_RESPONSE event.
Usage
Replaces the matched expression with the next string. Replacement strings are fixed length only.
The match and replacement are transactional and can affect subsequent match and replace
operations. You can provide a maximum of three pairs of input parameters. If you enter more than
three parameters, the additional parameters are silently dropped but debugging messages are
displayed.
Input parameters
The following table contains the input values.
TABLE 130
Input values
Name
Type
Description
regexp1
regular expression
The regular expression to match with a maximum length of
128 bytes.
string1
string
The replacement string for the regexp1 matched regular expression.
The string can be a fixed length only with a maximum length of
128 bytes.
regexp2
regular expression
An optional additional regular expression to match with a maximum
length of 128 bytes.
string2
string
The replacement string for the regexp2 matched regular expression.
The string can be a fixed length only with a maximum length of
128 bytes.