users@jersey.java.net

Re: [Jersey] Re: Hangs when trying to read an entity

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Mon, 9 Aug 2010 10:27:07 +0200

Hi Imran,

I do see the test performs a HEAD request (testSimpleGet) and then
performs a GET (testFeed), i am wondering if that triggers the same
issue as the PUT returning 204 then GET. I suspect it might if the
HEAD response returns a 204 with chunked encoding.

You should be able to easily verify if Jetty does that using curl.

Paul.

On Aug 9, 2010, at 9:38 AM, Imran M Yousuf wrote:

> Hi Paul,
>
>> There is a bug in HttpURLConnection where if you make a POST/PUT
>> request and
>> the server returns a 204 response with chunked encoding and you
>> make a
>> subsequent GET the client hangs. I cannot recall the bug number or
>> if it was
>> fixed in a JDK release.
>> Did you make just one request or say a PUT then a GET?
>
> No there ain't any POST/PUT only GET operations. The resource class is
> http://github.com/imyousuf/smart-util/blob/rest-util/rest/atom/src/test/java/com/smartitengineering/util/rest/atom/resources/SomeDomainResource.java
>
> The resource uses Abdera Feed to deserialize Atom Feed.
>
> The DTO that is serialized as JSON.
> http://github.com/imyousuf/smart-util/blob/rest-util/rest/atom/src/test/java/com/smartitengineering/util/rest/atom/resources/domain/SomeDomain.java
>
> The test case that starts Jetty programmatically and makes GET
> requests only -
> http://github.com/imyousuf/smart-util/blob/rest-util/rest/atom/src/test/java/com/smartitengineering/util/rest/atom/AppTest.java
>
> I knew about the bug from earlier google in context to PUT/POST, but
> this problem was quite strange to me.
>
> Thank you,
>
> --
> Imran
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>