]> granicus.if.org Git - apache/commitdiff
Fixed the behavior of the XBitHack directive.
authorCliff Woolley <jwoolley@apache.org>
Mon, 19 Nov 2001 21:09:20 +0000 (21:09 +0000)
committerCliff Woolley <jwoolley@apache.org>
Mon, 19 Nov 2001 21:09:20 +0000 (21:09 +0000)
PR: 8804
Submitted by: Taketo Kabe <kabe@sra-tohoku.co.jp>, Cliff Woolley

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

CHANGES
modules/filters/mod_include.c

diff --git a/CHANGES b/CHANGES
index 20435e5a640e70c01e08d2a4790ce977cfa4b46a..a7b079fb9ec745465e39b5e8269aea9836839644 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.29-dev
 
+  *) Fixed the behavior of the XBitHack directive.
+     [Taketo Kabe <kabe@sra-tohoku.co.jp>, Cliff Woolley] PR#8804
+
   *) The threaded MPM for Unix has been removed.  Use the worker
      MPM instead.  [various]
 
index 5f406b79cab2832ddd91ad5e605a37d894d2188e..8c4f287c1fc007cde5494ae69a5fe7ad844bf9f2 100644 (file)
@@ -3052,14 +3052,6 @@ static apr_status_t includes_filter(ap_filter_t *f, apr_bucket_brigade *b)
         ctx->bytes_parsed = 0;
     }
 
-    /* Assure the platform supports Group protections */
-    if ((*conf->xbithack == xbithack_full)
-        && (r->finfo.valid & APR_FINFO_GPROT)
-        && (r->finfo.protection & APR_GEXECUTE)) {
-        ap_update_mtime(r, r->finfo.mtime);
-        ap_set_last_modified(r);
-    }
-
     if ((parent = ap_get_module_config(r->request_config, &include_module))) {
         /* Kludge --- for nested includes, we want to keep the subprocess
          * environment of the base document (for compatibility); that means
@@ -3100,9 +3092,20 @@ static apr_status_t includes_filter(ap_filter_t *f, apr_bucket_brigade *b)
      * a program which may change the Last-Modified header or make the 
      * content completely dynamic.  Therefore, we can't support these
      * headers.
+     * Exception: XBitHack full means we *should* set the Last-Modified field.
      */
     apr_table_unset(f->r->headers_out, "ETag");
-    apr_table_unset(f->r->headers_out, "Last-Modified");
+
+    /* Assure the platform supports Group protections */
+    if ((*conf->xbithack == xbithack_full)
+        && (r->finfo.valid & APR_FINFO_GPROT)
+        && (r->finfo.protection & APR_GEXECUTE)) {
+        ap_update_mtime(r, r->finfo.mtime);
+        ap_set_last_modified(r);
+    }
+    else {
+        apr_table_unset(f->r->headers_out, "Last-Modified");
+    }
 
     return send_parsed_content(&b, r, f);
 }
@@ -3172,7 +3175,7 @@ static int xbithack_handler(request_rec *r)
     /* OS/2 dosen't currently support the xbithack. This is being worked on. */
     return DECLINED;
 #else
-    enum xbithack *state;
+    include_dir_config *conf;
  
     if (ap_strcmp_match(r->handler, "text/html")) {
         return DECLINED;
@@ -3181,10 +3184,10 @@ static int xbithack_handler(request_rec *r)
         return DECLINED;
     }
  
-    state = (enum xbithack *) ap_get_module_config(r->per_dir_config,
+    conf = (include_dir_config *) ap_get_module_config(r->per_dir_config,
                                                 &include_module);
  
-    if (*state == xbithack_off) {
+    if (*conf->xbithack == xbithack_off) {
         return DECLINED;
     }
     /* We always return declined, because the default handler will actually