ADC

Expressions for HTTP request and response dates

The following expression prefixes return the contents of the HTTP Date header as text or as a date object. These values can be evaluated as follows:

  • As a number. The numeric value of an HTTP Date header is returned in the form of the number of seconds since Jan 1, 1970.

    For example, the expression http.req.date.mod(86400) returns the number of seconds since the beginning of the day. These values can be evaluated using the same operations as other non-date-related numeric data. For more information, see Expression prefixes for numeric data other than date and time.

  • As an HTTP header. Date headers can be evaluated using the same operations as other HTTP headers.

    For more information, see Default syntax expressions: Parsing HTTP, TCP, and UDP data.

  • As text. Date headers can be evaluated using the same operations as other strings.

For more information, see Advanced Policy Expressions: Evaluating Text.

Prefix Description
HTTP.REQ.DATE Returns the contents of the HTTP Date header as text or as a date object. The date formats recognized are: RFC822. Sun, 06 Jan 1980 08:49:37 GMT, RFC850. Sunday, 06-Jan-80 09:49:37 GMT, and ASCTIME. Sun Jan 6 08:49:37 1980.
HTTP.RES.DATE Returns the contents of the HTTP Date header as text or as a date object. The date formats recognized are: RFC822. Sun, 06 Jan 1980 8:49:37 GMT, RFC850. Sunday, 06-Jan-80 9:49:37 GMT, and ASCTIME. Sun Jan 6 08:49:37 1980.
Expressions for HTTP request and response dates