This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new f9f37b251a Fix dropped HTTP/2 responses. f9f37b251a is described below commit f9f37b251a1d7f34d881b920ccda3969719c2c83 Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri Dec 16 20:37:03 2022 +0000 Fix dropped HTTP/2 responses. When resetting an HTTP/2 stream because the final response has been generated before the request has been fully read, use the HTTP/2 error code NO_ERROR so that client does not discard the response. Based on a suggestion by Lorenzo Dalla Vecchia. --- java/org/apache/coyote/http2/StreamProcessor.java | 2 +- test/org/apache/coyote/http2/TestFlowControl.java | 2 +- webapps/docs/changelog.xml | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/java/org/apache/coyote/http2/StreamProcessor.java b/java/org/apache/coyote/http2/StreamProcessor.java index 734a4cb3ad..6bfb7e7864 100644 --- a/java/org/apache/coyote/http2/StreamProcessor.java +++ b/java/org/apache/coyote/http2/StreamProcessor.java @@ -94,7 +94,7 @@ class StreamProcessor extends AbstractProcessor { // send any more data on this stream (reset). StreamException se = new StreamException( sm.getString("streamProcessor.cancel", stream.getConnectionId(), - stream.getIdAsString()), Http2Error.CANCEL, stream.getIdAsInt()); + stream.getIdAsString()), Http2Error.NO_ERROR, stream.getIdAsInt()); stream.close(se); } else if (!getErrorState().isConnectionIoAllowed()) { ConnectionException ce = new ConnectionException(sm.getString( diff --git a/test/org/apache/coyote/http2/TestFlowControl.java b/test/org/apache/coyote/http2/TestFlowControl.java index 60269389e1..8d45ce86d7 100644 --- a/test/org/apache/coyote/http2/TestFlowControl.java +++ b/test/org/apache/coyote/http2/TestFlowControl.java @@ -109,7 +109,7 @@ public class TestFlowControl extends Http2TestBase { "3-HeadersEnd\n" + "3-Body-" + contentLength + "\n" + "3-EndOfStream\n" + - "3-RST-[8]\n", output.getTrace()); + "3-RST-[0]\n", output.getTrace()); output.clearTrace(); // Write 3*16k=48k of request body diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index a5594a135f..484306e1d3 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -133,6 +133,12 @@ stream count limit was reached and no new streams could be created on that connection. (markt) </fix> + <fix> + <bug>66388</bug>: Correct a regression in the refactoring that replaced + the use of the <code>URL</code> constructors. The regression broke + lookups for resources that contained one or more characters in their + name that required escaping when used in a URI path. (markt) + </fix> </changelog> </subsection> <subsection name="Web applications"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org