tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/generators ErrorHandler.java
Date Sat, 02 Jun 2001 21:40:38 GMT
nacho       01/06/02 14:40:38

  Modified:    src/share/org/apache/tomcat/modules/generators
                        ErrorHandler.java
  Log:
  * nothing below 400 is logged, 3XX are normal status.
  * return a true html page for the body of the status messages
  
  Revision  Changes    Path
  1.12      +4 -3      jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/ErrorHandler.java
  
  Index: ErrorHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/ErrorHandler.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ErrorHandler.java	2001/04/24 14:45:41	1.11
  +++ ErrorHandler.java	2001/06/02 21:40:38	1.12
  @@ -163,7 +163,7 @@
   	// error
   	// XXX this log was intended to debug the status code generation.
   	// it can be removed for all cases.
  -	if( code != 302 && code != 401 && code!=400  ) {// tuneme
  +	if( code > 401 ) {// tuneme
   	    ctx.log( "Status code:" + code + " request:"  + req + " msg:" +
   		     req.getAttribute("javax.servlet.error.message"));
   	}
  @@ -724,7 +724,7 @@
   	    buf = new StringBuffer();
   	    req.setNote( sbNote, buf );
   	}
  -	buf.append("<head><title>").
  +	buf.append("<html><head><title>").
   	    append(sm.getString("defaulterrorpage.documentmoved")).
   	    append("</title></head>\r\n<body><h1>").
   	    append(sm.getString("defaulterrorpage.documentmoved")).
  @@ -732,10 +732,11 @@
   	    append(sm.getString("defaulterrorpage.thisdocumenthasmoved")).
   	    append(" <a href=\"").
   	    append( HttpMessages.filter( location ) ).
  -	    append("\">here</a>.<p>\r\n</body>\r\n");
  +	    append("\">here</a>.<p>\r\n</body>\r\n</html>");
   
   	res.setContentLength(buf.length());
   	res.getBuffer().write( buf );
  +        res.getBuffer().close();
   	buf.setLength(0);
   
       }
  
  
  

Mime
View raw message