httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/mappers mod_rewrite.c
Date Sat, 17 May 2003 22:28:23 GMT
nd          2003/05/17 15:28:23

  Modified:    .        CHANGES
               modules/mappers mod_rewrite.c
  Log:
  fix LA-U lookaheads in directory context.
  
  I'm wondering if this ever worked ...
  
  PR: 8493 (related to)
  
  Revision  Changes    Path
  1.1180    +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1179
  retrieving revision 1.1180
  diff -u -r1.1179 -r1.1180
  --- CHANGES	17 May 2003 18:30:35 -0000	1.1179
  +++ CHANGES	17 May 2003 22:28:22 -0000	1.1180
  @@ -2,6 +2,9 @@
   
     [Remove entries to the current 2.0 section below, when backported]
   
  +  *) mod_rewrite: Fix LA-U variable look ahead which didn't work correctly
  +     in directory context. Related to PR 8493.  [André Malo]
  +
     *) Add a delete flag to htpasswd.
        [Thom May]
   
  
  
  
  1.151     +6 -6      httpd-2.0/modules/mappers/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_rewrite.c,v
  retrieving revision 1.150
  retrieving revision 1.151
  diff -u -r1.150 -r1.151
  --- mod_rewrite.c	4 May 2003 18:31:18 -0000	1.150
  +++ mod_rewrite.c	17 May 2003 22:28:23 -0000	1.151
  @@ -3885,10 +3885,10 @@
           }
       }
   
  -#define LOOKAHEAD(subrecfunc) \
  +#define LOOKAHEAD(subrecfunc, input) \
           if ( \
             /* filename is safe to use */ \
  -          r->filename != NULL \
  +          (input) != NULL \
                 /* - and we're either not in a subrequest */ \
                 && ( r->main == NULL \
                     /* - or in a subrequest where paths are non-NULL... */ \
  @@ -3896,7 +3896,7 @@
                           /*   ...and sub and main paths differ */ \
                           && strcmp(r->main->uri, r->uri) != 0))) { \
               /* process a file-based subrequest */ \
  -            rsub = subrecfunc(r->filename, r, NULL); \
  +            rsub = subrecfunc((input), r, NULL); \
               /* now recursively lookup the variable in the sub_req */ \
               result = lookup_variable(rsub, var+5); \
               /* copy it up to our scope before we destroy sub_req's apr_pool_t */ \
  @@ -3905,18 +3905,18 @@
               ap_destroy_sub_req(rsub); \
               /* log it */ \
               rewritelog(r, 5, "lookahead: path=%s var=%s -> val=%s", \
  -                       r->filename, var+5, result); \
  +                       (input), var+5, result); \
               /* return ourself to prevent re-pstrdup */ \
               return (char *)result; \
           }
   
       /* look-ahead for parameter through URI-based sub-request */
       else if (strlen(var) > 5 && strncasecmp(var, "LA-U:", 5) == 0) {
  -        LOOKAHEAD(ap_sub_req_lookup_uri)
  +        LOOKAHEAD(ap_sub_req_lookup_uri, r->uri)
       }
       /* look-ahead for parameter through file-based sub-request */
       else if (strlen(var) > 5 && strncasecmp(var, "LA-F:", 5) == 0) {
  -        LOOKAHEAD(ap_sub_req_lookup_file)
  +        LOOKAHEAD(ap_sub_req_lookup_file, r->filename)
       }
   
       /* file stuff */
  
  
  

Mime
View raw message