0

For some reason on the Serverside the content-length is 0 even though this Header was send and recieved.

By adding connection.setChunkedStreamingMode(); when sending a POST solved the issue, however I stil don't know why it's not working with the content-length Header.

1 Answers1

0

In case anyone wants to know why Setting "connection.setChunkedStreamingMode()" did the trick.

The Client could send a request using http 1.0 or 1.1 but http 1.1 requests don't work with the content-length header added to it (which was added someware in the process). On the contrary the chunked mode does work for http 1.0 as well.

I tested this after I found this post from Clement Amarnath How do i send a POST request without Transfer Encoding:chunked from Jersey ReST Client 2.22.2

Community
  • 1
  • 1