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_alias.c
Date Fri, 03 Nov 2000 00:44:02 GMT
wrowe       00/11/02 16:44:02

  Modified:    src      CHANGES
               .        STATUS
               src/main http_config.c
               src/modules/standard mod_alias.c
  Log:
    Correct the general form of directive path arguments, and the specific
    cases of non-regex Alias and ScriptAlias path arguments, all to their
    canonical form.  On Win32/NetWare this will assure the following test
    ap_os_is_path_absolute() is correct.  OS2 is excluded since it takes a
    different approach to canonicalization, and under Unix these changes all
    expand to no-ops returning the string's identity.
  
  Revision  Changes    Path
  1.1592    +11 -0     apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1591
  retrieving revision 1.1592
  diff -u -r1.1591 -r1.1592
  --- CHANGES	2000/11/02 21:40:27	1.1591
  +++ CHANGES	2000/11/03 00:44:00	1.1592
  @@ -1,5 +1,16 @@
   Changes with Apache 1.3.15
   
  +  *) Corrected file path arguments from server conf directives to
  +     their canonical form (excluding OS2 - which uses alternate 
  +     logic.)  Resolves a long list of PRs reporting that Win32 paths
  +     of the syntax x:\foo were mis-concatinated to the server root.
  +     [William Rowe]
  +
  +  *) Correct an issue with Alias and ScriptAlias directives that 
  +     file path arguments were not normalized in canonical form.
  +     This correction makes no attempt to normalize regular expression
  +     forms of Alias or ScriptAlias.  [William Rowe]
  +
     *) Add a new LogFormat directive, %c, that will log connection
        status at the end of the response as follows:
        'X' - connection aborted before the response completed.
  
  
  
  1.855     +1 -17     apache-1.3/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.854
  retrieving revision 1.855
  diff -u -r1.854 -r1.855
  --- STATUS	2000/11/02 18:03:14	1.854
  +++ STATUS	2000/11/03 00:44:01	1.855
  @@ -1,5 +1,5 @@
     1.3 STATUS:
  -  Last modified at [$Date: 2000/11/02 18:03:14 $]
  +  Last modified at [$Date: 2000/11/03 00:44:01 $]
   
   Release:
   
  @@ -34,22 +34,6 @@
         Bug report 6787 and others are very confused that these bugs
         don't appear until requests to the invalid hostname are
         rejected in http_protocol.c - wasting bug reviewers time.
  -
  -    * This shouldn't be, but it is since non-core modules install
  -      with backslashes in the Win32 httpd.conf file.  Need to either
  -      (#1) accept backslashes back into the core, or (#2) always
  -      canonicalize the elements before testing if an absolute paths
  -      when concatinating them to the ServerRoot.  See the thread 
  -      titled: [Patch] 1.3.15 ap_os_is_path_absolute
  -        Status #1: OtherBill -1, Brian Harvard +1
  -        Status #2: OtherBill +1, Brian Harvard -1
  -
  -    * Likewise, mod_alias paths are never canonicalized today.  Needs
  -      a fix to canonicalize all but perhaps the regex Aliases, and
  -      while we are at it, additional feature to accept Alias relative
  -      to ServerRoot could be good.  See the above showstopper and the
  -      thread titled: Resolution - 1.3.15 ap_os_is_path_absolute
  -        Status: Patch proposed; won't work for OS2; still in review.
   
   RELEASE NON-SHOWSTOPPERS BUT WOULD BE REAL NICE TO WRAP THESE UP:
   
  
  
  
  1.155     +6 -0      apache-1.3/src/main/http_config.c
  
  Index: http_config.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_config.c,v
  retrieving revision 1.154
  retrieving revision 1.155
  diff -u -r1.154 -r1.155
  --- http_config.c	2000/10/03 16:39:40	1.154
  +++ http_config.c	2000/11/03 00:44:02	1.155
  @@ -1090,6 +1090,9 @@
          so the server can be moved or mirrored with less pain.  */
       char *p;
       int offset = (int) (long) cmd->info;
  +#ifndef OS2
  +    arg = ap_os_canonical_filename(cmd->pool, arg);
  +#endif
       if (ap_os_is_path_absolute(arg))
   	p = arg;
       else
  @@ -1108,6 +1111,9 @@
   
   API_EXPORT(char *) ap_server_root_relative(pool *p, char *file)
   {
  +#ifndef OS2
  +    file = ap_os_canonical_filename(p, file);
  +#endif
       if(ap_os_is_path_absolute(file))
   	return file;
       return ap_make_full_path(p, ap_server_root, file);
  
  
  
  1.42      +8 -4      apache-1.3/src/modules/standard/mod_alias.c
  
  Index: mod_alias.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_alias.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- mod_alias.c	1999/05/21 12:16:26	1.41
  +++ mod_alias.c	2000/11/03 00:44:02	1.42
  @@ -137,10 +137,15 @@
   	new->regexp = ap_pregcomp(cmd->pool, f, REG_EXTENDED);
   	if (new->regexp == NULL)
   	    return "Regular expression could not be compiled.";
  +        new->real = r;
       }
  -
  -    new->fake = f;
  +#ifndef OS2
  +    else
  +        new->real = ap_os_canonical_filename(cmd->pool, r);
  +#else
       new->real = r;
  +#endif
  +    new->fake = f;
       new->handler = cmd->info;
   
       return NULL;
  @@ -233,7 +238,7 @@
        "a fakename and a realname"},
       {"Redirect", add_redirect, (void *) HTTP_MOVED_TEMPORARILY,
        OR_FILEINFO, TAKE23,
  -  "an optional status, then document to be redirected and destination URL"},
  +     "an optional status, then document to be redirected and destination URL"},
       {"AliasMatch", add_alias_regex, NULL, RSRC_CONF, TAKE2,
        "a regular expression and a filename"},
       {"ScriptAliasMatch", add_alias_regex, "cgi-script", RSRC_CONF, TAKE2,
  @@ -339,7 +344,6 @@
   
   	    return found;
   	}
  -
       }
   
       return NULL;
  
  
  

Mime
View raw message