httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@locus.apache.org
Subject cvs commit: apache-1.3/src/modules/standard mod_autoindex.c
Date Sat, 04 Nov 2000 04:07:08 GMT
wrowe       00/11/03 20:07:07

  Modified:    src/modules/standard mod_autoindex.c
  Log:
    Ok, this patch, in retrospect, scared me to death, but there was
    no apparently robust way to deal with the issue.  APR for 2.0 will
    have some rules to handle this :-)  For 1.3.15, it becomes a new
    directive option:  IndexOptions TrackModified
  
    Anyone who knows their platform safely handles the stat() call
    is welcome to add the directive to the IndexOptions of their
    platform's conf/httpd.conf-whatnot distribution.  For Win32,
    I'm adding it, commented out with NTFS/FAT volume comments.
  
  Revision  Changes    Path
  1.116     +11 -6     apache-1.3/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.115
  retrieving revision 1.116
  diff -u -r1.115 -r1.116
  --- mod_autoindex.c	2000/11/03 00:55:28	1.115
  +++ mod_autoindex.c	2000/11/04 04:07:07	1.116
  @@ -96,6 +96,7 @@
   #define SUPPRESS_COLSORT 128
   #define NO_OPTIONS 256
   #define FOLDERS_FIRST 512
  +#define TRACK_MODIFIED 1024
   
   #define K_PAD 1
   #define K_NOPAD 0
  @@ -406,7 +407,10 @@
           else if (!strcasecmp(w, "FoldersFirst")) {
               option = FOLDERS_FIRST;
   	}
  -	else if (!strcasecmp(w, "None")) {
  +	else if (!strcasecmp(w, "TrackModified")) {
  +            option = TRACK_MODIFIED;
  +	}
  +        else if (!strcasecmp(w, "None")) {
   	    if (action != '\0') {
   		return "Cannot combine '+' or '-' with 'None' keyword";
   	    }
  @@ -492,7 +496,7 @@
   		d_cfg->desc_adjust = K_NOADJUST;
   	    }
   	}
  -	else {
  +        else {
   	    return "Invalid directory indexing option";
   	}
   	if (action == '\0') {
  @@ -1615,10 +1619,11 @@
       }
   
       r->content_type = "text/html";
  -    ap_update_mtime(r, r->finfo.st_mtime);
  -    ap_set_last_modified(r);
  -    ap_set_etag(r);
  -    
  +    if (autoindex_opts & TRACK_MODIFIED) {
  +        ap_update_mtime(r, r->finfo.st_mtime);
  +        ap_set_last_modified(r);
  +        ap_set_etag(r);
  +    }
       ap_send_http_header(r);
   
       if (r->header_only) {
  
  
  

Mime
View raw message