2011/10/31 Anantaneni Harish <anantaneni.har...@vertexsoft.com>:
> String keyValuePair = null;
> String[] arrKeyValue = null;
> BufferedReader in = request.getReader();
> while ((keyValuePair = in.readLine()) != null) {
> arrKeyValue = keyValuePair.split("=");
>
> Above code reads incomplete data(read only 8192 bytes) at my customer's 
> environment, but reads complete data in my environment.
>
> String keyValuePair = null;
> String[] arrKeyValue = null;
> BufferedReader in = new BufferedReader(new 
> InputStreamReader(request.getInputStream()));
> while ((keyValuePair = in.readLine()) != null) {
> arrKeyValue = keyValuePair.split("=");
>
> Above code reads complete data in both the environments. *no changes done to 
> customer's environment.
>
> I hope you can help me now by finding the reason for data lost at my 
> customer's environment when using request.getReader().
>
> Thanks and Regards,
> Harish
>

The code looks OK.
The readLine() implementation is provided by
org.apache.catalina.connector.CoyoteReader.

Looking at the history of that class, there is a known issue
https://issues.apache.org/bugzilla/show_bug.cgi?id=42727
"CoyoteReader readLine returns null for some post request bodies that
are a multiple of MAX_LINE_LENGTH in size"

but it should have been fixed in 5.5.27 and thus in 5.5.28 if that is
the version that your customer is using.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to