| Summary: | ajp component not work | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | weijx <weijx2003> |
| Component: | server | Assignee: | Greg Wilkins <gregw> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | gady2003, jetty-inbox |
| Version: | 7.2.2 | ||
| Target Milestone: | 7.2.x | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
I've applied a similar fix for 7.4.0 thanks *** Bug 349430 has been marked as a duplicate of this bug. *** |
Build Identifier: jetty7.3.1 I use apache httpd server with module_jk and jetty, but I can not access app from apache httpd server which deployed in jetty. I see the Ajp13Generator.java file and find that the _buffer field must have 7 bytes before real data. the super class will init _buffer field some time ,but without 7 bytes before, this method is : /** * @return Returns the contentBufferSize. */ public int getContentBufferSize() { if (_buffer==null) _buffer=_buffers.getBuffer(); return _buffer.capacity(); } /* ------------------------------------------------------------ */ /** * @param contentBufferSize The contentBufferSize to set. */ 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; } } I inherit Ajp13Generator.java and override the method below: public void increaseContentBufferSize(int contentBufferSize) { // do nothing } public int getContentBufferSize() { initContent(); return _buffer.capacity(); } so I can access app from apache httpd server, so yours must init _buffers Correctly in Ajp13Generator. class: org.eclipse.jetty.ajp.Ajp13Generator field: _buffers Reproducible: Always