httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roy Fielding <field...@hyperreal.com>
Subject cvs commit: apache/src util.c
Date Sun, 01 Dec 1996 13:44:23 GMT
fielding    96/12/01 05:44:23

  Modified:    src       util.c
  Log:
  Fixed escape_uri so that it will escape the right set of characters,
  including all controls, space, and url delimiters.
  Reviewed by: Randy Terbush, Chuck Murcko
  
  Revision  Changes    Path
  1.33      +3 -2      apache/src/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/util.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -C3 -r1.32 -r1.33
  *** util.c	1996/11/18 19:56:29	1.32
  --- util.c	1996/12/01 13:44:22	1.33
  ***************
  *** 845,855 ****
        register int x,y;
        char *copy = palloc (p, 3 * strlen (uri) + 1);
                
  !     for(x=0,y=0; uri[x]; x++,y++) {
  !         if (ind (":% ?+&",(copy[y] = uri[x])) != -1) {
                c2x(uri[x],&copy[y]);
                y+=2;
            }
        }
        copy[y] = '\0';
        return copy;
  --- 845,856 ----
        register int x,y;
        char *copy = palloc (p, 3 * strlen (uri) + 1);
                
  !     for (x=0,y=0; uri[x]; x++,y++) {
  !         if ((uri[x] <= ' ') || (ind("\"%&+<=>?", uri[x]) != -1)) {
                c2x(uri[x],&copy[y]);
                y+=2;
            }
  +         else copy[y] = uri[x];
        }
        copy[y] = '\0';
        return copy;
  
  
  

Mime
View raw message