tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves ErrorReportValve.java
Date Thu, 01 Jan 2004 23:54:27 GMT
markt       2004/01/01 15:54:27

  Modified:    catalina/src/share/org/apache/catalina/valves
                        ErrorReportValve.java
  Log:
  - Fix bug 9625.
  - Stack traces are now escaped to ensure correct display.
  - Ported from TC5.
  
  Revision  Changes    Path
  1.14      +6 -15     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java
  
  Index: ErrorReportValve.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ErrorReportValve.java	4 Oct 2002 12:30:52 -0000	1.13
  +++ ErrorReportValve.java	1 Jan 2004 23:54:27 -0000	1.14
  @@ -69,26 +69,17 @@
   import java.io.PrintWriter;
   import java.io.StringWriter;
   import java.io.Writer;
  -import java.util.ArrayList;
  -import java.util.Enumeration;
  -import java.util.Iterator;
   import java.util.Locale;
   import javax.servlet.ServletException;
   import javax.servlet.ServletRequest;
   import javax.servlet.ServletResponse;
  -import javax.servlet.http.Cookie;
  -import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
  -import org.apache.catalina.Container;
   import org.apache.catalina.Globals;
  -import org.apache.catalina.HttpRequest;
   import org.apache.catalina.HttpResponse;
   import org.apache.catalina.Logger;
   import org.apache.catalina.Request;
   import org.apache.catalina.Response;
  -import org.apache.catalina.Valve;
   import org.apache.catalina.ValveContext;
  -import org.apache.catalina.connector.HttpResponseWrapper;
   import org.apache.catalina.util.RequestUtil;
   import org.apache.catalina.util.ServerInfo;
   import org.apache.catalina.util.StringManager;
  @@ -324,7 +315,7 @@
               sb.append("<p><b>");
               sb.append(sm.getString("errorReportValve.exception"));
               sb.append("</b> <pre>");
  -            sb.append(stackTrace.toString());
  +            sb.append(RequestUtil.filter(stackTrace.toString()));
               sb.append("</pre></p>");
               if (rootCause != null) {
                   stackTrace = new StringWriter();
  @@ -332,7 +323,7 @@
                   sb.append("<p><b>");
                   sb.append(sm.getString("errorReportValve.rootCause"));
                   sb.append("</b> <pre>");
  -                sb.append(stackTrace.toString());
  +                sb.append(RequestUtil.filter(stackTrace.toString()));
                   sb.append("</pre></p>");
               }
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message