-
-
Advanced policy expressions: Working with dates, times, and numbers
-
Advanced policy expressions: Parsing HTTP, TCP, and UDP data
-
About evaluating HTTP and TCP payload
-
Expressions for identifying the protocol in an incoming IP packet
-
Expressions for HTTP status codes and numeric HTTP payload data other than dates
-
Operations for HTTP, HTML, and XML encoding and “Safe” characters
-
Expressions for evaluating a DNS message and identifying its carrier protocol
-
-
Advanced policy expressions: IP and MAC Addresses, Throughput, VLAN IDs
-
-
This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
About evaluating HTTP and TCP payload
The payload of an HTTP request or response consists of HTTP protocol information such as headers, a URL, body content, and version and status information. When you configure an advanced policy expression to evaluate HTTP payload, you use an advanced policy expression prefix and, if necessary, an operator.
For example, use the following expression, which includes the http.req.header("<header_name>")
prefix and the exists
operator, if you want to determine whether an HTTP connection includes a custom header named “myHeader”:
http.req.header("myHeader").exists
You can also combine multiple advanced policy expressions with Boolean and arithmetic operators. For example, the following compound expression can be useful with various NetScaler features, such as Integrated Caching, Rewrite, and Responder. This expression first uses the && Boolean operator to determine whether an HTTP connection includes the Content-Type header with a value of “text/html.” If that operation returns a value of FALSE, the expression determines whether the HTTP connection includes a “Transfer-Encoding” or “Content-Length” header.
(http.req.header("Content-Type").exists && http.req.header("Content-Type").eq("text/html")) || (http.req.header("Transfer-Encoding").exists) || (http.req.header("Content-Length").exists)
The payload of a TCP or UDP packet is the data portion of the packet. You can configure advanced policy expressions to examine features of a TCP or UDP packet, including the following:
-
Source and destination domains
-
Source and destination ports
-
The text in the payload
-
Record types
The following expression prefixes extract text from the body of the payload:
-
HTTP.REQ.BODY(integer)
. Returns the body of an HTTP request as a multiline text object, up to the character position designated in the integer argument. If there are fewer characters in the body than is specified in the argument, the entire body is returned.
Note:
The HTTP.REQ based expressions don’t work with the SSL_BRIDGE protocol type.
-
HTTP.RES.BODY(integer)
. Returns a portion of the HTTP response body. The length of the returned text is equal to the number in the integer argument. If there are fewer characters in the body than is specified in an integer, the entire body is returned. -
CLIENT.TCP.PAYLOAD(integer)
. Returns TCP payload data as a string, starting with the first character in the payload and continuing for the number of characters in the integer argument.
Following is an example that evaluates to TRUE if a response body of 1024 bytes contains the string “https”, and this string occurs after the string “start string” and before the string “end string”:
http.res.body(1024).after_str("start_string").before_str("end_string").contains("https")
Note:
You can apply any text operation to the payload body. For information on operations that you can apply to text, see Advanced policy expressions: Evaluating text.
Share
Share
In this article
This Preview product documentation is Cloud Software Group Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Cloud Software Group Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Cloud Software Group product purchase decisions.
If you do not agree, select I DO NOT AGREE to exit.