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/facade22/org/apache/tomcat/facade HttpServletResponseFacade.java
Date Mon, 18 Feb 2002 03:43:38 GMT
billbarker    02/02/17 19:43:38

  Modified:    src/facade22/org/apache/tomcat/facade
                        HttpServletResponseFacade.java
  Log:
  Don't set DateHeaders if we are included.
  
  The spec forbids setting headers on includes, but the DateHeaders slipped through.  This
closes the hole.
  
  Fix for bug #6515
  Reported by: Paul Fu paul.fu@ssmb.com.au
  
  Revision  Changes    Path
  1.26      +11 -7     jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletResponseFacade.java
  
  Index: HttpServletResponseFacade.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletResponseFacade.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- HttpServletResponseFacade.java	5 Feb 2002 03:54:27 -0000	1.25
  +++ HttpServletResponseFacade.java	18 Feb 2002 03:43:38 -0000	1.26
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletResponseFacade.java,v
1.25 2002/02/05 03:54:27 billbarker Exp $
  - * $Revision: 1.25 $
  - * $Date: 2002/02/05 03:54:27 $
  + * $Header: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletResponseFacade.java,v
1.26 2002/02/18 03:43:38 billbarker Exp $
  + * $Revision: 1.26 $
  + * $Date: 2002/02/18 03:43:38 $
    *
    * ====================================================================
    *
  @@ -250,13 +250,17 @@
       }
   
       public void setDateHeader(String name, long date) {
  -	MimeHeaders headers=response.getMimeHeaders();
  -	headers.setValue( name ).setTime( date );
  +	if( ! response.isIncluded() ) {
  +	    MimeHeaders headers=response.getMimeHeaders();
  +	    headers.setValue( name ).setTime( date );
  +	}
       }
   
       public void addDateHeader(String name, long value) {
  -	MimeHeaders headers=response.getMimeHeaders();
  -	headers.addValue( name ).setTime( value );
  +	if ( ! response.isIncluded() ) {
  +	    MimeHeaders headers=response.getMimeHeaders();
  +	    headers.addValue( name ).setTime( value );
  +	}
       }
   
       public void setHeader(String name, String value) {
  
  
  

--
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