tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/generators ErrorHandler.java
Date Wed, 16 Oct 2002 06:03:40 GMT
billbarker    2002/10/15 23:03:40

  Modified:    src/share/org/apache/tomcat/modules/generators
                        ErrorHandler.java
  Log:
  Don't set the content-type on a 304 Not-Modified response.
  
  Submitted by: Martin Algesten puckman@taglab.com
  
  Revision  Changes    Path
  1.27      +5 -1      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.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- ErrorHandler.java	23 Mar 2002 02:45:52 -0000	1.26
  +++ ErrorHandler.java	16 Oct 2002 06:03:39 -0000	1.27
  @@ -683,7 +683,6 @@
   	String msg=(String)req.getAttribute("javax.servlet.error.message");
   	String errorURI = res.getErrorURI();
   	
  -	res.setContentType("text/html");
   	// res is reset !!!
   	// status is already set
   	int sc=res.getStatus();
  @@ -691,6 +690,11 @@
   	if( sc == 304 ) {
   	    //NotModified must not return a body
   	    return;
  +	} else {
  +	    // don't set a content type if we are answering If-Modified-Since.
  +	    // Proxy caches might update their cached content-type with this
  +	    // info (mod_proxy does it). Martin Algesten 15th Oct, 2002.
  +	    res.setContentType("text/html");
   	}
   
   	if( sbNote==0 ) {
  
  
  

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


Mime
View raw message