You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/09/26 19:36:53 UTC
[tomcat] branch 7.0.x updated: Fix
https://bz.apache.org/bugzilla/show_bug.cgi?id=63766
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/7.0.x by this push:
new 5c32af4 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63766
5c32af4 is described below
commit 5c32af4b01f76b64c44da51ed5da40c4d2bab25b
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Sep 26 20:36:26 2019 +0100
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63766
Clean-up correctly after an early failure of a WebSocket connection.
---
java/org/apache/coyote/AbstractProtocol.java | 4 +++-
webapps/docs/changelog.xml | 5 +++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/coyote/AbstractProtocol.java b/java/org/apache/coyote/AbstractProtocol.java
index bf5308f..cfe301e 100644
--- a/java/org/apache/coyote/AbstractProtocol.java
+++ b/java/org/apache/coyote/AbstractProtocol.java
@@ -727,10 +727,12 @@ public abstract class AbstractProtocol<S> implements ProtocolHandler,
}
} else {
// Connection closed. OK to recycle the processor. Upgrade
- // processors are not recycled.
+ // processors are not re-used but recycle is called to clear
+ // references.
connections.remove(socket);
if (processor.isUpgrade()) {
processor.getHttpUpgradeHandler().destroy();
+ processor.recycle(true);
} else if (processor instanceof org.apache.coyote.http11.upgrade.UpgradeProcessor) {
// NO-OP
} else {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 6d6812e..d0f6e64 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -135,6 +135,11 @@
<code>accept-encoding</code> header to determine if gzip encoding is
supported including only parsing the first header found. (markt)
</fix>
+ <fix>
+ <bug>63766</bug>: Ensure Processor objects are recycled when processing
+ an HTTP upgrade connection that terminates before processing switches to
+ the Processor for the upgraded procotol. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Web Socket">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org