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?