DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38346>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38346

           Summary: InputBuffer breaks request.readLine()
           Product: Tomcat 5
           Version: 5.5.14
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


There are two bugs in

org.apache.catalina.connector.InputBuffer:

1) If you send a POST with 8K in the body then the optimizedWrite flag in
CharChunk prevents the input data from being read into the CharChunk. This only
happens at and after the second request on an input processor, because the
optimizedWrite flag ist being set to true when recycling the InputBuffer after
the first request.

2) After fixing that, you can more easily see another bug: realReadChars always
reads the full ByteChunk buffer size and then tries to convert it into the
CharChunk. There is a corner case, where CharChunk has a limit just a little too
small, to be able to do that. This is not about making CharChunk much bigger. I
can give more precise details, but the patch might be self-explaining (it is
very short).

I attach

- a patch
- a JSP and a perl script to easily reproduce the problem. Problem 1) can be
reprodiced by setting CHUNK in the script to 8192, problem 2 (after fixing 1) by
setting it slightly bigger than 8192, e.g. 8300.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to