STREAM::disable

Description

Disables the stream filter for this flow.

Syntax

STREAM::disable

STREAM::disable

  • Disables the stream filter for this flow or until STREAM::enable is called.

Configuration requirements:
1. This command is valid only when a Stream Profile is attached to the virtual server. The default Stream Profile
/Common/stream
is sufficient.
2. (The following restriction is obsolete.) For TMOS versions before and including 9.4.0, you must force BIG-IP to use chunking and therefore remove the response content length header. This can be done by applying a custom HTTP profile to the virtual server with Response Chunking set to “Rechunk”. (See SOL6422 for details.)–>
3. The stream profile can have different states (enabled vs disabled) on each side of the connection. Calling STREAM::disable in HTTP_REQUEST will disable the stream profile on the client-side for HTTP requests coming in towards the server. Calling STREAM::disable in HTTP_RESPONSE will disable the stream profile on the server-side for HTTP responses going out towards the client.

Examples

See the STREAM::expression page for additional examples.
To check HTTP responses with a Content-Type that contains text, and replace http:// with https://:
when HTTP_REQUEST {
   # Explicitly disable the stream profile for each client-side request so it doesn't stay
   #   enabled for subsequent HTTP requests on the same TCP connection.
   STREAM::disable
}
when HTTP_RESPONSE {
   # Explicitly disable the stream profile for each server-side response so it doesn't stay
   #   enabled for subsequent HTTP responses on the same TCP connection.
STREAM::disable
   # Apply stream profile against text responses from the application
   if { [HTTP::header value Content-Type] contains "text" }{

      # Look for http:// and replace it with https://
      STREAM::expression {@http://@https://@}

      # Enable the stream profile
      STREAM::enable
   }
}

# This section only logs matches, and should be removed before using the rule in production.
when STREAM_MATCHED {
   log local0. "Matched: [STREAM::match]"
}

If you only want to replace some http:// links with https://, you can specify a more complex regular expression in the ‘find’ portion of the STREAM::expression. For example, to match all http:// links except http://schemas.microsoft.com/intellisense/ie5, you can use a negative look behind in the regex:
http:(?!//schemas\.microsoft\.com/intellisense/ie5)