tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: cannot read complete HTTP request body. It reads only 8192 characters
Date Fri, 28 Oct 2011 12:07:55 GMT
Konstantin Kolinko wrote:
> 2011/10/27 Christopher Schultz <>:
>> On 10/27/2011 4:58 AM, Anantaneni Harish wrote:
>>> Thanks for the directions the Rainer. Actually the issue is just
>>> solved.
>>> We have changed from BufferedReader in = request.getReader();
>>> to
>>> BufferedReader in = new BufferedReader(new
>>> InputStreamReader(request.getInputStream()));
>>> Now whole body has been read at my client's environment as well.
>>> But would like to know, what causes the issue. Do you have any
>>> idea, why same method can read whole data in my environment and
>>> does not read whole data at my customer's environment?
>> You'll have to provide more information, such as the code you are
>> using.
>> I'm fairly sure Tomcat is not the source of the problem.
> +1.
> I think you need to pay more attention on the documentation of the
> method, or maybe look for a tutorial.
> See also documentation for
> In short:  the read() method returns a portion of data that is
> currently available. If you need more data you must call read()
> repeatedly in a loop until it returns -1.

.. and the difference between two systems, may be that on one system, the network is 
faster (or the system slower, or the buffer bigger) and so by the time you do the read, 
there are more bytes available in the buffer.

> If you had provided some of your source code that performs reading, we
> would be able to point at the exact error in your code.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message