Sometimes httpclient is trying http post to server before server accepts it. I don't know which situation it occurs but becuase of this problem posting is failed. Why does client acting like this?
Here is some part of the logs;
DEBUG org.apache.http.wire - >> "POST /destination-path[\r][\n]"
DEBUG org.apache.http.wire - >> "Content-Length: 594[\r][\n]"
DEBUG org.apache.http.wire - >> "Content-Type: application/json[\r][\n]"
DEBUG org.apache.http.wire - >> "Host: url:port[\r][\n]"
DEBUG org.apache.http.wire - >> "Connection: Keep-Alive[\r][\n]"
DEBUG org.apache.http.wire - >> "Expect: 100-continue[\r][\n]"
DEBUG org.apache.http.wire - >> "[\r][\n]"
DEBUG org.apache.http.headers - >> POST /destination-path HTTP/1.1
DEBUG org.apache.http.headers - >> Content-Length: 594
DEBUG org.apache.http.headers - >> Content-Type: application/json
DEBUG org.apache.http.headers - >> Host: url:port
DEBUG org.apache.http.headers - >> Connection: Keep-Alive
DEBUG org.apache.http.headers - >> Expect: 100-continue
DEBUG org.apache.http.wire - >> "data:mydata"
">>" indicates outgoing operation in this log. This means client is sending requests to server to handshake. At last statement, data is being tried to be sent. But it should have waited for server response for this connection. Generally this problem occurs at initial connection. Connections after this failed conection trying , are successfull.