[OO Tip] "HTTP PUT" operation fails due to missing Content-Length header
When using the "library/operations/HTTP Client/HTTP CLIENT PUT" operation, an “application/json” formatted string body to the Hyper Text Transfer Protocol (HTTP) request is sent. The HTTP Application Programming Interface (API) server expects for the Content-Length header to be set correctly; however, it is not set automatically by the client. When the Content-Length header is set to the byte-length of the 8 BIT encoded body it gives an error that the Content-Length header is already present. If the Content_Length is not sent, it returns back saying it is required.
Here is the error:
INFO | jvm 2 | 2013/10/15 20:03:46 | 5289771070 [runpool-1-thread-349] ERROR com.iconclude.dharma.model.operations.WebOperation - RAS-side exception occurred while executing IAction 'com/iconclude/content/actions/httpclient/HttpClientPut.class':'org.apache.http.client.ClientProtocolException: Content-Length header already present
There are two new enhancement requests for this issue that are currently in progress.
Version 9.00 : QCCR8C23183 - The HTTP PUT operation fails due to missing Content-Length header
Version 10.00 : QCCR8C23184 - The HTTP PUT operation fails due to missing Content-Length header
Please contact OO Support for assistance with this issue if needed.
Direct link to the document here:
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.