My Oracle Support Banner

POST to 3rd party REST Service with no request payload fails with HTTP 411 / Length Required / Content-Length is missing (Doc ID 2550055.1)

Last updated on MAY 19, 2020

Applies to:

Oracle Integration-OIC - Version 18.2.5 and later
Information in this document applies to any platform.


 When using the REST Adapter to POST to a 3rd party service which does not require a request payload, the REST service responds with a HTTP 411 / Length Required / Content-Length is missing error response.

<nsmpr2:errorReason>ICS runtime execution error</nsmpr2:errorReason>
<nsmpr2:errorDetail> Details :
<ns2:title>Length Required</ns2:title>
<ns2:errorPath>&lt;![CDATA[POST https://<host:port>/<rest service> returned a response status of 411 Length Required]]> </ns2:errorPath>
<ns2:instance>&lt;![CDATA[{"fault":{"faultstring":"Content-Length is missing","detail":{"errorcode":"messaging.adaptors.http.flow.LengthRequired"}} }.The HyperText Transfer Protocol (HTTP) 411 Length Required client error response code indicates that the server refuses to accept the request without a defined Content-Length header. This is a common condition with POST calls especially when the target service expects an explicit content-length header in the request. To fix this error or force a content-length header, set EnfoceEmptyJSONObjectPayload connectivityProperty from the OIC mapper preceding the REST adapter invoke configuration. ]]>
</ns2:APIInvocationError>:Application Errorexecute

How can this be resolved when the Content-Length HTTP header is grayed out, and cannot be selected in the REST Adapter Wizard ?


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.