Start of change

Examining the HTTP headers for a message

Each HTTP header for a request or response message consists of a header name and header value. CICS® stores this information for the application to access if required. An application can receive the value of a specified header, or browse through the names and values of all the headers for a request or response. You can also convert an architected date and time stamp string taken from a header into the ABSTIME format.

Your application might need to examine information in the headers in order to process a request or response, and construct subsequent messages. For example:
  • The TE header tells the application whether or not trailing headers are permitted in a chunked response message.
  • Conditional headers can provide instructions to the application, such as to reply only if the response document has changed.
Bear in mind that unless you know the exact format of the HTTP request or response, your application should not rely on the presence of any particular header, as Web clients and servers can be inconsistent in the headers they send.

Some HTTP headers contain date and time stamps. CICS provides the CONVERTTIME command to convert common formats for architected date and time stamp strings into the ABSTIME format, for use by the application.

The standard HTTP headers are described in the HTTP/1.1 specification (RFC 2616) and the HTTP/1.0 specification (RFC 1945). HTTP header reference for CICS Web support explains the general use of HTTP headers in CICS Web support, and the actions that CICS Web support takes for specific headers received on messages. Some HTTP headers are ignored by CICS, and it is up to the user application to take appropriate action in response to these. Check the HTTP specification to which you are working for detailed guidance and requirements about the meaning and correct use of each HTTP header.

If the message includes any trailing headers, you can read these using the EXEC CICS WEB commands in the same way as for standard headers. The Trailer header on the message specifies the names of all the HTTP headers that were sent as trailing headers.

End of change