Log an error message if the AJP connector detects the the reverse proxy is sending AJP messages that are too large for the configured packetSize.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc8.0.x/trunk@1831441 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/java/org/apache/coyote/ajp/AbstractAjpProcessor.java b/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
index cbd6410..d70c9cf 100644
--- a/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
@@ -1099,10 +1099,10 @@
if (messageLength > message.getBuffer().length) {
// Message too long for the buffer
// Need to trigger a 400 response
- throw new IllegalArgumentException(sm.getString(
- "ajpprocessor.header.tooLong",
- Integer.valueOf(messageLength),
- Integer.valueOf(buf.length)));
+ String msg = sm.getString("ajpprocessor.header.tooLong",
+ Integer.valueOf(messageLength), Integer.valueOf(buf.length));
+ getLog().error(msg);
+ throw new IllegalArgumentException(msg);
}
read(buf, headerLength, messageLength, true);
return true;
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 802de3b..f1f2638 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -91,6 +91,15 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ Log an error message if the AJP connector detects the the reverse proxy
+ is sending AJP messages that are too large for the configured
+ <code>packetSize</code>. (markt)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Jasper">
<changelog>
<fix>