Compression/Decompression with the HTTP Invoke/Get/Post/Head/Put/Delete Request activity

During runtime, the HTTP Invoke/Get/Post/Head/Put/Delete Request activity sends a HTTP request compliant with the HTTP/HTTPS 1.1 protocol to the HTTP Server.

Note: The HTTP Invoke/Get/Post/Head/Put/Delete Request activity supports compression/decompression with the gzip or the deflate formats. It does not support the common UNIX file compression format called compress.

The compression/decompression runtime behavior of the HTTP Invoke/Get/Post/Head/Put/Delete Request activity is dependant on the following conditions:

The affect of these conditions on the compression/decompression runtime behavior of the HTTP Invoke/Get/Post/Head/Put/Delete Request activity are described in the following sections and in the tables provided in the Runtime Compression/Decompression Behavior section.

Endpoint support for compression/decompression

The Integration Appliance determines whether or not the HTTP Endpoint supports compression when the Integration Appliance sends the first HTTP request in the compressed format to the HTTP Endpoint (the HTTP Server), if the HTTP Server returns an error code indicating that HTTP Server does not support compression or does not support the specified Content-Encoding type, the Integration Appliance re-sends the first request in uncompressed format and all subsequent requests to this Endpoint are sent in the uncompressed format. In addition, the HTTP response sent by the HTTP Server is not decompressed when received by Integration Appliance.  

Endpoint support for compression/decompression is represented by the column labeled Endpoint Supports Compression? in the tables provided in the Runtime Compression/Decompression Behavior section.  

Content-Encoding and Accept-Encoding values at the message level

The value of the Content-Encoding header in the HTTP request determines if the body of the request is compressed and the type of encoding that is used. For example, if the Content-Encoding is equal to deflate, the Integration Appliance sends the body of the request compressed in the deflate format as shown in the second row of the first table labeled Compression Behavior When Sending a Request and in the following figure.

The value of the Accept-Encoding header in the request defines the types of encoding that the HTTP client accepts in the response. For example, if the Accept-Encoding is equal to gzip,deflate in the request, the HTTP server can send the body of the response compressed in gzip or deflate formats to the Integration Appliance (acting as a client) as shown in the following figure:
Figure 1.
By default, if nothing is mapped to the optional httpheaders input parameter in the Map Inputs task of the HTTP Invoke/Get/Post/Head/Put/Delete Request activity, a set of default headers are created.  For example, the URL header is automatically set with the value provided in the Configure pane of the HTTP Invoke/Get/Post/Head/Put/Delete Request activity.

The values for the Accept-Encoding and Content-Encoding headers for the request can be explicitly set using name/value pairs in the optional httpheaders input parameter of the Map Inputs task in the HTTP Invoke/Get/Post/Head/Put/Delete Request activity. For example, to set the Content-Encoding to deflate, set the following name/value pair in the optional httpheaders input parameter:

  • httpheaders/httpheaders/otherHeaders/headerItem/name is set to the string: Content-Encoding
  • httpheaders/httpheaders/otherHeaders/headerItem/value is set to the encoding type, for example the string: deflate.

If unsupported values or no values are set for the Accept-Encoding and Content-Encoding headers of the request, default values are provided as shown in the following tables:

The values of the Accept-Encoding and Content-Encoding headers in the request are used by the Integration Appliance and the HTTP server to determine the compression/decompression behavior.

Setting compression/decompression at the activity level

By default, compression/decompression is not used for all HTTP activities. You can select compression or decompression at the activity level by using the Use Compression/Decompression check box that is displayed in the Configure task of the activity. The column labeled Use Compression/Decompression Check Box in the table shown in Runtime Compression/Decompression Behavior represents the setting of the Use Compression/Decompression check box.

Note: The Use Compression/Decompression check box will be deprecated in a future release for the HTTP activities. Use the Content-Encoding and Accept-Encoding HTTP Parameters in the HTTP request to specify how to decompresses the body of the HTTP request and compress the body of the HTTP response.

Runtime compression/decompression behavior

The table provided in the Compression behavior when sending a request section describes the compression runtime behavior when the Integration Appliance sends a HTTP request to the HTTP server.

The table provided in the Accept-Encoding Header value passed to the request section describes the value of the Accept-Encoding header passed in the HTTP request.

The table provided in the Decompression behavior when receiving a response section describes the decompression runtime behavior when the Integration Appliance receives the HTTP response from the HTTP server.

Compression behavior when sending a request

The following table describes the compression runtime behavior when the Integration Appliance sends a HTTP request to the HTTP server.

Use Compression/ Decompression Check Box (Activity Level) Content-Encoding Value in the HTTP Request (Message Level) Endpoint Supports Compression? Integration Appliance Compression Runtime Behavior When Sending a Request
selected gzip, not set, or any other string except deflate or identity yes The Integration Appliance sends the body of the request compressed in the gzip format. The Content-Encoding header is set to gzip in the request.
selected deflate yes The Integration Appliance sends the body of the request compressed in the deflate format. The Content-Encoding header is set to deflate in the request.
selected identity yes The Integration Appliance sends the body of the request uncompressed. The Content-Encoding header is set to identity in the request.
selected value is not significant no The Integration Appliance sends the body of the  request uncompressed. The Content-Encoding header is set to identity in the request.
cleared value is not significant value is not significant The Integration Appliance sends the body of the request as is (unchanged). The current value of the Content-Encoding header is passed as is in the request.

 

Accept-Encoding Header value passed to the request

The following table describes the value of the Accept-Encoding header passed in the HTTP request.

Use Compression/ Decompression Check Box (Activity Level) Initial Accept-Encoding Value Endpoint Supports Compression? Accept-Encoding Value Passed in the HTTP Request to the Server
selected gzip yes The Accept-Encoding header is set to gzip in the request.
selected deflate yes The Accept-Encoding header is set to deflate in the request.
selected gzip,deflate yes The Accept-Encoding header is set to gzip,deflate in the request.
selected deflate,gzip yes The Accept-Encoding header is set to deflate,gzip in the request.
selected identity yes The Accept-Encoding header is set to identity in the request.
selected not set, or any other string except deflate, gzip, or identity yes The Accept-Encoding header is set to gzip,deflate in the request.
selected value is not significant no The current value of the Accept-Encoding header is passed as is in the request.
cleared value is not significant value is not significant  The current value of the Accept-Encoding header is passed as is in the request.

Decompression behavior when receiving a response

The following table describes the decompression runtime behavior when the Integration Appliance receives the HTTP response from the HTTP Server.

Use Compression/ Decompression Check Box (Activity Level) Content-Encoding Value in the HTTP Response (Message Level) Endpoint Supports Compression? Integration Appliance Decompression Runtime Behavior When Receiving a Response
selected gzip yes The Integration Appliance decompresses the body of the response using the gzip format.
selected deflate yes The Integration Appliance decompresses the body of the response using the deflate format.
selected identity yes The Integration Appliance does not decompress the body of the response.
selected value not listed in the Accept-Encoding header yes The Integration Appliance logs an error that the response data was received in an unsolicited content encoding type.
selected value is not significant no The Integration Appliance does not decompress the body of the response. The current value of the Content-Encoding header is passed as is in the response.
cleared value is not significant value is not significant The Integration Appliance does not decompress the body of the response.  The current value of the Content-Encoding header is passed as is in the response.