You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ke...@apache.org on 2001/12/20 20:56:44 UTC

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/generators ErrorHandler.java

keith       01/12/20 11:56:44

  Modified:    src/share/org/apache/tomcat/modules/generators
                        ErrorHandler.java
  Log:
  The statusHandler is returning a body for 304 responses,
  which is forbidden by both HTTP/1.1 and HTTP/1.0.
  
  IE is forgiving, but Netscape Navs < 6.x assume that a
  body is not there, even if the content-length is set
  (it is).  So, the 304 response body gets munged with the
  next response body.  Of course, this does not happen
  standalone because the bug requires connections to be
  kept alive.
  
  cf <http://www.w3.org/Protocols/HTTP/1.0/spec.html#Code304>,
     <http://www.w3.org/Protocols/HTTP/1.1/spec.html#Code304>
  
  Revision  Changes    Path
  1.21      +5 -0      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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- ErrorHandler.java	2001/10/06 02:31:10	1.20
  +++ ErrorHandler.java	2001/12/20 19:56:44	1.21
  @@ -665,6 +665,11 @@
   	// status is already set
   	int sc=res.getStatus();
   	
  +        if( sc == 304 ) {
  +          //NotModified must not return a body
  +          return;
  +        }
  +
   	if( sbNote==0 ) {
   	    sbNote=req.getContextManager().getNoteId(ContextManager.REQUEST_NOTE,
   						     "StatusHandler.buff");
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>