| Summary: | Jetty 7x access jsp file error using ajp protocol | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | wangxinsheng <gady2003> |
| Component: | other | Assignee: | Project Inbox <jetty-inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | mgorovoy, weijx2003 |
| Version: | unspecified | ||
| Target Milestone: | 7.2.x | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
wangxinsheng
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 *** |