httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@imdb.com (Rob Hartill)
Subject MSIE and laguages and a bug? in mod_expires
Date Thu, 02 Jan 1997 21:33:37 GMT

If after receiving a 406 response you reload the page with MSIE or
follow a link to the same page, then you end up with something different.

It would appear the MSIE sends a different request (no Accept-Language)
is my guess. It's also possible that MSIE is caching the 406 error.

Anyone care to look into this ?. I don't have MSIE here.

Also, mod_expires.c is adding an "Expires" header regardless of the status,
this could be confusing MSIE here.

How about this as a fix for mod_expires (which includes an earlier
patch that has yet to be accepted) ?   (note that "conf" is now initialised
later, but only if it is going to be used).


Index: mod_expires.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_expires.c,v
retrieving revision 1.2
diff -u -r1.2 mod_expires.c
--- mod_expires.c       1997/01/02 03:35:02     1.2
+++ mod_expires.c       1997/01/02 21:24:29
@@ -383,18 +383,24 @@
 
 int add_expires(request_rec *r)
 {
-    expires_dir_config *conf =
-            (expires_dir_config *)get_module_config(r->per_dir_config, &expires_module);
+    expires_dir_config *conf;
     char *code;
     time_t base; 
     time_t additional; 
     time_t expires; 
 
+    if (r->status >= 400) {  /* Don't add Expires headers to errors */
+       return DECLINED;
+    }
+
+    if (r->main != NULL) {   /* Don't find Expires headers for subrequests */
+       return DECLINED;
+    }
+
     if ( r->finfo.st_mode == 0 )
        return DECLINED;
 
-    /* COMMA bites my ass...
-     */
+    conf = (expires_dir_config *)get_module_config(r->per_dir_config, &expires_module);
     if ( conf == NULL ) {
         log_reason ("internal error in expires_module; add_expires(), conf == NULL", r->filename,
r);
        return SERVER_ERROR;


Mime
View raw message