ScriptCookieDomainAsRequestHost

Usually, when recording a client-side cookie, Silk Performer uses a generic form for the domain attribute. The domain is cropped by the first dot, for example: http://demo.borland.com/testsite will be cropped to .borland.com. Usually, this is the desired behaviour, because such a cookie is valid for a variety of domains, including demo.borland.com and example.borland.com regarding the above example.

The recording rule ScriptCookieDomainAsRequestHost defines the domain for a cookie more precisely. The domain attribute matches exactly the request host.

The recording rule can be applied to certain cookies, by adding the name of the cookie to the <data> tag.

<HttpScriptingRule>
  <Name>MyCookieRecordingRule</Name>
  <Active>true</Active>
  <Action>ScriptCookieDomainAsRequestHost</Action>
  <Conditions>
    <CompareData>
      <ApplyTo>Cookie</ApplyTo>
      <Data>MyClientsideTestCookie</Data>
    </CompareData>
  </Conditions>
</HttpScriptingRule>