Author: markt
Date: Wed Jun 4 21:04:11 2014
New Revision: 1600495
URL: http://svn.apache.org/r1600495
Log:
Fix regression in r1600449
Modified:
tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
Modified: tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java?rev=1600495&r1=1600494&r2=1600495&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java Wed Jun
4 21:04:11 2014
@@ -81,8 +81,8 @@ public class ErrorReportValve extends Va
// Check the response for an error
Throwable throwable = (Throwable)
request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
- if (request.isAsyncStarted() && ((response.getStatus() < 400 &&
- throwable == null) || request.isAsyncDispatching())) {
+ if (response.getStatus() < 400 && throwable == null &&
!response.isError() ||
+ request.isAsyncDispatching()) {
return;
}
@@ -140,15 +140,8 @@ public class ErrorReportValve extends Va
*/
protected void report(Request request, Response response, Throwable
throwable) {
- // Do nothing on non-HTTP responses
int statusCode = response.getStatus();
- // Do nothing on a 1xx, 2xx and 3xx status
- // Do nothing if anything has been written already
- if (statusCode < 400 || response.getContentWritten() > 0 ||
!response.isError()) {
- return;
- }
-
String message = RequestUtil.filter(response.getMessage());
if (message == null) {
if (throwable != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]