users@jersey.java.net

[Jersey] Re: Is there a size limit on the response of a REST web service?

From: Jakub Podlesak <jakub.podlesak_at_oracle.com>
Date: Mon, 23 Jul 2012 17:00:19 +0200

Hi Peter,

this is definitely strange. From what you describe this should be
related to client side only,
but there i have no problem consuimg even much longer messages (see
attached test case).

Would you be able to provide a small reproducibe test case and file a
new bug report at [1]
with your test case attached?

~Jakub

[1]http://java.net/jira/browse/JERSEY/


On 7/17/12 5:02 AM, Peter Joole wrote:
> This is getting weirder by the day. I decided to make a simple get
> that reads the text from a txt file and just returns it (nothing
> special). So what is the result I get:
>
> When the text is <15220: It works everywhere
> When it's more >15520:
> It works when you make a GET request with: a webbrowser, curl, and
> WizTools restClient (but only when you set the encoding to ISO-8850-15
> (latin 1).
> It does not work: when I use the jersey client, URLConnection or
> the Apache httpclient. Why doesn't it work properly with more than the
> 15520 characters and why not in Java? Is it because curl and a
> webbrowser is more forgiving?
>
> As from what I read jersey expects UTF-8, so I made sure the input
> reader uses UTF-8 encoding and the txt file is also saved in UTF-8
> encoding.
>
> I also tried the war file on a virtual linux server (Ubuntu 12.04),
> but it's the same problem there.
>
> Does anyone has an idea what could possibly cause this?