Version notice:
HTTP_REQUEST_DATA¶
Description¶
An iRule event triggered when an
HTTP::collect command has collected the
specified amount of request data. Also triggered if the client closes
the connection before the HTTP::collect
command finishes processing.
Examples¶
when HTTP_REQUEST {
HTTP::collect 20
}
when HTTP_REQUEST_DATA {
set rpc_id [findstr [HTTP::payload] "Authorization:" 14 20]
persist uie $rpc_id
log local0. "WE RECORDED $rpc_id AS THE PERSIST VARIABLE"
HTTP::release
}
Related Information¶
Available Commands:
- AUTH::abort - Cancels any outstanding auth operations in this authentication session.
- AUTH::authenticate - Performs a new authentication operation.
- AUTH::password_credential - Sets the password credential to the specified string for a future AUTH::authenticate call.
- AUTH::wantcredential_prompt - Returns a string for an authorization session authid’s credential prompt.
- CACHE::priority - Adds a priority to cached documents.
- CACHE::uri - Overrides the URI value used by the cache to store the cached content.
- CACHE::useragent - Overrides the useragent value used by the cache to reference the cached content.
- CACHE::userkey - Allows users to add user-defined values to the key used by the cache to reference the cached content.
- clone - Causes the system to clone traffic to the specified pool or pool member regardless of monitor status.
- COMPRESS::buffer_size - Sets the compression buffer size.
- COMPRESS::disable - Disables compression for the current HTTP response.
- COMPRESS::enable - Enables compression for the current HTTP response.
- COMPRESS::gzip - Sets HTTP data compression criteria.
- forward - Sets the connection to forward IP packets.
- HTTP::close - Closes the HTTP connection.
- HTTP::collect - Collects an amount of HTTP body data that you specify.
- HTTP::cookie - Queries for or manipulates cookies in HTTP requests and responses.
- HTTP::fallback - Specifies or overrides a fallback host specified in the HTTP profile.
- HTTP::header - Queries or modifies HTTP headers.
- HTTP::host - Returns the value of the HTTP Host header
- HTTP::is_keepalive - Returns a true value if this is a Keep-Alive connection.
- HTTP::is_redirect - Returns a true value if the response is a redirect.
- HTTP::method - Returns the type of HTTP request method.
- HTTP::password - Returns the password part of HTTP basic authentication.
- HTTP::path - Returns or sets the path part of the HTTP request.
- HTTP::payload - Queries for or manipulates HTTP payload information.
- HTTP::query - Returns the query part of the HTTP request.
- HTTP::redirect - Redirects an HTTP request or response to the specified URL.
- HTTP::request_num - Returns the number of HTTP requests that a client made on the connection.
- HTTP::respond - Generates a response to the client as if it came from the server.
- HTTP::uri - Returns or sets the URI part of the HTTP request.
- HTTP::username - Returns the username part of HTTP basic authentication.
- HTTP::version - Returns or sets the HTTP version of the request or response.
- imid - Returns an i-mode identifier string.
- IP::idle_timeout - Returns or sets the idle timeout value.
- IP::local_addr - Returns the IP address of the virtual server the client is connected to or the self-ip LTM is connected from.
- ip_ttl - Returns the TTL of the latest IP packet received.
- lasthop - Sets the lasthop of an IP connection.
- listen - Sets up a related ephemeral listener to allow an incoming related connection to be established.
- LSN::address - Set or override translation address.
- LSN::disable - Disable LSN translation.
- LSN::inbound - Disable inbound connections to translation address/port.
- LSN::persistence - Set translation selection mode and persistence timeout.
- LSN::persistence-entry - Create or lookup translation address.
- LSN::pool - Specify LSN pool for current connection.
- LSN::port - Set or override translation port.
- nexthop - Sets the nexthop of an IP connection.
- node - Sends the packet directly to the identified server node.
- peer - Causes the specified iRule commands to be evaluated under the peer’s (opposite) context.
- persist - Causes the system to use the named persistence type to persist the connection.
- pool - Causes the system to load balance traffic to the specified pool or pool member regardless of monitor status.
- session - Utilizes the persistence table to store arbitrary information based on the same keys as persistence.
- SSL::cert - Returns X509 SSL certificate data.
- URI::query - Returns the query string portion of the given URI or the value of a query string parameter.
- WEBSSO::disable - Forwards a request without doing SSO processing on it.
- WEBSSO::enable - Causes APM to do the SSO processing on a request.
- WEBSSO::select - Use specified SSO configuration object to do SSO for the HTTP request
Warning
The links to the sample code below are remnants of the old DevCentral wiki and will result in a 404 error. For best results, please copy the link text and search the codeshare directly on DevCentral.
Sample Code:
- Block requests by reverse DNS record - Performs a reverse DNS lookup to validate client IP
- HTTP POST redirect preserving POST data - Use Javascript in an iRule to redirect HTTP POST requests to HTTPS
- HTTP sideband policy checking - iRule for HTTP sideband policy checking
- HTTP request cloning - Clone HTTP requests to one or more destination pools
- Log binary HTTP payload in hex - This iRule demonstrates how to collect the HTTP request payload and log the output in hex
- Log large HTTP payloads in chunks locally and remotely - Log POST request payloads remotely via HSL to a syslog server and locally.
- XML Field Logger Using HTTP Commands - This iRule extracts XML field data from HTTP request data using only HTTP commands. (Useful for BIG-IP versions which have not implemented the XML iRules commands.)
- Yubikey 2Factor Authentication with BIG-IP LTM - This iRule provides 2-Factor Authentication with YubiCloud Service
- Introduced: BIGIP-9.0.0
The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.