Section Search

While the details of the Search section of a HttpParsingRule are applied to any HTTP response (with the goal to extract rule hits which are candidates for future replacements), the Search section of a StringScriptingRule is applied to the string being scripted, with the goal to extract substrings that should be treated in a special way. All techniques how substrings can be extracted (see “Section Search - Finding Rule Hits”) can also be used in the Search section of a StringScriptingRule.

The only difference is the meaning of the attribute SearchIn:

For a HttpParsingRule, the attribute SearchIn specifies where to look for rule hits. Allowed values are: Header, Body, All.

For a StringScriptingRule, the attribute SearchIn specifies a list of script locations where this rule should be applied. This can be a list of script locations for the condition type Scripting, as described in “Scripting Condition”.

Additionally, there are two new script locations HeaderName and HeaderValue, which identify the two parameters of the function WebHeaderAdd. See “Additional ApplyTo values” for detailed information.

There is one additional possibility how to search for substrings (which is also applicable in the Search section of a HttpParsingRule):

The attribute Special allows to specify a special search algorithm. The only value currently supported is SiebelParam. This will search the string for any substring that looks like a length-prefixed value as it is used in the Siebel 7 Web application.

<StringScriptingRule>
  <Name>SiebelParam Function Call</Name>
  <Active>true</Active>
  <Search>
    <SearchIn>FormFieldValue</SearchIn>
    <Special>SiebelParam</Special>
    <Conditions>
    </Conditions>
  </Search>
  <ScriptGen>
    <Action>CheckSiebelParam</Action>
  </ScriptGen>
</StringScriptingRule>