users@jersey.java.net

[Jersey] Re: Bad Checksum when using PUT

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Tue, 25 Oct 2011 18:27:01 +0200

Hello,

"411 Length Required" is not returned by client, but by service you are
accessing.

TCP checksum is way in lower layer, jersey client does not produce it
and has no instruments to change it in any way and I don't think that
that is your problem anyway.

Can you post your client code here? What might be happening is that
Jersey provided MessageBodyWriter you are using is generating "-1" as a
length, which is most likely unacceptable for service you are trying to
access. Solution here would be (in case of XML for example) to marshal
data by yourself, compute exact length and pass byte[] to jersey client,
but.. I that's just my guess, I would need to know more details (your
entity and how are you creating it).

Regards,
Pavel

On 10/25/11 5:30 PM, stlecho wrote:
> I'm calling a REST webservice with v1.8 of jersey-client. When using the PUT
> method, the client responds with "/411 Length Required/". When looking at
> the TCP traffic with Wireshark, I've seen "/checksum: 0xaa4b [incorrect,
> should be 0x4e79 (maybe caused by "TCP checksum offload"?)] Bad Checksum:
> True/".
>
> I would be glad if someone could help me to solve this problem
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/Bad-Checksum-when-using-PUT-tp6929189p6929189.html
> Sent from the Jersey mailing list archive at Nabble.com.
>