www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sevo Stille <s...@inm.de>
Subject mod_expires/208: Add an option "never" to Expires
Date Thu, 27 Feb 1997 23:30:01 GMT

>Number:         208
>Category:       mod_expires
>Synopsis:       Add an option "never" to Expires
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache (Apache HTTP Project)
>State:          open
>Class:          change-request
>Submitter-Id:   apache
>Arrival-Date:   Thu Feb 27 15:30:01 1997
>Originator:     sevo@inm.de
>Organization:
apache
>Release:        1.2
>Environment:
[recreated from cached copy of PR#96, originally
submitted on Wed Jan  8 03:00:01 1997 and lost from
GNATS on Thu Feb 27 1997]
>Description:
Netscape still has problems with animated GIF's which have an expiration date, 
causing it to request the image at every iteration of the loop. Putting the 
expires date into the remote future doesn't help, and moving the image to 
another directory without expiration may not be a viable option. Since the 
ability to mix expiring and none-expiring documents in one directory may be 
desirable in other contexts as well, I propose adding an option "never" to 
the expires module.
>How-To-Repeat:

>Fix:
The following patch will add an option never, which doesn't send 
an Expires header for the selected files, to mod_expires.c. 
Please note that 'n' as a shorthand form for 'now' won't work 
any more after the patch has been applied.
--- mod_expires.c       Wed Dec  4 23:56:24 1996
+++ mod_expires.c       Wed Jan  8 11:42:32 1997
@@ -124,6 +124,7 @@
  *     access  
  *     now             equivalent to 'access'
  *     modification
+ *      never          don't send an Expires header
  *
  * where the 'plus' keyword is optional
  *
@@ -256,11 +257,13 @@
     /* <base>
      */
     word = getword_conf( pool, &code );
-    if ( !strncasecmp( word, "now", 1 ) ||
+    if ( !strncasecmp( word, "now", 2 ) ||
         !strncasecmp( word, "access", 1 ) ) {
        base = 'A';
     } else if ( !strncasecmp( word, "modification", 1 ) ) {
        base = 'M';
+    } else if ( !strncasecmp( word, "never", 2 ) ) {
+        base = 'N';
     } else {
        return pstrcat( pool, "bad expires code, unrecognised <base> '",
                word, "'", NULL);
@@ -430,6 +433,11 @@
     /* we have our code */
 
     switch (code[0]) {
+        case 'N':
+            /* never - don't return the expires header
+            */
+            return OK;
+            break;
        case 'M':
             base = r->finfo.st_mtime;
            additional = atoi( &code[1] );
%0
>Audit-Trail:
>Unformatted:



Mime
View raw message