PreEmptive Analytics Replayer User Guide

HTTP Details

This sections provides details about how the Replayer interprets HTTP responses, and about how it processes HTTP headers.

Response Handling

When a request is made from the Replayer to the destination, the response is interpreted as belonging to one of three categories: success, offline, or error.

Success Responses

A success response indicates that the destination accepted the envelope. Any 2xx HTTP status code is considered a successful response.

Offline Responses

An offline response indicates that the destination is failing to respond to requests of any kind. A response is considered an offline response if:

  • There is an error accessing the destination, such as a hostname not found, network timed out, etc.
  • The destination returns HTTP status code 404, Not Found.
  • The destination returns HTTP status code 503, Service Unavailable.

Error Responses

An error response indicates that the destination rejected this envelope in particular. A response is considered an error response if:

  • The destination returns a 4xx or 5xx HTTP status code besides 404 or 503.
  • Any other kind of error occurs during dispatch besides those covered by Offline Responses.

Header Processing

The Replayer preserves the envelope body byte-for-byte. Envelope headers, on the other hand, must sometimes be modified to ensure correct delivery of envelopes. This section describes how the Replayer uses the headers of envelopes stored in the Standalone Repository.

Generated

The following headers are always generated during dispatching, ignoring any values present on the stored envelope.

  • Connection or Proxy-Connection
  • Expect
  • Host
  • X-Forwarded-Proto
  • X-RI-Capabilities (Indicates functionality of this product)

Merged

Each of the following headers uses a combination of the existing value from the stored envelope and new information (such as an IP address in the case of X-Forwarded-For). If the envelope does not have the corresponding header, only the new information is used.

  • Via
  • X-Forwarded-For
  • X-PreEmptive-Replayer (Indicates that the envelope passed through a Replayer)
  • X-PreEmptive-Repository (Indicates that the envelope passed through a Standalone Repository)

Preserved or Generated

Each of the following headers uses the existing value from the stored envelope. If that header wasn't present on the envelope, the Replayer generates a new value.

  • Content-Length
  • Date
  • X-PreEmptive-ReceiveDate (Indicates when a PreEmptive Analytics server first handled this envelope)

Preserved

Each of the following headers uses the existing value from the stored envelope. The header is not sent if it was not present on the envelope.

  • Content-Type
  • DNT
  • SOAPAction
  • User-Agent
  • All other headers with either the X-PreEmptive- or X-RI- prefix, unless otherwise mentioned above.

Omitted

No other headers are sent, even if they were present on the stored envelope.



Replayer Version 1.1.0. Copyright © 2015 PreEmptive Solutions, LLC