ASF Bugzilla – Attachment 34485 Details for
Bug 60409
IllegalArgumentException at java.nio.Buffer.position at SocketWrapperBase.transfer()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch proposal
patch.diff (text/plain), 2.87 KB, created by
Violeta Georgieva
on 2016-11-28 13:35:24 UTC
(
hide
)
Description:
Patch proposal
Filename:
MIME Type:
Creator:
Violeta Georgieva
Created:
2016-11-28 13:35:24 UTC
Size:
2.87 KB
patch
obsolete
>Index: java/org/apache/coyote/AbstractProtocol.java >=================================================================== >--- java/org/apache/coyote/AbstractProtocol.java (revision 1771599) >+++ java/org/apache/coyote/AbstractProtocol.java (working copy) >@@ -808,15 +808,17 @@ > } else if (state == SocketState.OPEN) { > // In keep-alive but between requests. OK to recycle > // processor. Continue to poll for the next request. >- connections.remove(socket); >- release(processor); >+ if (connections.remove(socket) != null) { >+ release(processor); >+ } > wrapper.registerReadInterest(); > } else if (state == SocketState.SENDFILE) { > // Sendfile in progress. If it fails, the socket will be > // closed. If it works, the socket will be re-added to the > // poller >- connections.remove(socket); >- release(processor); >+ if (connections.remove(socket) != null) { >+ release(processor); >+ } > } else if (state == SocketState.UPGRADED) { > // Don't add sockets back to the poller if this was a > // non-blocking write otherwise the poller may trigger >@@ -829,7 +831,7 @@ > } else { > // Connection closed. OK to recycle the processor. Upgrade > // processors are not recycled. >- connections.remove(socket); >+ boolean releaseProcessor = connections.remove(socket) != null; > if (processor.isUpgrade()) { > UpgradeToken upgradeToken = processor.getUpgradeToken(); > HttpUpgradeHandler httpUpgradeHandler = upgradeToken.getHttpUpgradeHandler(); >@@ -851,7 +853,9 @@ > } > } > } else { >- release(processor); >+ if (releaseProcessor) { >+ release(processor); >+ } > } > } > return state; >Index: test/org/apache/catalina/connector/TestSendFile.java >=================================================================== >--- test/org/apache/catalina/connector/TestSendFile.java (revision 1771730) >+++ test/org/apache/catalina/connector/TestSendFile.java (working copy) >@@ -39,7 +39,6 @@ > import static org.junit.Assert.assertEquals; > > import org.junit.Assert; >-import org.junit.Ignore; > import org.junit.Test; > > import org.apache.catalina.Context; >@@ -157,7 +156,6 @@ > } > > >- @Ignore > @Test > public void testBug60409() throws Exception { > Tomcat tomcat = getTomcatInstance();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 60409
:
34473
|
34478
|
34484
| 34485 |
34486