https://bz.apache.org/bugzilla/show_bug.cgi?id=60750
--- Comment #9 from Konstantin Kolinko <knst.koli...@gmail.com> --- > Server number: 7.0.70.0 You are using Tomcat 7.0.70. The current version of Tomcat 7 is 7.0.75. I wonder whether the behaviour is reproducible with Tomcat 7.0.75. > org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) The above class in stacktrace means that you are using BIO connector implementation. > Comment 5 > OutputStream out = outputMessage.getBody(); > String text = JSON.toJSONString(obj, features); > byte[] bytes = text.getBytes(charset); > out.write(bytes); Can this be simplified further to be reproduced without 3-rd party classes? A simple sample web application? It seems that your hypothesis in Comment 6 and Comment 7 is the following: 1. The zero-length chunk is not send because org.apache.coyote.http11.filters.ChunkedOutputFilter.end() method is not called. 2. The end() method is not called (in org.apache.coyote.http11.AbstractOutputBuffer.endRequest()) because 'AbstractOutputBuffer.finished' flag is 'true'. 3. The 'AbstractOutputBuffer.finished' flag is set to 'true' in org.apache.coyote.http11.AbstractHttp11Processor.action() when processing 'case CLOSE_NOW'. This behaviour is by design. The "CLOSE_NOW" action code means that connection must be terminated immediately, without any further I/O. E.g. some fatal error has occurred. E.g. the client went away (closed its side of connection) without waiting for your end chunk. See the javadoc: https://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/ActionCode.java?revision=1740727&view=markup#l34 The CLOSE_NOW code was introduced by r1602443 (Tomcat 7.0.55 onwards), 2,5 years ago. -- 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