HTTP server request/reply for logging user exit
The HTTP server request/reply for logging user exit enables z/TPF applications to log inbound HTTP requests and outbound HTTP responses.
- The socket descriptor that read the request.
The connection type. A value of zero indicates a non-SSL
connection. A value of 1 indicates an SSL connection.
- Remote and local IP addresses and port numbers.
- A pointer to the HTTP server request structure.
- A pointer to the data that was received. For a body that was received in chunks, the individual
chunks are combined by the z/TPF HTTP server and
presented as part of the data that is passed to the user exit.
For HTTP/2 requests this value is NULL. A compatible HTTP/1.x data format can be
created by using the tpf_httpFormatRequest function.
- The length of the data that was received.
For HTTP/2
requests, this value is 0.
- A flag that indicates whether a body was received in chunks.
The HTTP/2 stream identifier. For non-HTTP/2 requests, this
value is 0.
- The socket descriptor that is assigned to the response.
The connection type. A value of zero indicates a non-SSL
connection. A value of 1 indicates an SSL connection.
- Remote and local IP addresses and port numbers.
- A pointer to the HTTP server response structure.
For
HTTP/2 stream and connection errors, this value is NULL. The stream identifier is 0 for HTTP/2
connection errors
. - A pointer to the HTTP response data.
For HTTP/2
responses, this value is NULL. A compatible HTTP/1.x data format can be created by using the tpf_httpFormatResponse function.
- The length of the HTTP response data.
For HTTP/2
responses, this value is 0.
- A flag that indicates whether data was sent and whether the body was compressed.
The HTTP/2 stream identifier. For non-HTTP/2 responses,
this value is 0.
The error code sent for HTTP/2 stream and connection
errors.
If the z/TPF HTTP request sweeper detects that a request has timed out because the server application did not issue the tpf_httpSendResponse function, the HTTP server request/reply for logging user exit is called when the sweeper uses the tpf_httpSendResponse function to send an internal server error to the client.
The socket descriptor
and HTTP/2 stream identifier
can be used to correlate the response with the original request that was received from the HTTP client. The user exit can log the response before returning
to the z/TPF HTTP server, which returns to the
server application that issued the tpf_httpSendResponse function.
- The associated socket descriptor, if available
- Remote and local IP addresses and port numbers, if available
- A pointer to the HTTP server response structure
If errno is set to ETPF_HTTPSENDRSP_TOKEN_ERR, the user exit is not entered.
The HTTP server request/reply for logging user exit is called only if the
z/TPF HTTP server successfully reads a request from
an HTTP client
, or if an HTTP/2 connection error occurs
. If the z/TPF HTTP server successfully reads an HTTP request, the
user exit is called a second time when the HTTP server application on the z/TPF system issues the tpf_httpSendResponse function to send the
response to the HTTP client.