You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rob Hartill <ro...@imdb.com> on 1996/06/05 03:08:09 UTC

patch for mod_expires

mod_expires allows an Expires header to be added by default, i.e. on
any content-type returned, however a check was added (to avoid a core
dump using table_get) to return 'DECLINED' immediately when there was
no content-type recorded for the response.

this patch allows ExpiresDefault to be used with responses that use the
DefaultType by not DECLINING, but instead skipping the table_get check
and then looking for an ExpiresDefault.

BTW, I playing more with this module because the pesky AOL caches are
hanging on to data way after it has become stale :-(

rob
-=-=-=-

*** mod_expires.c.orig	Tue Jun  4 18:54:44 1996
--- mod_expires.c	Tue Jun  4 18:55:31 1996
***************
*** 407,415 ****
       * work...  Bah.
       */
      if ( r->content_type == NULL )
! 	return DECLINED;
! 
!     code = (char *) table_get( conf->expiresbytype, r->content_type );
  
      if ( code == NULL ) {
  	/* no expires defined for that type, is there a default? */
--- 407,415 ----
       * work...  Bah.
       */
      if ( r->content_type == NULL )
! 	code = NULL;
!     else 
!         code = (char *) table_get( conf->expiresbytype, r->content_type );
  
      if ( code == NULL ) {
  	/* no expires defined for that type, is there a default? */

Re: patch for mod_expires

Posted by Brian Behlendorf <br...@organic.com>.
+1.  I would consider this a bugfix.

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com  |  We're hiring!  http://www.organic.com/Home/Info/Jobs/