This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 6cbbcc149466a95bd2ee3bb4efacdc0723b683ad Author: Mark Thomas <ma...@apache.org> AuthorDate: Mon Mar 15 18:01:01 2021 +0000 Rename swallow() -> swallowPayload() --- java/org/apache/coyote/http2/Http2AsyncParser.java | 4 ++-- java/org/apache/coyote/http2/Http2Parser.java | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/java/org/apache/coyote/http2/Http2AsyncParser.java b/java/org/apache/coyote/http2/Http2AsyncParser.java index 12fa3bb..76dd855 100644 --- a/java/org/apache/coyote/http2/Http2AsyncParser.java +++ b/java/org/apache/coyote/http2/Http2AsyncParser.java @@ -106,7 +106,7 @@ class Http2AsyncParser extends Http2Parser { payload.flip(); try { if (streamException) { - swallow(streamId, payloadSize, false, payload); + swallowPayload(streamId, payloadSize, false, payload); } else { readSettingsFrame(flags, payloadSize, payload); } @@ -239,7 +239,7 @@ class Http2AsyncParser extends Http2Parser { do { continueParsing = false; if (streamException) { - swallow(streamId, payloadSize, false, payload); + swallowPayload(streamId, payloadSize, false, payload); } else { switch (frameType) { case DATA: diff --git a/java/org/apache/coyote/http2/Http2Parser.java b/java/org/apache/coyote/http2/Http2Parser.java index 7299ba6..6082edf 100644 --- a/java/org/apache/coyote/http2/Http2Parser.java +++ b/java/org/apache/coyote/http2/Http2Parser.java @@ -87,7 +87,7 @@ class Http2Parser { try { validateFrame(expected, frameType, streamId, flags, payloadSize); } catch (StreamException se) { - swallow(streamId, payloadSize, false, null); + swallowPayload(streamId, payloadSize, false, null); throw se; } @@ -171,11 +171,11 @@ class Http2Parser { ByteBuffer dest = output.startRequestBodyFrame(streamId, payloadSize, endOfStream); if (dest == null) { - swallow(streamId, dataLength, false, buffer); + swallowPayload(streamId, dataLength, false, buffer); // Process padding before sending any notifications in case padding // is invalid. if (padLength > 0) { - swallow(streamId, padLength, true, buffer); + swallowPayload(streamId, padLength, true, buffer); } if (endOfStream) { output.receivedEndOfStream(streamId); @@ -183,7 +183,7 @@ class Http2Parser { } else { synchronized (dest) { if (dest.remaining() < dataLength) { - swallow(streamId, dataLength, false, buffer); + swallowPayload(streamId, dataLength, false, buffer); // Client has sent more data than permitted by Window size throw new StreamException(sm.getString("http2Parser.processFrameData.window", connectionId), Http2Error.FLOW_CONTROL_ERROR, streamId); @@ -199,7 +199,7 @@ class Http2Parser { // Process padding before sending any notifications in case // padding is invalid. if (padLength > 0) { - swallow(streamId, padLength, true, buffer); + swallowPayload(streamId, padLength, true, buffer); } if (endOfStream) { output.receivedEndOfStream(streamId); @@ -224,7 +224,7 @@ class Http2Parser { try { hpackDecoder.setHeaderEmitter(output.headersStart(streamId, headersEndStream)); } catch (StreamException se) { - swallow(streamId, payloadSize, false, buffer); + swallowPayload(streamId, payloadSize, false, buffer); throw se; } @@ -268,7 +268,7 @@ class Http2Parser { readHeaderPayload(streamId, payloadSize, buffer); - swallow(streamId, padLength, true, buffer); + swallowPayload(streamId, padLength, true, buffer); if (Flags.isEndOfHeaders(flags)) { onHeadersComplete(streamId); @@ -518,7 +518,7 @@ class Http2Parser { protected void readUnknownFrame(int streamId, FrameType frameType, int flags, int payloadSize, ByteBuffer buffer) throws IOException { try { - swallow(streamId, payloadSize, false, buffer); + swallowPayload(streamId, payloadSize, false, buffer); } catch (ConnectionException e) { // Will never happen because swallow() is called with mustBeZero set // to false @@ -540,7 +540,7 @@ class Http2Parser { * @throws ConnectionException If the swallowed bytes are expected to have a * value of zero but do not */ - protected void swallow(int streamId, int len, boolean mustBeZero, ByteBuffer byteBuffer) + protected void swallowPayload(int streamId, int len, boolean mustBeZero, ByteBuffer byteBuffer) throws IOException, ConnectionException { if (log.isDebugEnabled()) { log.debug(sm.getString("http2Parser.swallow.debug", connectionId, --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org