Product Documentation

Expressions for HTTP Request and Response Dates

Aug 31, 2016

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 "Default Syntax Expressions: Evaluating Text."

Table 1. Prefixes That Evaluate HTTP Date Headers

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

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

ASCTIME. Sun Jan 6 08:49:37 1980