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 f0959fe Consistent formatting of stream ID in HTTP/2 debug log
messages
f0959fe is described below
commit f0959fe62c0965600ee2607a2012bf61882275ab
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Sep 21 14:52:33 2020 +0100
Consistent formatting of stream ID in HTTP/2 debug log messages
---
java/org/apache/coyote/http2/AbstractStream.java | 11 ++++-
.../apache/coyote/http2/Http2UpgradeHandler.java | 24 +++++-----
java/org/apache/coyote/http2/Stream.java | 54 +++++++++++-----------
java/org/apache/coyote/http2/StreamProcessor.java | 12 ++---
.../apache/coyote/http2/StreamStateMachine.java | 8 ++--
.../coyote/http2/WindowAllocationManager.java | 18 ++++----
webapps/docs/changelog.xml | 4 ++
7 files changed, 71 insertions(+), 60 deletions(-)
diff --git a/java/org/apache/coyote/http2/AbstractStream.java
b/java/org/apache/coyote/http2/AbstractStream.java
index 55a5c2c..3e4ec73 100644
--- a/java/org/apache/coyote/http2/AbstractStream.java
+++ b/java/org/apache/coyote/http2/AbstractStream.java
@@ -33,6 +33,7 @@ abstract class AbstractStream {
private static final StringManager sm =
StringManager.getManager(AbstractStream.class);
private final Integer identifier;
+ private final String idAsString;
private volatile AbstractStream parentStream = null;
private final Set<Stream> childStreams =
@@ -42,6 +43,7 @@ abstract class AbstractStream {
public AbstractStream(Integer identifier) {
this.identifier = identifier;
+ this.idAsString = identifier.toString();
}
@@ -50,6 +52,11 @@ abstract class AbstractStream {
}
+ final String getIdAsString() {
+ return idAsString;
+ }
+
+
public int getIdAsInt() {
return identifier.intValue();
}
@@ -119,7 +126,7 @@ abstract class AbstractStream {
if (log.isDebugEnabled()) {
log.debug(sm.getString("abstractStream.windowSizeInc",
getConnectionId(),
- getIdentifier(), Integer.toString(increment),
Long.toString(windowSize)));
+ getIdAsString(), Integer.toString(increment),
Long.toString(windowSize)));
}
if (windowSize > ConnectionSettingsBase.MAX_WINDOW_SIZE) {
@@ -142,7 +149,7 @@ abstract class AbstractStream {
windowSize -= decrement;
if (log.isDebugEnabled()) {
log.debug(sm.getString("abstractStream.windowSizeDec",
getConnectionId(),
- getIdentifier(), Integer.toString(decrement),
Long.toString(windowSize)));
+ getIdAsString(), Integer.toString(decrement),
Long.toString(windowSize)));
}
}
diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 4bc31fb..1ff8b3e 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -661,10 +661,10 @@ public class Http2UpgradeHandler extends AbstractStream
implements InternalHttpU
if (log.isDebugEnabled()) {
if (pushedStreamId == 0) {
log.debug(sm.getString("upgradeHandler.writeHeaders",
connectionId,
- stream.getIdentifier()));
+ stream.getIdAsString()));
} else {
log.debug(sm.getString("upgradeHandler.writePushHeaders",
connectionId,
- stream.getIdentifier(),
Integer.valueOf(pushedStreamId),
+ stream.getIdAsString(),
Integer.valueOf(pushedStreamId),
Boolean.valueOf(endOfStream)));
}
}
@@ -740,7 +740,7 @@ public class Http2UpgradeHandler extends AbstractStream
implements InternalHttpU
void writeBody(Stream stream, ByteBuffer data, int len, boolean finished)
throws IOException {
if (log.isDebugEnabled()) {
- log.debug(sm.getString("upgradeHandler.writeBody", connectionId,
stream.getIdentifier(),
+ log.debug(sm.getString("upgradeHandler.writeBody", connectionId,
stream.getIdAsString(),
Integer.toString(len)));
}
@@ -908,7 +908,7 @@ public class Http2UpgradeHandler extends AbstractStream
implements InternalHttpU
if (stream.isActive()) {
if (log.isDebugEnabled()) {
log.debug(sm.getString("upgradeHandler.noAllocation",
- connectionId,
stream.getIdentifier()));
+ connectionId,
stream.getIdAsString()));
}
// No allocation
// Close the connection. Do this first
since
@@ -929,7 +929,7 @@ public class Http2UpgradeHandler extends AbstractStream
implements InternalHttpU
} catch (InterruptedException e) {
throw new IOException(sm.getString(
"upgradeHandler.windowSizeReservationInterrupted", connectionId,
- stream.getIdentifier(),
Integer.toString(reservation)), e);
+ stream.getIdAsString(),
Integer.toString(reservation)), e);
}
} else {
stream.waitForConnectionAllocationNonBlocking();
@@ -961,7 +961,7 @@ public class Http2UpgradeHandler extends AbstractStream
implements InternalHttpU
for (AbstractStream stream : streamsToNotify) {
if (log.isDebugEnabled()) {
log.debug(sm.getString("upgradeHandler.releaseBacklog",
- connectionId, stream.getIdentifier()));
+ connectionId, stream.getIdAsString()));
}
// There is never any O/P on stream zero but it is included in
// the backlog as it simplifies the code. Skip it if it appears
@@ -1013,7 +1013,7 @@ public class Http2UpgradeHandler extends AbstractStream
implements InternalHttpU
private int allocate(AbstractStream stream, int allocation) {
if (log.isDebugEnabled()) {
log.debug(sm.getString("upgradeHandler.allocate.debug",
getConnectionId(),
- stream.getIdentifier(), Integer.toString(allocation)));
+ stream.getIdAsString(), Integer.toString(allocation)));
}
// Allocate to the specified stream
BacklogTracker tracker = backLogStreams.get(stream);
@@ -1026,7 +1026,7 @@ public class Http2UpgradeHandler extends AbstractStream
implements InternalHttpU
if (log.isDebugEnabled()) {
log.debug(sm.getString("upgradeHandler.allocate.left",
- getConnectionId(), stream.getIdentifier(),
Integer.toString(leftToAllocate)));
+ getConnectionId(), stream.getIdAsString(),
Integer.toString(leftToAllocate)));
}
// Recipients are children of the current stream that are in the
@@ -1046,7 +1046,7 @@ public class Http2UpgradeHandler extends AbstractStream
implements InternalHttpU
for (AbstractStream recipient : recipients) {
if (log.isDebugEnabled()) {
log.debug(sm.getString("upgradeHandler.allocate.recipient",
- getConnectionId(), stream.getIdentifier(),
recipient.getIdentifier(),
+ getConnectionId(), stream.getIdAsString(),
recipient.getIdAsString(),
Integer.toString(recipient.getWeight())));
}
totalWeight += recipient.getWeight();
@@ -1085,7 +1085,7 @@ public class Http2UpgradeHandler extends AbstractStream
implements InternalHttpU
Stream result = streams.get(key);
if (result == null && unknownIsError) {
// Stream has been closed and removed from the map
- throw new
ConnectionException(sm.getString("upgradeHandler.stream.closed", key),
+ throw new
ConnectionException(sm.getString("upgradeHandler.stream.closed",
key.toString()),
Http2Error.PROTOCOL_ERROR);
}
return result;
@@ -1711,7 +1711,7 @@ public class Http2UpgradeHandler extends AbstractStream
implements InternalHttpU
} catch (Http2Exception h2e) {
stream.close(new StreamException(sm.getString(
"upgradeHandler.windowSizeTooBig", connectionId,
- stream.getIdentifier()),
+ stream.getIdAsString()),
h2e.getError(), stream.getIdAsInt()));
}
}
@@ -1727,7 +1727,7 @@ public class Http2UpgradeHandler extends AbstractStream
implements InternalHttpU
if (!localSettings.ack()) {
// Ack was unexpected
log.warn(sm.getString(
- "upgradeHandler.unexpectedAck", connectionId,
getIdentifier()));
+ "upgradeHandler.unexpectedAck", connectionId,
getIdAsString()));
}
} else {
synchronized (socketWrapper) {
diff --git a/java/org/apache/coyote/http2/Stream.java
b/java/org/apache/coyote/http2/Stream.java
index 813980c..b78d55a 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -176,8 +176,8 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
void rePrioritise(AbstractStream parent, boolean exclusive, int weight) {
if (log.isDebugEnabled()) {
log.debug(sm.getString("stream.reprioritisation.debug",
- getConnectionId(), getIdentifier(),
Boolean.toString(exclusive),
- parent.getIdentifier(), Integer.toString(weight)));
+ getConnectionId(), getIdAsString(),
Boolean.toString(exclusive),
+ parent.getIdAsString(), Integer.toString(weight)));
}
// Check if new parent is a descendant of this stream
@@ -211,8 +211,8 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
final void rePrioritise(AbstractStream parent, int weight) {
if (log.isDebugEnabled()) {
log.debug(sm.getString("stream.reprioritisation.debug",
- getConnectionId(), getIdentifier(), Boolean.FALSE,
- parent.getIdentifier(), Integer.toString(weight)));
+ getConnectionId(), getIdAsString(), Boolean.FALSE,
+ parent.getIdAsString(), Integer.toString(weight)));
}
parent.addChild(this);
@@ -222,7 +222,7 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
void receiveReset(long errorCode) {
if (log.isDebugEnabled()) {
- log.debug(sm.getString("stream.reset.receive", getConnectionId(),
getIdentifier(),
+ log.debug(sm.getString("stream.reset.receive", getConnectionId(),
getIdAsString(),
Long.toString(errorCode)));
}
// Set the new state first since read and write both check this
@@ -264,7 +264,7 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
while (windowSize < 1) {
if (!canWrite()) {
throw new CloseNowException(sm.getString("stream.notWritable",
- getConnectionId(), getIdentifier()));
+ getConnectionId(), getIdAsString()));
}
if (block) {
try {
@@ -334,25 +334,25 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
@Override
public final void emitHeader(String name, String value) throws
HpackException {
if (log.isDebugEnabled()) {
- log.debug(sm.getString("stream.header.debug", getConnectionId(),
getIdentifier(),
+ log.debug(sm.getString("stream.header.debug", getConnectionId(),
getIdAsString(),
name, value));
}
// Header names must be lower case
if (!name.toLowerCase(Locale.US).equals(name)) {
throw new HpackException(sm.getString("stream.header.case",
- getConnectionId(), getIdentifier(), name));
+ getConnectionId(), getIdAsString(), name));
}
if ("connection".equals(name)) {
throw new HpackException(sm.getString("stream.header.connection",
- getConnectionId(), getIdentifier()));
+ getConnectionId(), getIdAsString()));
}
if ("te".equals(name)) {
if (!"trailers".equals(value)) {
throw new HpackException(sm.getString("stream.header.te",
- getConnectionId(), getIdentifier(), value));
+ getConnectionId(), getIdAsString(), value));
}
}
@@ -364,14 +364,14 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
if (name.length() == 0) {
throw new HpackException(sm.getString("stream.header.empty",
- getConnectionId(), getIdentifier()));
+ getConnectionId(), getIdAsString()));
}
boolean pseudoHeader = name.charAt(0) == ':';
if (pseudoHeader && headerState != HEADER_STATE_PSEUDO) {
headerException = new StreamException(sm.getString(
- "stream.header.unexpectedPseudoHeader", getConnectionId(),
getIdentifier(),
+ "stream.header.unexpectedPseudoHeader", getConnectionId(),
getIdAsString(),
name), Http2Error.PROTOCOL_ERROR, getIdAsInt());
// No need for further processing. The stream will be reset.
return;
@@ -387,7 +387,7 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
coyoteRequest.method().setString(value);
} else {
throw new
HpackException(sm.getString("stream.header.duplicate",
- getConnectionId(), getIdentifier(), ":method" ));
+ getConnectionId(), getIdAsString(), ":method" ));
}
break;
}
@@ -396,18 +396,18 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
coyoteRequest.scheme().setString(value);
} else {
throw new
HpackException(sm.getString("stream.header.duplicate",
- getConnectionId(), getIdentifier(), ":scheme" ));
+ getConnectionId(), getIdAsString(), ":scheme" ));
}
break;
}
case ":path": {
if (!coyoteRequest.requestURI().isNull()) {
throw new
HpackException(sm.getString("stream.header.duplicate",
- getConnectionId(), getIdentifier(), ":path" ));
+ getConnectionId(), getIdAsString(), ":path" ));
}
if (value.length() == 0) {
throw new HpackException(sm.getString("stream.header.noPath",
- getConnectionId(), getIdentifier()));
+ getConnectionId(), getIdAsString()));
}
int queryStart = value.indexOf('?');
String uri;
@@ -434,7 +434,7 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
} catch (IllegalArgumentException iae) {
// Host value invalid
throw new
HpackException(sm.getString("stream.header.invalid",
- getConnectionId(), getIdentifier(), ":authority",
value));
+ getConnectionId(), getIdAsString(), ":authority",
value));
}
if (i > -1) {
coyoteRequest.serverName().setString(value.substring(0,
i));
@@ -444,7 +444,7 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
}
} else {
throw new
HpackException(sm.getString("stream.header.duplicate",
- getConnectionId(), getIdentifier(), ":authority" ));
+ getConnectionId(), getIdAsString(), ":authority" ));
}
break;
}
@@ -468,7 +468,7 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
}
if (pseudoHeader) {
headerException = new StreamException(sm.getString(
- "stream.header.unknownPseudoHeader",
getConnectionId(), getIdentifier(),
+ "stream.header.unknownPseudoHeader",
getConnectionId(), getIdAsString(),
name), Http2Error.PROTOCOL_ERROR, getIdAsInt());
}
@@ -500,7 +500,7 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
if (coyoteRequest.method().isNull() || coyoteRequest.scheme().isNull()
||
coyoteRequest.requestURI().isNull()) {
throw new
ConnectionException(sm.getString("stream.header.required",
- getConnectionId(), getIdentifier()),
Http2Error.PROTOCOL_ERROR);
+ getConnectionId(), getIdAsString()),
Http2Error.PROTOCOL_ERROR);
}
// Cookie headers need to be concatenated into a single header
// See RFC 7540 8.1.2.5
@@ -573,7 +573,7 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
handler.getHpackDecoder().setMaxHeaderSize(handler.getMaxTrailerSize());
} else {
throw new
ConnectionException(sm.getString("stream.trailerHeader.noEndOfStream",
- getConnectionId(), getIdentifier()),
Http2Error.PROTOCOL_ERROR);
+ getConnectionId(), getIdAsString()),
Http2Error.PROTOCOL_ERROR);
}
}
// Parser will catch attempt to send a headers frame after the stream
@@ -592,7 +592,7 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
long contentLengthHeader = coyoteRequest.getContentLengthLong();
if (contentLengthHeader > -1 && contentLengthReceived >
contentLengthHeader) {
throw new
ConnectionException(sm.getString("stream.header.contentLength",
- getConnectionId(), getIdentifier(),
Long.valueOf(contentLengthHeader),
+ getConnectionId(), getIdAsString(),
Long.valueOf(contentLengthHeader),
Long.valueOf(contentLengthReceived)),
Http2Error.PROTOCOL_ERROR);
}
}
@@ -601,7 +601,7 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
final void receivedEndOfStream() throws ConnectionException {
if (isContentLengthInconsistent()) {
throw new
ConnectionException(sm.getString("stream.header.contentLength",
- getConnectionId(), getIdentifier(),
+ getConnectionId(), getIdAsString(),
Long.valueOf(coyoteRequest.getContentLengthLong()),
Long.valueOf(contentLengthReceived)),
Http2Error.PROTOCOL_ERROR);
}
@@ -687,7 +687,7 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
try {
StreamException se = (StreamException) http2Exception;
if (log.isDebugEnabled()) {
- log.debug(sm.getString("stream.reset.send",
getConnectionId(), getIdentifier(),
+ log.debug(sm.getString("stream.reset.send",
getConnectionId(), getIdAsString(),
se.getError()));
}
state.sendReset();
@@ -719,7 +719,7 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
*/
final void recycle() {
if (log.isDebugEnabled()) {
- log.debug(sm.getString("stream.recycle", getConnectionId(),
getIdentifier()));
+ log.debug(sm.getString("stream.recycle", getConnectionId(),
getIdAsString()));
}
/*
* Temporarily disabled due to multiple regressions (NPEs)
@@ -869,7 +869,7 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
public synchronized int doWrite(ByteBuffer chunk) throws IOException {
if (closed) {
throw new IllegalStateException(
- sm.getString("stream.closed", getConnectionId(),
getIdentifier()));
+ sm.getString("stream.closed", getConnectionId(),
getIdAsString()));
}
int totalThisTime = 0;
if (writeBuffer.isEmpty()) {
@@ -938,7 +938,7 @@ public class Stream extends AbstractStream implements
HeaderEmitter {
throws IOException {
if (log.isDebugEnabled()) {
log.debug(sm.getString("stream.outputBuffer.flush.debug",
getConnectionId(),
- getIdentifier(), Integer.toString(buffer.position()),
+ getIdAsString(), Integer.toString(buffer.position()),
Boolean.toString(writeInProgress),
Boolean.toString(closed)));
}
if (buffer.position() == 0) {
diff --git a/java/org/apache/coyote/http2/StreamProcessor.java
b/java/org/apache/coyote/http2/StreamProcessor.java
index 2c77a64..81ed660 100644
--- a/java/org/apache/coyote/http2/StreamProcessor.java
+++ b/java/org/apache/coyote/http2/StreamProcessor.java
@@ -76,14 +76,14 @@ class StreamProcessor extends AbstractProcessor {
if (!getErrorState().isConnectionIoAllowed()) {
ConnectionException ce = new
ConnectionException(sm.getString(
"streamProcessor.error.connection",
stream.getConnectionId(),
- stream.getIdentifier()),
Http2Error.INTERNAL_ERROR);
+ stream.getIdAsString()),
Http2Error.INTERNAL_ERROR);
stream.close(ce);
} else if (!getErrorState().isIoAllowed()) {
StreamException se = stream.getResetException();
if (se == null) {
se = new StreamException(sm.getString(
"streamProcessor.error.stream",
stream.getConnectionId(),
- stream.getIdentifier()),
Http2Error.INTERNAL_ERROR,
+ stream.getIdAsString()),
Http2Error.INTERNAL_ERROR,
stream.getIdAsInt());
}
stream.close(se);
@@ -96,7 +96,7 @@ class StreamProcessor extends AbstractProcessor {
}
} catch (Exception e) {
String msg =
sm.getString("streamProcessor.error.connection",
- stream.getConnectionId(), stream.getIdentifier());
+ stream.getConnectionId(), stream.getIdAsString());
if (log.isDebugEnabled()) {
log.debug(msg, e);
}
@@ -326,7 +326,7 @@ class StreamProcessor extends AbstractProcessor {
@Override
protected Object getStreamID() {
- return stream.getIdentifier().toString();
+ return stream.getIdAsString().toString();
}
@@ -389,7 +389,7 @@ class StreamProcessor extends AbstractProcessor {
protected boolean flushBufferedWrite() throws IOException {
if (log.isDebugEnabled()) {
log.debug(sm.getString("streamProcessor.flushBufferedWrite.entry",
- stream.getConnectionId(), stream.getIdentifier()));
+ stream.getConnectionId(), stream.getIdAsString()));
}
if (stream.flush(false)) {
// The buffer wasn't fully flushed so re-register the
@@ -425,7 +425,7 @@ class StreamProcessor extends AbstractProcessor {
// triggered.
StreamException se = new StreamException(
sm.getString("streamProcessor.cancel",
stream.getConnectionId(),
- stream.getIdentifier()), Http2Error.CANCEL,
stream.getIdAsInt());
+ stream.getIdAsString()), Http2Error.CANCEL,
stream.getIdAsInt());
handler.sendStreamReset(se);
}
}
diff --git a/java/org/apache/coyote/http2/StreamStateMachine.java
b/java/org/apache/coyote/http2/StreamStateMachine.java
index d63e56e..66aee45 100644
--- a/java/org/apache/coyote/http2/StreamStateMachine.java
+++ b/java/org/apache/coyote/http2/StreamStateMachine.java
@@ -97,7 +97,7 @@ public class StreamStateMachine {
public synchronized void sendReset() {
if (state == State.IDLE) {
throw new
IllegalStateException(sm.getString("streamStateMachine.debug.change",
- stream.getConnectionId(), stream.getIdentifier(), state));
+ stream.getConnectionId(), stream.getIdAsString(), state));
}
if (state.canReset()) {
stateChange(state, State.CLOSED_RST_TX);
@@ -115,7 +115,7 @@ public class StreamStateMachine {
state = newState;
if (log.isDebugEnabled()) {
log.debug(sm.getString("streamStateMachine.debug.change",
stream.getConnectionId(),
- stream.getIdentifier(), oldState, newState));
+ stream.getIdAsString(), oldState, newState));
}
}
}
@@ -127,11 +127,11 @@ public class StreamStateMachine {
if (!isFrameTypePermitted(frameType)) {
if (state.connectionErrorForInvalidFrame) {
throw new
ConnectionException(sm.getString("streamStateMachine.invalidFrame",
- stream.getConnectionId(), stream.getIdentifier(),
state, frameType),
+ stream.getConnectionId(), stream.getIdAsString(),
state, frameType),
state.errorCodeForInvalidFrame);
} else {
throw new
StreamException(sm.getString("streamStateMachine.invalidFrame",
- stream.getConnectionId(), stream.getIdentifier(),
state, frameType),
+ stream.getConnectionId(), stream.getIdAsString(),
state, frameType),
state.errorCodeForInvalidFrame, stream.getIdAsInt());
}
}
diff --git a/java/org/apache/coyote/http2/WindowAllocationManager.java
b/java/org/apache/coyote/http2/WindowAllocationManager.java
index 973ce59..96016cc 100644
--- a/java/org/apache/coyote/http2/WindowAllocationManager.java
+++ b/java/org/apache/coyote/http2/WindowAllocationManager.java
@@ -68,7 +68,7 @@ class WindowAllocationManager {
void waitForStream(long timeout) throws InterruptedException {
if (log.isDebugEnabled()) {
log.debug(sm.getString("windowAllocationManager.waitFor.stream",
- stream.getConnectionId(), stream.getIdentifier(),
Long.toString(timeout)));
+ stream.getConnectionId(), stream.getIdAsString(),
Long.toString(timeout)));
}
waitFor(STREAM, timeout);
@@ -78,7 +78,7 @@ class WindowAllocationManager {
void waitForConnection(long timeout) throws InterruptedException {
if (log.isDebugEnabled()) {
log.debug(sm.getString("windowAllocationManager.waitFor.connection",
- stream.getConnectionId(), stream.getIdentifier(),
Long.toString(timeout)));
+ stream.getConnectionId(), stream.getIdAsString(),
Long.toString(timeout)));
}
waitFor(CONNECTION, timeout);
@@ -88,7 +88,7 @@ class WindowAllocationManager {
void waitForStreamNonBlocking() {
if (log.isDebugEnabled()) {
log.debug(sm.getString("windowAllocationManager.waitForNonBlocking.stream",
- stream.getConnectionId(), stream.getIdentifier()));
+ stream.getConnectionId(), stream.getIdAsString()));
}
waitForNonBlocking(STREAM);
@@ -98,7 +98,7 @@ class WindowAllocationManager {
void waitForConnectionNonBlocking() {
if (log.isDebugEnabled()) {
log.debug(sm.getString("windowAllocationManager.waitForNonBlocking.connection",
- stream.getConnectionId(), stream.getIdentifier()));
+ stream.getConnectionId(), stream.getIdAsString()));
}
waitForNonBlocking(CONNECTION);
@@ -141,7 +141,7 @@ class WindowAllocationManager {
synchronized (stream) {
if (waitingFor != NONE) {
throw new
IllegalStateException(sm.getString("windowAllocationManager.waitFor.ise",
- stream.getConnectionId(), stream.getIdentifier()));
+ stream.getConnectionId(), stream.getIdAsString()));
}
waitingFor = waitTarget;
@@ -164,7 +164,7 @@ class WindowAllocationManager {
// Non-blocking post-processing may attempt to flush
} else {
throw new
IllegalStateException(sm.getString("windowAllocationManager.waitFor.ise",
- stream.getConnectionId(), stream.getIdentifier()));
+ stream.getConnectionId(), stream.getIdAsString()));
}
}
@@ -174,7 +174,7 @@ class WindowAllocationManager {
private void notify(int notifyTarget) {
if (log.isDebugEnabled()) {
log.debug(sm.getString("windowAllocationManager.notify",
stream.getConnectionId(),
- stream.getIdentifier(), Integer.toString(waitingFor),
Integer.toString(notifyTarget)));
+ stream.getIdAsString(), Integer.toString(waitingFor),
Integer.toString(notifyTarget)));
}
synchronized (stream) {
@@ -191,14 +191,14 @@ class WindowAllocationManager {
// Blocking, so use notify to release
StreamOutputBuffer
if (log.isDebugEnabled()) {
log.debug(sm.getString("windowAllocationManager.notified",
- stream.getConnectionId(),
stream.getIdentifier()));
+ stream.getConnectionId(),
stream.getIdAsString()));
}
stream.notify();
} else {
// Non-blocking so dispatch
if (log.isDebugEnabled()) {
log.debug(sm.getString("windowAllocationManager.dispatched",
- stream.getConnectionId(),
stream.getIdentifier()));
+ stream.getConnectionId(),
stream.getIdAsString()));
}
response.action(ActionCode.DISPATCH_WRITE, null);
// Need to explicitly execute dispatches on the
StreamProcessor
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ac004dc..8ecd987 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -76,6 +76,10 @@
response if the Connector was configured with
<code>maxSwallowSize=-1</code>. (markt)
</fix>
+ <fix>
+ When logging HTTP/2 debug messages, use consistent formatting for
stream
+ idnetifiers. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]