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à))
About text expressions
You can configure various expressions for working with text that flows through the Citrix ADC appliance. Following are some examples of how you can parse text by using a default syntax 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.
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:
Following expressions are examples of matching a file type in a request:
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.
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:
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=")
For more information on operators for compounding, see Compound advanced 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.
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.
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:
The previous expression performs better than the following equivalent expression, which is based on string parsing:
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:
(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:
Finally, unstructured text expressions typically have better performance than regular expressions. For example, the following is an unstructured text expression:
The previous expression would generally provide better performance than the following equivalent, which uses a regular expression:
For more information on regular expressions, see Regular expressions.
This Preview product documentation is Citrix Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Citrix 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 Citrix product purchase decisions.
If you do not agree, select Do Not Agree to exit.