]> granicus.if.org Git - apache/commitdiff
Use apr_table_overlap. Add note about additional brokeness of fast-redirect
authorBill Stoddard <stoddard@apache.org>
Fri, 30 May 2003 16:33:57 +0000 (16:33 +0000)
committerBill Stoddard <stoddard@apache.org>
Fri, 30 May 2003 16:33:57 +0000 (16:33 +0000)
fooness

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100102 13f79535-47bb-0310-9956-ffa450edef68

modules/metadata/mod_expires.c

index 64fdb0cf142861768a92ca686b0cb24d11f14c4f..3e18013f7d54f264ace4fcad6826d8dc0c89b994 100644 (file)
@@ -526,9 +526,10 @@ static apr_status_t expires_by_type_filter(ap_filter_t *f,
         else if ((notes != NULL) && notes->defaulted) {
             /*
              * None for this type, but there was a default defined --
-             * so use it.
+             * so use it. Add the Expires header and add or replace the
+             * Cache-Control header.
              */
-            t = apr_table_overlay(r->pool, notes->expfields, t);
+            apr_table_overlap(r->headers_out, notes->expfields, APR_OVERLAP_TABLES_SET);
         }
     }
     ap_remove_output_filter(f);
@@ -546,6 +547,11 @@ static int add_expires(request_rec *r)
         return DECLINED;
     }
 
+    /* Note: This is broken, DirectoryIndex files will not get an expires header
+     * We should say -yes- to fast-redirects (which are not really subrequests)
+     * but this check is not granular enough to distinguish between a fast-redirect
+     * and a subrequest
+     */
     if (r->main != NULL) {      /* Say no to subrequests */
         return DECLINED;
     }