-
-
Advanced policy expressions: Working with dates, times, and numbers
-
Advanced policy expressions: Parsing HTTP, TCP, and UDP data
-
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 text expressions
You can configure various expressions for working with text that flows through the NetScaler appliance. Following are some examples of how you can parse text by using a Advanced policy expression:
-
Determine that a particular HTTP header exists.
For example, you may want to identify HTTP requests that contains a particular Accept-Language header for the purpose of directing the request to a particular server.
-
Determine that a particular HTTP URL contains a particular string.
For example, you may want to block requests for particular URLs. Note that the string can occur at the beginning, middle, or end of another string.
-
Identify a POST request that is directed to a particular application.
For example, you may want to identify all POST requests that are directed to a database application for the purpose of refreshing cached application data.
Note that there are specialized tools for viewing the data stream for HTTP requests and responses. You can use the tools to view the data stream.
About operations on text
A text-based expression consists of at least one prefix to identify an element of data and usually (although not always) an operation on that prefix. Text-based operations can apply to any part of a request or a response. Basic operations on text include various types of string matches.
For example, the following expression compares a header value with a string:
http.req.header("myHeader").contains("some-text")
Following expressions are examples of matching a file type in a request:
http.req.url.suffix.contains("jpeg")
http.req.url.suffix.eq("jpeg")
In the preceding examples, the contains operator permits a partial match and the eq operator looks for an exact match.
Other operations are available to format the string before evaluating it. For example, you can use text operations to strip out quotes and white spaces, to convert the string to all lowercase, or to concatenate strings.
Note:
Complex operations are available to perform matching based on patterns or to convert one type of text format to another type.
For more information, see the following topics:
Compounding and precedence in text expressions
You can apply various operators to combine text prefixes or expressions. For example, the following expression concatenates the returned values of each prefix:
http.req.hostname + http.req.url
Following is an example of a compound text expression that uses a logical AND. Both components of this expression must be TRUE for a request to match the expression:
http.req.method.eq(post) && http.req.body(1024).startswith("destination=")
Note:
For more information on operators for compounding, see Compound advanced expressions.
Categories of text expressions
The primary categories of text expressions that you can configure are:
-
Information in HTTP headers, HTTP URLs, and the POST body in HTTP requests.
For more information, see Expression prefixes for text in HTTP requests and responses.
-
Information regarding a VPN or a clientless VPN.
For more information, see Expression prefixes for VPNs and clientless VPNs.
-
TCP payload information.
For more information about TCP payload expressions, see Advanced policy expressions: Parsing HTTP, TCP, and UDP data.
-
Text in a Secure Sockets Layer (SSL) certificate.
For information about text expressions for SSL and SSL certificate data, see Advanced policy expressions: Parsing SSL certificates and Expressions for SSL certificate dates.
Note:
Parsing a document body, such as the body of a POST request, can affect performance. You may want to test the performance impact of policies that evaluate a document body.
Guidelines for text expressions
From a performance standpoint, it typically is best to use protocol-aware functions in an expression. For example, the following expression makes use of a protocol-aware function:
HTTP.REQ.URL.QUERY
The previous expression performs better than the following equivalent expression, which is based on string parsing:
HTTP.REQ.URL.AFTER_STR("?")
In the first case, the expression looks specifically at the URL query. In the second case, the expression scans the data for the first occurrence of a question mark.
There is also a performance benefit from structured parsing of text, as in the following expression:
HTTP.REQ.HEADER("Example").TYPECAST_LIST_T(',').GET(1)
(For more information on typecasting, see Typecasting data. The typecasting expression, which collects comma-delimited data and structures it into a list, typically would perform better than the following unstructured equivalent:
HTTP.REQ.HEADER("Example").AFTER_STR(",").BEFORE_STR(",")
Finally, unstructured text expressions typically have better performance than regular expressions. For example, the following is an unstructured text expression:
HTTP.REQ.HEADER("Example").AFTER_STR("more")
The previous expression would generally provide better performance than the following equivalent, which uses a regular expression:
HTTP.REQ.HEADER("Example").AFTER_REGEX(re/more/)
For more information on regular expressions, see Regular expressions.
Share
Share
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.