tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 44494] Requests greater than 8k being truncated.
Date Thu, 10 Apr 2008 08:59:01 GMT

--- Comment #34 from Rainer Jung <>  2008-04-10 01:59:00 PST
I tested recent trunk and also 6.x with the latest STATUS file patches for this
issue applied.

When we change maxHttpHeaderSize from the default to something bigger, we still
have a problem with POST bodies bigger than 8K. Using smaller maxHttpHedaerSize
than the default 8KB seems to be no problem, bigger sizes like 16KB or 48KB
show the problem.

We simply use a text file of some size between 16KB and 64KB, send it via POST
using e.g. "curl --data-binary @FILE" or "ab -p FILE" and try to read via a
simple JSP:

Size: <%= request.getContentLength() %><br>
out.println("Start reading<br>");
try {
    String line = null;
    int n = 0;
    int m = 0; br = request.getReader();
    while ((line = br.readLine()) != null) {
    out.println("Nothing more available, lines=" + n + ", bytes=" + m);
} catch(Exception ex) {

It's primitive and the byte count shown below is wrong if the file has DOS line
endings, but the failure is shown clearly, because when truncation appears,
you'll be shown less than 8KB of data.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

View raw message