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 2021/03/17 11:23:06 UTC
[tomcat] branch 8.5.x updated (628742e -> 0197b1e)
This is an automated email from the ASF dual-hosted git repository.
markt pushed a change to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.
from 628742e Add debug logging after test failure on Travis CI
new 5f053fa Improve message
new 0197b1e Additional fix for BZ 65179
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
java/org/apache/coyote/http2/Http2Parser.java | 4 ++--
java/org/apache/coyote/http2/Http2UpgradeHandler.java | 9 ++++++++-
java/org/apache/coyote/http2/LocalStrings.properties | 2 +-
test/org/apache/coyote/http2/Http2TestBase.java | 2 +-
4 files changed, 12 insertions(+), 5 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[tomcat] 02/02: Additional fix for BZ 65179
Posted by ma...@apache.org.
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
commit 0197b1e93ba6dc0352d22f23e668a35c0db521f3
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Mar 17 11:21:22 2021 +0000
Additional fix for BZ 65179
---
java/org/apache/coyote/http2/Http2Parser.java | 4 ++--
java/org/apache/coyote/http2/Http2UpgradeHandler.java | 9 ++++++++-
test/org/apache/coyote/http2/Http2TestBase.java | 2 +-
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/java/org/apache/coyote/http2/Http2Parser.java b/java/org/apache/coyote/http2/Http2Parser.java
index 2da5049..f4298d7 100644
--- a/java/org/apache/coyote/http2/Http2Parser.java
+++ b/java/org/apache/coyote/http2/Http2Parser.java
@@ -196,7 +196,7 @@ class Http2Parser {
if (endOfStream) {
output.receivedEndOfStream(streamId);
}
- output.endRequestBodyFrame(streamId);
+ output.endRequestBodyFrame(streamId, dataLength);
}
}
}
@@ -670,7 +670,7 @@ class Http2Parser {
// Data frames
ByteBuffer startRequestBodyFrame(int streamId, int payloadSize, boolean endOfStream) throws Http2Exception;
- void endRequestBodyFrame(int streamId) throws Http2Exception, IOException;
+ void endRequestBodyFrame(int streamId, int dataLength) throws Http2Exception, IOException;
void receivedEndOfStream(int streamId) throws ConnectionException;
/**
* Notification triggered when the parser swallows some or all of a DATA
diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index aa72fa0..4c5ab94 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -1588,10 +1588,17 @@ class Http2UpgradeHandler extends AbstractStream implements InternalHttpUpgradeH
@Override
- public void endRequestBodyFrame(int streamId) throws Http2Exception, IOException {
+ public void endRequestBodyFrame(int streamId, int dataLength) throws Http2Exception, IOException {
AbstractNonZeroStream abstractNonZeroStream = getAbstractNonZeroStream(streamId, true);
if (abstractNonZeroStream instanceof Stream) {
((Stream) abstractNonZeroStream).getInputBuffer().onDataAvailable();
+ } else {
+ // The Stream was recycled between the call in Http2Parser to
+ // startRequestBodyFrame() and the synchronized block that contains
+ // the call to this method. This means the bytes read will have been
+ // written to the original stream and, effectively, swallowed.
+ // Therefore, need to notify that those bytes were swallowed here.
+ onSwallowedDataFramePayload(streamId, dataLength);
}
}
diff --git a/test/org/apache/coyote/http2/Http2TestBase.java b/test/org/apache/coyote/http2/Http2TestBase.java
index a848c55..dc41ab3 100644
--- a/test/org/apache/coyote/http2/Http2TestBase.java
+++ b/test/org/apache/coyote/http2/Http2TestBase.java
@@ -1043,7 +1043,7 @@ public abstract class Http2TestBase extends TomcatBaseTest {
@Override
- public void endRequestBodyFrame(int streamId) throws Http2Exception {
+ public void endRequestBodyFrame(int streamId, int dataLength) throws Http2Exception {
if (bodyBuffer != null) {
if (bodyBuffer.limit() > 0) {
trace.append(lastStreamId + "-Body-");
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[tomcat] 01/02: Improve message
Posted by ma...@apache.org.
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
commit 5f053fa2ec681b80bda35efb9ea805a62526a447
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Mar 17 11:20:33 2021 +0000
Improve message
---
java/org/apache/coyote/http2/LocalStrings.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/java/org/apache/coyote/http2/LocalStrings.properties b/java/org/apache/coyote/http2/LocalStrings.properties
index 3bd153f..e600786 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -95,7 +95,7 @@ stream.inputBuffer.empty=The Stream input buffer is empty. Waiting for more data
stream.inputBuffer.readTimeout=Timeout waiting to read data from client
stream.inputBuffer.reset=Stream reset
stream.inputBuffer.signal=Data added to inBuffer when read thread is waiting. Signalling that thread to continue
-stream.inputBuffer.swallowUnread=Swallowing [{0}] bytes previous read into input stream buffer
+stream.inputBuffer.swallowUnread=Swallowing [{0}] bytes previously read into input stream buffer
stream.notWritable=Connection [{0}], Stream [{1}], This stream is not writable
stream.outputBuffer.flush.debug=Connection [{0}], Stream [{1}], flushing output with buffer at position [{2}], writeInProgress [{3}] and closed [{4}]
stream.recycle=Connection [{0}], Stream [{1}] has been recycled
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org