You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by Dean Gaudet <dg...@hyperreal.com> on 1997/06/27 04:26:35 UTC

cvs commit: apache/src CHANGES mod_rewrite.c mod_rewrite.h

dgaudet     97/06/26 19:26:35

  Modified:    src       Tag: APACHE_1_2_X  CHANGES mod_rewrite.c
                        mod_rewrite.h
  Log:
  Update mod_rewrite from 3.0.5 to 3.0.6.
  
  Reviewed by:	Dean, Alexei
  Submitted by:	Ralf
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.286.2.12 +7 -1      apache/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.286.2.11
  retrieving revision 1.286.2.12
  diff -C3 -r1.286.2.11 -r1.286.2.12
  *** CHANGES	1997/06/27 02:20:18	1.286.2.11
  --- CHANGES	1997/06/27 02:26:29	1.286.2.12
  ***************
  *** 1,5 ****
    Changes with Apache 1.2.1
  !   
      *) If an object has multiple variants that are otherwise equal Apache
         would prefer the last listed variant rather than the first.
         [Paul Sutton] PR#94
  --- 1,11 ----
    Changes with Apache 1.2.1
  ! 
  !   *) Update mod_rewrite from 3.0.5 to 3.0.6.  New ruleflag
  !      QSA=query_string_append.  Also fixed a nasty bug in per-dir context:
  !      when a URL http://... was used in concunction with a special
  !      redirect flag, e.g. R=permanent, the permanent status was lost.
  !      [Ronald Tschalaer <Ro...@psi.ch>, Ralf S. Engelschall]
  ! 
      *) If an object has multiple variants that are otherwise equal Apache
         would prefer the last listed variant rather than the first.
         [Paul Sutton] PR#94
  
  
  
  1.28.2.1  +12 -4     apache/src/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_rewrite.c,v
  retrieving revision 1.28
  retrieving revision 1.28.2.1
  diff -C3 -r1.28 -r1.28.2.1
  *** mod_rewrite.c	1997/04/24 23:35:22	1.28
  --- mod_rewrite.c	1997/06/27 02:26:30	1.28.2.1
  ***************
  *** 61,67 ****
    **  |_| |_| |_|\___/ \__,_|___|_|  \___| \_/\_/ |_|  |_|\__\___|
    **                       |_____|
    **
  ! **  URL Rewriting Module, Version 3.0.5 (16-Apr-1997)
    **
    **  This module uses a rule-based rewriting engine (based on a
    **  regular-expression parser) to rewrite requested URLs on the fly. 
  --- 61,67 ----
    **  |_| |_| |_|\___/ \__,_|___|_|  \___| \_/\_/ |_|  |_|\__\___|
    **                       |_____|
    **
  ! **  URL Rewriting Module, Version 3.0.6 (15-Jun-1997)
    **
    **  This module uses a rule-based rewriting engine (based on a
    **  regular-expression parser) to rewrite requested URLs on the fly. 
  ***************
  *** 779,784 ****
  --- 779,788 ----
                 || strcasecmp(key, "G") == 0   ) {
            cfg->flags |= RULEFLAG_GONE;
        }
  +     else if (   strcasecmp(key, "qsappend") == 0
  +              || strcasecmp(key, "QSA") == 0   ) {
  +         cfg->flags |= RULEFLAG_QSAPPEND;
  +     }
        else {
            return pstrcat(p, "RewriteRule: unknown flag '", key, "'\n", NULL);
        }
  ***************
  *** 1559,1564 ****
  --- 1563,1569 ----
                }
                rewritelog(r, 2, "[per-dir %s] redirect %s -> %s", perdir, r->filename, newuri);
                r->filename = pstrdup(r->pool, newuri);
  +             r->status = p->forced_responsecode;
                return 1;
            }
    
  ***************
  *** 1602,1608 ****
            reduce_uri(r);
    
            /* split out on-the-fly generated QUERY_STRING '....?xxxxx&xxxx...' */
  !         splitout_queryargs(r);
    
            /* if a MIME-type should be later forced for this URL, then remember this */
            if (p->forced_mimetype != NULL) {
  --- 1607,1613 ----
            reduce_uri(r);
    
            /* split out on-the-fly generated QUERY_STRING '....?xxxxx&xxxx...' */
  !         splitout_queryargs(r, p->flags & RULEFLAG_QSAPPEND);
    
            /* if a MIME-type should be later forced for this URL, then remember this */
            if (p->forced_mimetype != NULL) {
  ***************
  *** 1788,1794 ****
    **
    */
    
  ! static void splitout_queryargs(request_rec *r)
    {
        char *q;
        char *olduri;
  --- 1793,1799 ----
    **
    */
    
  ! static void splitout_queryargs(request_rec *r, int qsappend)
    {
        char *q;
        char *olduri;
  ***************
  *** 1797,1803 ****
        if (q != NULL) {
            olduri = pstrdup(r->pool, r->filename);
            *q++ = '\0';
  !         r->args = pstrcat(r->pool, q, "&", r->args, NULL);
            if (r->args[strlen(r->args)-1] == '&')
                r->args[strlen(r->args)-1] = '\0';
            rewritelog(r, 3, "split uri=%s -> uri=%s, args=%s", olduri, r->filename, r->args);
  --- 1802,1811 ----
        if (q != NULL) {
            olduri = pstrdup(r->pool, r->filename);
            *q++ = '\0';
  !         if (qsappend)
  !             r->args = pstrcat(r->pool, q, "&", r->args, NULL);
  !         else
  !             r->args = pstrdup(r->pool, q);
            if (r->args[strlen(r->args)-1] == '&')
                r->args[strlen(r->args)-1] = '\0';
            rewritelog(r, 3, "split uri=%s -> uri=%s, args=%s", olduri, r->filename, r->args);
  
  
  
  1.22.2.1  +3 -2      apache/src/mod_rewrite.h
  
  Index: mod_rewrite.h
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_rewrite.h,v
  retrieving revision 1.22
  retrieving revision 1.22.2.1
  diff -C3 -r1.22 -r1.22.2.1
  *** mod_rewrite.h	1997/04/17 02:52:51	1.22
  --- mod_rewrite.h	1997/06/27 02:26:32	1.22.2.1
  ***************
  *** 64,70 ****
    **  |_| |_| |_|\___/ \__,_|___|_|  \___| \_/\_/ |_|  |_|\__\___|
    **                       |_____|
    **
  ! **  URL Rewriting Module, Version 3.0.5 (16-Apr-1997)
    **
    **  This module uses a rule-based rewriting engine (based on a
    **  regular-expression parser) to rewrite requested URLs on the fly. 
  --- 64,70 ----
    **  |_| |_| |_|\___/ \__,_|___|_|  \___| \_/\_/ |_|  |_|\__\___|
    **                       |_____|
    **
  ! **  URL Rewriting Module, Version 3.0.6 (15-Jun-1997)
    **
    **  This module uses a rule-based rewriting engine (based on a
    **  regular-expression parser) to rewrite requested URLs on the fly. 
  ***************
  *** 171,176 ****
  --- 171,177 ----
    #define RULEFLAG_PASSTHROUGH        1<<8
    #define RULEFLAG_FORBIDDEN          1<<9
    #define RULEFLAG_GONE               1<<10
  + #define RULEFLAG_QSAPPEND           1<<11
    
    #define MAPTYPE_TXT                 1<<0
    #define MAPTYPE_DBM                 1<<1
  ***************
  *** 334,340 ****
    static int apply_rewrite_cond(request_rec *r, rewritecond_entry *p, char *perdir); 
    
        /* URI transformation function */
  ! static void  splitout_queryargs(request_rec *r);
    static void  reduce_uri(request_rec *r);
    static char *expand_tildepaths(request_rec *r, char *uri);
    static void  expand_map_lookups(request_rec *r, char *uri, int uri_len);
  --- 335,341 ----
    static int apply_rewrite_cond(request_rec *r, rewritecond_entry *p, char *perdir); 
    
        /* URI transformation function */
  ! static void  splitout_queryargs(request_rec *r, int qsappend);
    static void  reduce_uri(request_rec *r);
    static char *expand_tildepaths(request_rec *r, char *uri);
    static void  expand_map_lookups(request_rec *r, char *uri, int uri_len);