tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44494] Requests greater than 8k being truncated.
Date Thu, 10 Apr 2008 08:59:01 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=44494





--- Comment #34 from Rainer Jung <rainer.jung@kippdata.de>  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:

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

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: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message