users@jersey.java.net

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

From: Imran M Yousuf <imyousuf_at_smartitengineering.com>
Date: Mon, 9 Aug 2010 13:38:23 +0600

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