Connect to an Endpoint that Requires a Content-Length Header to Be Sent

In Oracle Integration 3, invoke connection requests sent to an endpoint default to chunked encoding. This means no Content-Length header is sent. If your endpoint requires a Content-Length header, the HTTP response returns a 400 or 411 error. Perform the following steps to enable a Content-Length header to be sent.

  1. Edit the Adapter Endpoint Configuration Wizard for the invoke connection. For example:

    The integration shows a trigger, map, invoke, and map. The actions menu of the invoke is selected to show a menu with several options, including the Edit option at the top.

  2. On the Basic Info page, select the Standard request header check box.

    On the Basic Info page, the Standard check box in the Configure Request Headers section is being selected.

  3. Click through the Adapter Endpoint Configuration Wizard without making changes until you reach the Edit Request Headers page.
  4. In the Standard HTTP Headers section, click Add and select Content-Length from the list.

    On the Edit Request Headers page, the Standard HTTP Headers tab is selected. Below this, the Content-Length option is selected from the list.

  5. Click through the remaining pages of the Adapter Endpoint Configuration Wizard without making changes.
  6. On the Summary page, click Finish.
  7. Open the mapper in front of the invoke connection for editing.

    The map action in the integration is selected to show an option for Edit being selected.

  8. In the Target section, right-click Content Length under Standard HTTP Headers.
  9. Select Create target node.

    The Content Length target element is right-clicked to show an option for Create target node being selected.

  10. In the Expression Builder at the bottom, set the value to "0". This value is not significant. It simply enables the REST Adapter to understand that a Content-Length header is required.

    The Expression Builder shows a value of "0" for Content-Length

  11. Exit the mapper and save the integration.
  12. Run the integration.
    This enables a Content-Length header to be sent to the endpoint.