Clear the buffer provided by Undertow before reading the request
When reading more that once for a given request, the position/limit of the buffer provided by Undertow should be reset in order to use the full capacity of the buffer.
This commit is contained in:
parent
8504084553
commit
23a052c160
|
|
@ -146,6 +146,7 @@ public class UndertowServerHttpRequest extends AbstractServerHttpRequest {
|
|||
this.pooledByteBuffer = this.byteBufferPool.allocate();
|
||||
}
|
||||
ByteBuffer byteBuffer = this.pooledByteBuffer.getBuffer();
|
||||
byteBuffer.clear();
|
||||
int read = this.channel.read(byteBuffer);
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("read:" + read);
|
||||
|
|
|
|||
Loading…
Reference in New Issue