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 7cef66b Tweak the debug logging so the content of all header packets
are dumped
7cef66b is described below
commit 7cef66bea2d04c266b6cf62dd63821e529d12fe9
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Sep 2 12:08:43 2020 +0100
Tweak the debug logging so the content of all header packets are dumped
---
java/org/apache/coyote/http11/Http11InputBuffer.java | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java
b/java/org/apache/coyote/http11/Http11InputBuffer.java
index 3b2c118..3ed3f20 100644
--- a/java/org/apache/coyote/http11/Http11InputBuffer.java
+++ b/java/org/apache/coyote/http11/Http11InputBuffer.java
@@ -399,10 +399,6 @@ public class Http11InputBuffer implements InputBuffer,
ApplicationBufferHandler
parsingRequestLineStart = byteBuffer.position();
parsingRequestLinePhase = 2;
- if (log.isDebugEnabled()) {
- log.debug("Received ["
- + new String(byteBuffer.array(),
byteBuffer.position(), byteBuffer.remaining(), StandardCharsets.ISO_8859_1) +
"]");
- }
}
if (parsingRequestLinePhase == 2) {
//
@@ -769,7 +765,7 @@ public class Http11InputBuffer implements InputBuffer,
ApplicationBufferHandler
private boolean fill(boolean block) throws IOException {
if (log.isDebugEnabled()) {
- log.debug("parsingHeader: [" + parsingHeader +
+ log.debug("Before fill(): [" + parsingHeader +
"], parsingRequestLine: [" + parsingRequestLine +
"], parsingRequestLinePhase: [" + parsingRequestLinePhase +
"], parsingRequestLineStart: [" + parsingRequestLineStart +
@@ -795,6 +791,12 @@ public class Http11InputBuffer implements InputBuffer,
ApplicationBufferHandler
byteBuffer.limit(byteBuffer.capacity());
int nRead = wrapper.read(block, byteBuffer);
byteBuffer.limit(byteBuffer.position()).reset();
+
+ if (log.isDebugEnabled()) {
+ log.debug("Received ["
+ + new String(byteBuffer.array(), byteBuffer.position(),
byteBuffer.remaining(), StandardCharsets.ISO_8859_1) + "]");
+ }
+
if (nRead > 0) {
return true;
} else if (nRead == -1) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]