I am using a jersey client to access a web service, for example:
response = r.accept(MediaType.TEXT_PLAIN_TYPE).header("content-length", 0).post(String.class);
where r is WebResource
However, the Webservice returns 411 - no Content-Length.
using tcpdump, I found out that I can specify custom headers, i.e. .header("myheader", 0) working fine.
Thus, for some reason, knitwear removes the content length header.
Does anyone have any idea?
java jersey
Julian arz
source share