Using wso2am-2.6.0 we have a backend (external) service, which requires Content-Length header (doesn't support chuking)
Chunking can be easily disabled in a custom request handler
<property name="DISABLE_CHUNKING" value="true" scope="axis2" />
<property name="FORCE_HTTP_1.0" value="true" scope="axis2" />
However - post form parameters are optional and there are cases when no parameters are posted.
When sending a POST request (Content-Type: application/x-www-form-urlencoded) with no parameters (Content-Length: 0), then no request is made to the backend service and the request times out.
Actually - checking with the tcpmon tool - the wso2am creates a tcp connection to the backend edpoint, but no data are sent at all.
If the request contains any parameter/data, all seems to work well. If we use chunking transport, the APIM itself works well, but the backend service requires the Content-Length header.
I tried to update the axis message formatter and builder
<messageFormatter contentType="application/x-www-form-urlencoded"
class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>
...
<messageBuilder contentType="application/x-www-form-urlencoded"
class="org.wso2.carbon.relay.BinaryRelayBuilder"/>
but that had no effect either