ltm rule command CATEGORY filetypeΒΆ

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



CATEGORY::filetype
       Get mime type and mime subtype of payload.

SYNOPSIS
       CATEGORY::filetype HTTP_PAYLOAD
				  ((('-mimetype' TYPE) ('-mimesubtype'
       SUBTYPE))#)?

DESCRIPTION
       Checks for the mime type and mime subtype of an HTTP request payload
       and returns the values to specified variables; use one or both to
       specify them name of the variable that you want the value to be given
       to.

RETURN VALUE
       Sets the specified variables with the mime type or mime subtype

VALID DURING
       HTTP_RESPONSE_DATA

EXAMPLES
	when HTTP_RESPONSE {
	    # Collect 256 bytes of payload and trigger HTTP_RESPONSE_DATA
	    HTTP::collect 256
	}
	when HTTP_RESPONSE_DATA {
	    # Get the mime type and subtype for the payload
	    CATEGORY::filetype [HTTP::payload 256] -mimetype type_var -mimesubtype subtype_var
	    log local0. "Returned: type $type_var and subtype $subtype_var"
	}

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



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