https://issues.apache.org/bugzilla/show_bug.cgi?id=56663

Konstantin Preißer <kpreis...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |---

--- Comment #5 from Konstantin Preißer <kpreis...@apache.org> ---
Hi,

I can reproduce this problem with current trunk with the provided non-blocking
ByteCounter example.

1) Apply the following patch to your working copy:

Index: ByteCounter.java
===================================================================
--- ByteCounter.java    (revision 1604977)
+++ ByteCounter.java    (working copy)
@@ -81,7 +81,7 @@

         private volatile boolean readFinished = false;
         private volatile long totalBytesRead = 0;
-        private byte[] buffer = new byte[8192];
+        private byte[] buffer = new byte[1024];

         private CounterListener(AsyncContext ac, ServletInputStream sis,
                 ServletOutputStream sos) {


2. Build Tomcat and start it with default settings (NIO connector).

3. Open a TCP connection and send the following request (it contains a Request
Body with 1406 bytes):

POST /examples/servlets/nonblocking/bytecounter HTTP/1.1
Host: localhost
Connection: keep-alive
Content-Type: text/plain
Content-Length: 1406

0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd

(remove the line breaks so that the body actually contains 1406 characters).



Actual Result:

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/plain;charset=UTF-8
Content-Length: 28
Date: Tue, 24 Jun 2014 13:59:37 GMT

Total bytes written = [1024]



Expected Result:

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/plain;charset=UTF-8
Content-Length: 28
Date: Tue, 24 Jun 2014 14:03:42 GMT

Total bytes written = [1406]

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to