DontModifyRequestHeader DontModifyResponseHeader

The recorder routinely modifies some request/response headers of HTTP traffic to ensure best recording results with common browsers. However, some uncommon user agents may misbehave when recorded.

An Action enables you to suppress the modification of request/response HTTP headers for individual requests, and thus allow for such recording problems.

Conditions can reference the header name and value, which can be modified in the ApplyTo tag using the values HeaderName and HeaderValue.

This example is from the Flex/AMF3 project type. This rule suppresses the modification of the Pragma and Cache-Control response header, if there is no Accept-Language request header.

<ProxyEngineRule>
  <Name>Suppress modification of some server response headers for HTTP requests coming from Shockwave/Flash</Name>
  <Active>true</Active>
  <Action>DontModifyResponseHeader</Action>
  <Conditions>
    <Not>
      <Exists>
        <ApplyTo>Http.Initial.Request.Header.Accept-Language</ApplyTo>
      </Exists>
    </Not>
    <Or>
      <CompareData>
        <ApplyTo>HeaderName</ApplyTo>
        <Data>Pragma</Data>
        <Length>0</Length>
      </CompareData>
      <CompareData>
        <ApplyTo>HeaderName</ApplyTo>
        <Data>Cache-Control</Data>
        <Length>0</Length>
      </CompareData>
    </Or>
  </Conditions>
</ProxyEngineRule>