users@jersey.java.net

[Jersey] Re: Question about Jersey 2.0 RC1 and Http protocol

From: Tony Anecito <adanecito_at_yahoo.com>
Date: Wed, 22 May 2013 07:55:39 -0700 (PDT)

Hi All,

I got an answer back from the httpclient group and indeed around version 2.0 of httpclient the default encoding scheme was changed to chunked.

For now I have decided to not try to change that and go forward with chunked transfer encoding. If vendors do not use http 1.1 compliant proxies they should upgrade.

Regards,
-Tony




________________________________
 From: Tony Anecito <adanecito_at_yahoo.com>
To: "users_at_jersey.java.net" <users_at_jersey.java.net>
Sent: Saturday, May 18, 2013 1:13 PM
Subject: Re: [Jersey] Re: Question about Jersey 2.0 RC1 and Http protocol
 


Thanks Oleksiy,
 
I am working on a work around but what I think happened is that when going from httpclient 3.1 to 4.2.5 support was added or by default the chunked encoding was turned on. I noticed support for chunked encoding in the new ApacheConnector class via ApacheClientProperties so someone on the teams knows what is going on. So I think all I need to do is ask the Apache Client team what to do.
 
Once verified with that team what is going on then I will know what hopefully what my work around is.
 
What the Jearsey Team and users of Jersey 2.0 will have to decide is what you want to do. One of the most popular proxies in the world (Squid) has said they are not http 1.1 complient (http://wiki.squid-cache.org/Features/HTTP11)  for some of their earlier versions but 3.2 is. So there are companies out there where Jersey 2.0 based solutions will not work by default. So either those companies upgrade thier http proxies using squid or Jersey 2.0 clients will have to disable chunked encoding.
 
I will let this email group know what I find out.
 
Best Regards,
-Tony

From: Oleksiy Stashok <oleksiy.stashok_at_oracle.com>
To: users_at_jersey.java.net
Sent: Friday, May 17, 2013 9:46 PM
Subject: [Jersey] Re: Question about Jersey 2.0 RC1 and Http protocol



Hi Tony,

can you pls. provide more details how the request/response look like in 1.x and 2.x?
Would be also good to have the testcase.

Thanks.

WBR,
Alexey.


On 17.05.13 18:30, Tony Anecito wrote:

Hi All,
>>
>>
>>I am having an issue with Jersey 2.0 RC1 working through a proxy and I think I have narrowed it down to http protocol issue.
>>
>>
>>First Jersey 1.17.1 works fine and Jersey 2.0 RC1 fails with invalid protocol for the same exact request. Using Wireshark I found out there is one very important difference between the two. Jersey 2.0 RC1 seems to use chunked encoding and Jersey 1.17.1 does not.
>>
>>
>>So how do I turn chunked encoding when using Jersey 2.0 RC1 so I can verify this oddity? What I want to see in Wireshark is content-length header with the size for Jersey 2.0 RC1.
>>
>>
>>
>>Thanks!
>>-Tony
>
>