Extract HTTP header information.

WEB READ HTTPHEADER
>>-WEB--READ--HTTPHEADER(data-area)--NAMELENGTH(data-value)----->
>--+----------------------+--VALUE(data-area)------------------->
'-SESSTOKEN(data-area)-'
>--VALUELENGTH(data-area)--------------------------------------><
Conditions: INVREQ, LENGERR, NOTFND
This command is threadsafe.
Description
WEB READ HTTPHEADER enables
an application to extract HTTP header information from a message. When CICS
is an HTTP server, the message is a request from a Web client. When CICS is
an HTTP client, the message is a response from a server, and the SESSTOKEN
option is specified.
The CICS
Internet Guide lists HTTP/1.1 headers that you are likely to receive,
and gives guidance for the actions that you might take in response to them.
The
HTTP header browsing commands (WEB STARTBROWSE HTTPHEADER, WEB READNEXT HTTPHEADER,
WEB ENDBROWSE HTTPHEADER) can be used to browse through all the HTTP header
information for a message.
Options
- HTTPHEADER(data-area)
- specifies
the name of the HTTP header to be extracted.
- NAMELENGTH(data-value)
- specifies
the length, as a fullword binary value, of the HTTP header name.
SESSTOKEN(data-value)
For
CICS as an HTTP client, this option is required. It specifies the session
token, an 8-byte binary value that uniquely identifies a connection between CICS and
a server. This value is returned by a WEB OPEN command for CICS as an HTTP
client. "Session
tokens" in the CICS Internet Guide explains the use of the session
token. 
- VALUE(data-area)
- specifies
the buffer to contain the value of the HTTP header being extracted.
- VALUELENGTH(data-area)
- specifies
the length of the buffer supplied on the VALUE option, as a fullword binary
variable, and is set to the actual length of the data returned to the application.
If the data exceeds the buffer length, a LENGERR condition is raised and the
data is truncated.
Conditions
- INVREQ
- RESP2
values are:
- 1
- The command is being issued in a non-CICS Web support application.
- 3
- The command is being issued for a non-HTTP request.
43
No HTTP headers found.
- LENGERR
- RESP2
values are:
- 1
- The length in VALUELENGTH is not greater than zero (CICS as an HTTP server).
- 2
- The header value has been truncated because the receiving buffer is too
small (CICS as an HTTP server).
35
The length in NAMELENGTH is not greater than zero (CICS as an HTTP client).
52
The header value has been truncated because the receiving buffer is too
small (CICS as an HTTP client).
55
The length in VALUELENGTH is not greater than zero (CICS as an HTTP client).
- NOTFND
- RESP2
value is:
- 1
- The header with the given name could not be found.
NOTOPEN
RESP2
value is: - 27
- Invalid session token.
