Marko Lukša created JBWEB-253:
---------------------------------
Summary: IndexOutOfBoundsException for large PUT or POST request
Key: JBWEB-253
URL:
https://issues.jboss.org/browse/JBWEB-253
Project: JBoss Web
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: JBossWeb-7.2.0.Alpha1
Reporter: Marko Lukša
Assignee: Remy Maucherat
NOTE: this affects version Alpha2, but Alpha2 is not available in JIRA.
The following code results in an IndexOutOfBoundsException if {{largeFile}} is larger than
approximately 8k.
{code}
DefaultHttpClient client = new DefaultHttpClient();
HttpPut put = new HttpPut(url);
put.setEntity(new FileEntity(largeFile, "text/plain"));
HttpResponse response = client.execute(put);
{code}
This is the error:
{code}
17:14:52,502 ERROR [org.apache.coyote.http11] (http-127.0.0.1/127.0.0.1:8080-4)
JBWEB003072: Error finishing request: java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkBounds(Buffer.java:559) [rt.jar:1.7.0_07]
at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:259) [rt.jar:1.7.0_07]
at
org.apache.coyote.http11.InternalNioInputBuffer.fill(InternalNioInputBuffer.java:404)
[jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at
org.apache.coyote.http11.InternalNioInputBuffer$InputBufferImpl.doRead(InternalNioInputBuffer.java:509)
[jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at
org.apache.coyote.http11.filters.IdentityInputFilter.end(IdentityInputFilter.java:161)
[jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at
org.apache.coyote.http11.AbstractInternalInputBuffer.endRequest(AbstractInternalInputBuffer.java:291)
[jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at
org.apache.coyote.http11.Http11NioProcessor.endRequest(Http11NioProcessor.java:437)
[jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at
org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:377)
[jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:900)
[jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at
org.apache.tomcat.util.net.NioEndpoint$ChannelProcessor.run(NioEndpoint.java:1025)
[jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[rt.jar:1.7.0_07]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[rt.jar:1.7.0_07]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]
{code}
This error does not occur on JBossAS 7.1.1.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira