Author: markt
Date: Thu Aug 29 10:38:02 2013
New Revision: 1518576
URL: http://svn.apache.org/r1518576
Log:
Explicitly throw an exception if an HTTP upgrade is attempted on an AJP
connection. This ensures the client receives a 500 response.
Modified:
tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties
Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1518576&r1=1518575&r2=1518576&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Thu Aug
29 10:38:02 2013
@@ -468,7 +468,8 @@ public abstract class AbstractAjpProcess
((AtomicBoolean) param).set(asyncStateMachine.isAsyncError());
} else if (actionCode == ActionCode.UPGRADE) {
// HTTP connections only. Unsupported for AJP.
- // NOOP
+ throw new UnsupportedOperationException(
+ sm.getString("ajpprocessor.httpupgrade.notsupported"));
} else {
actionInternal(actionCode, param);
}
Modified: tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties?rev=1518576&r1=1518575&r2=1518576&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties Thu Aug 29
10:38:02 2013
@@ -24,7 +24,7 @@ ajpprocessor.request.process=Error proce
ajpprocessor.certs.fail=Certificate conversion failed
ajpprocessor.comet.notsupported=The Comet protocol is not supported by this
connector
ajpprocessor.ssl.notsupported=The SSL protocol is not supported by this
connector
-ajpprocessor.httpupgrade.notsupported=HTTP upgrades are not supported by this
connector
+ajpprocessor.httpupgrade.notsupported=HTTP upgrade is not supported by the AJP
protocol
ajpmessage.null=Cannot append null value
ajpmessage.overflow=Overflow error for buffer adding {0} bytes at position {1}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]