Community
Participate
Working Groups
Build Identifier: 7.3.1.v20110307 using apache 2.15+mod_jk+Jetty7.3.1 access jsp page,event the jsp file generated by a txt file such as linux command of mv a.txt a.jsp. access errors as follow: [Wed Jun 15 16:37:08.004 2011] [27849:1123723584] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (1312): (local) can't receive the response body message from tomcat, tomcat (127.0.0.1:8009) has forced a connection close for socket 14 [Wed Jun 15 16:37:08.004 2011] [27849:1123723584] [error] ajp_get_reply::jk_ajp_common.c (2085): (local) Tomcat is down or network problems. Part of the response has already been sent to the client the same error occured on 7.1.6,but when jetty version change to 6.1.22,errors does not occurred! Reproducible: Always
While debuging ,I found that the class of Ajp13Generator has a method which can't executed for the _buffer is not null. the source code as follows: private void initContent() throws IOException { if (_buffer == null) { _buffer = _buffers.getBuffer(_contentBufferSize); _buffer.setPutIndex(7); _buffer.setGetIndex(7); } } Next step ,the method increaseContentBufferSize in class AbstractGenerator as follows has inited the buffer field. public void increaseContentBufferSize(int contentBufferSize) { if (_buffer==null) _buffer=_buffers.getBuffer(); if (contentBufferSize > _buffer.capacity()) { Buffer nb = _buffers.getBuffer(contentBufferSize); nb.put(_buffer); _buffers.returnBuffer(_buffer); _buffer = nb; } } the buffer of 6.x has not inited,as follow is jetty6.1.22 source code : public void increaseContentBufferSize(int contentBufferSize) { if (contentBufferSize > _contentBufferSize) { _contentBufferSize = contentBufferSize; if (_buffer != null) { Buffer nb = _buffers.getBuffer(_contentBufferSize); nb.put(_buffer); _buffers.returnBuffer(_buffer); _buffer = nb; } } }
Jetty7.4 fix this bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=341694
Marking this bug as duplicate of bug 341694. Please re-open if the fix doesn't work in your environment. *** This bug has been marked as a duplicate of bug 341694 ***