You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jw...@apache.org on 2001/11/19 22:09:20 UTC

cvs commit: httpd-2.0/modules/filters mod_include.c

jwoolley    01/11/19 13:09:20

  Modified:    .        CHANGES
               modules/filters mod_include.c
  Log:
  Fixed the behavior of the XBitHack directive.
  
  PR: 8804
  Submitted by:	Taketo Kabe <ka...@sra-tohoku.co.jp>, Cliff Woolley
  
  Revision  Changes    Path
  1.444     +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.443
  retrieving revision 1.444
  diff -u -d -u -r1.443 -r1.444
  --- CHANGES	2001/11/19 18:07:27	1.443
  +++ CHANGES	2001/11/19 21:09:20	1.444
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0.29-dev
   
  +  *) Fixed the behavior of the XBitHack directive.
  +     [Taketo Kabe <ka...@sra-tohoku.co.jp>, Cliff Woolley] PR#8804
  +
     *) The threaded MPM for Unix has been removed.  Use the worker
        MPM instead.  [various]
   
  
  
  
  1.155     +15 -12    httpd-2.0/modules/filters/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
  retrieving revision 1.154
  retrieving revision 1.155
  diff -u -d -u -r1.154 -r1.155
  --- mod_include.c	2001/11/15 05:05:20	1.154
  +++ mod_include.c	2001/11/19 21:09:20	1.155
  @@ -3052,14 +3052,6 @@
           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,10 +3092,21 @@
        * 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 @@
       /* 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 @@
           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