httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rede...@apache.org
Subject cvs commit: httpd-2.0/modules/mappers mod_rewrite.c
Date Wed, 04 Feb 2004 15:57:37 GMT
rederpj     2004/02/04 07:57:36

  Modified:    .        Tag: APACHE_2_0_BRANCH CHANGES STATUS
               modules/mappers Tag: APACHE_2_0_BRANCH mod_rewrite.c
  Log:
  *) mod_rewrite: Catch an edge case, where strange subsequent RewriteRules
     could lead to a 400 (Bad Request) response.
  
  Submitted by: André Malo
  Reviewed by: jerenkrantz, rederpj
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.988.2.234 +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.988.2.233
  retrieving revision 1.988.2.234
  diff -u -r1.988.2.233 -r1.988.2.234
  --- CHANGES	4 Feb 2004 15:09:31 -0000	1.988.2.233
  +++ CHANGES	4 Feb 2004 15:57:35 -0000	1.988.2.234
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0.49
   
  +  *) mod_rewrite: Catch an edge case, where strange subsequent RewriteRules
  +     could lead to a 400 (Bad Request) response.  [André Malo]
  +
     *) Keep focus of ITERATE and ITERATE2 on the current module when
        the module chooses to return DECLINE_CMD for the directive.
        PR 22299.  [Geoffrey Young <geoff apache.org>]
  
  
  
  1.751.2.675 +1 -6      httpd-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/STATUS,v
  retrieving revision 1.751.2.674
  retrieving revision 1.751.2.675
  diff -u -r1.751.2.674 -r1.751.2.675
  --- STATUS	4 Feb 2004 15:09:31 -0000	1.751.2.674
  +++ STATUS	4 Feb 2004 15:57:35 -0000	1.751.2.675
  @@ -210,11 +210,6 @@
         PREREQ: Blow away of SSL_EXPERIMENTAL_ENGINE (see above)
         +1: jwoolley, trawick, jim, jerenkrantz
   
  -    * Catch an edge case, where strange subsequent RewriteRules could lead to
  -      a 400 (Bad Request) response. (2.0 + 1.3)
  -        modules/mappers/mod_rewrite.c: r1.228
  -      +1: nd, jerenkrantz
  -
       * mod_include's expression tokenizer: don't skip the first character of
         a string, it may be a backslash. (2.0 + 1.3)
         (patch for 2.0: http://cvs.apache.org/~nd/ssi-escape.patch)
  
  
  
  No                   revision
  No                   revision
  1.135.2.23 +2 -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.135.2.22
  retrieving revision 1.135.2.23
  diff -u -r1.135.2.22 -r1.135.2.23
  --- mod_rewrite.c	28 Jan 2004 19:47:29 -0000	1.135.2.22
  +++ mod_rewrite.c	4 Feb 2004 15:57:36 -0000	1.135.2.23
  @@ -1943,7 +1943,6 @@
       regmatch_t regmatch[AP_MAX_REG_MATCH];
       backrefinfo *briRR = NULL;
       backrefinfo *briRC = NULL;
  -    int prefixstrip;
       int failed;
       apr_array_header_t *rewriteconds;
       rewritecond_entry *conds;
  @@ -1974,14 +1973,12 @@
        *  the local part.  Additionally indicate this special
        *  threatment in the logfile.
        */
  -    prefixstrip = 0;
  -    if (perdir != NULL) {
  +    if (perdir) {
           if (   strlen(uri) >= strlen(perdir)
               && strncmp(uri, perdir, strlen(perdir)) == 0) {
               rewritelog(r, 3, "[per-dir %s] strip per-dir prefix: %s -> %s",
                          perdir, uri, uri+strlen(perdir));
               uri = uri+strlen(perdir);
  -            prefixstrip = 1;
           }
       }
   
  @@ -2177,8 +2174,7 @@
        *   location, i.e. if it's not an absolute URL (!) path nor
        *   a fully qualified URL scheme.
        */
  -    if (prefixstrip && *r->filename != '/'
  -                    && !is_absolute_uri(r->filename)) {
  +    if (perdir && *r->filename != '/' && !is_absolute_uri(r->filename))
{
           rewritelog(r, 3, "[per-dir %s] add per-dir prefix: %s -> %s%s",
                      perdir, r->filename, perdir, r->filename);
           r->filename = apr_pstrcat(r->pool, perdir, r->filename, NULL);
  
  
  

Mime
View raw message