ltm rule command HTTP enableΒΆ

iRule(1)		      BIG-IP TMSH Manual		      iRule(1)



HTTP::enable
       Changes the HTTP filter from passthrough to full parsing mode.

SYNOPSIS
       HTTP::enable

DESCRIPTION
       Changes the HTTP filter from passthrough to full parsing mode. This
       could be useful, for instance, if you need to determine whether or not
       HTTP is passing over the connection and enable the HTTP filter
       appropriately, or if you have a protocol that is almost but not quite
       like HTTP, and you need to re-enable HTTP parsing after temporarily
       disabling it.  Use of this command can be extremely tricky to get
       exactly right; its use is not recommended in the majority of cases.
       Note: This command does not function in certain versions of BIG-IP
       (v9.4.0 - v9.4.4). This issue is tracked as CR95437 and is fixed in
       BIG-IP v9.4.5.

       Syntax

       HTTP::enable

	    * Change the http filter from passthrough to full parsing mode. Puts
	      HTTP traffic filtering into full parsing mode (enabling the HTTP
	      proxy) for the lifetime of the TCP connection or until
	      HTTP::disable is called.

RETURN VALUE
VALID DURING
       ANY_EVENT

EXAMPLES
	#
	# This iRule should be used with a forwarding virtual server.
	#
	when CLIENT_ACCEPTED {
	    HTTP::disable
	    TCP::collect 4 0
	    set server_hold 0
	    log local0. "Buildup -- collecting data"
	}
	when CLIENT_DATA {
	    # Since we're here, the clientside sent data first
	    log local0. "Got client data"

	    # Now see if this is a recognized HTTP command
	    set command [TCP::payload 4]
	    if { $command equals "GET " } {
		log local0. "HTTP traffic -- re-enabling HTTP processing"
		HTTP::enable
		if { $server_hold eq 1 } {
		    serverside { TCP::release }
		}
		event SERVER_CONNECTED disable
		event SERVER_DATA disable
		return
	    }
	    log local0. "Not HTTP -- staying in passthru"
	    event disable all
	}
	when SERVER_CONNECTED {
	    log local0. "Server connection established"
	    TCP::collect
	    set server_hold 1
	}
	when SERVER_DATA {
	    log local0. "Banner protocol -- staying in passthru"
	    clientside { TCP::release }
	    TCP::release
	    event disable all
	}
	when HTTP_REQUEST {
	log local0. "Got request: [HTTP::uri]"
	}

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-9.0.5 --First introduced the command.



BIG-IP				  2017-01-31			      iRule(1)