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 httpd.h util.c
Date Mon, 02 Dec 1996 15:35:03 GMT
fielding    96/12/02 07:35:03

  Modified:    src       httpd.h util.c
  Log:
  escape_uri is replaced with a macro calling the newer, spiffier,
  improved version of this routine called os_escape_path().
  
  Reviewed by: Rob Hartill, Brian Behlendorf, Randy Terbush
  
  Revision  Changes    Path
  1.66      +1 -1      apache/src/httpd.h
  
  Index: httpd.h
  ===================================================================
  RCS file: /export/home/cvs/apache/src/httpd.h,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -C3 -r1.65 -r1.66
  *** httpd.h	1996/12/01 20:28:38	1.65
  --- httpd.h	1996/12/02 15:35:01	1.66
  ***************
  *** 636,642 ****
    void getparents(char *name);
    char *escape_path_segment(pool *p, const char *s);
    char *os_escape_path(pool *p,const char *path,int partial);
  ! char *escape_uri (pool *p, const char *s);
    extern char *escape_html(pool *p, const char *s);
    char *construct_server(pool *p, const char *hostname, int port);
    char *construct_url (pool *p, const char *path, const server_rec *s);     
  --- 636,642 ----
    void getparents(char *name);
    char *escape_path_segment(pool *p, const char *s);
    char *os_escape_path(pool *p,const char *path,int partial);
  ! #define escape_uri(ppool,path) os_escape_path(ppool,path,1)
    extern char *escape_html(pool *p, const char *s);
    char *construct_server(pool *p, const char *hostname, int port);
    char *construct_url (pool *p, const char *path, const server_rec *s);     
  
  
  
  1.35      +2 -16     apache/src/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/util.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -C3 -r1.34 -r1.35
  *** util.c	1996/12/01 20:29:30	1.34
  --- util.c	1996/12/02 15:35:01	1.35
  ***************
  *** 841,863 ****
      return copy;
    }
    
  ! char *escape_uri(pool *p, const char *uri) {
  !     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;
  ! }
    
  ! char *
  ! escape_html(pool *p, const char *s)
    {
        int i, j;
        char *x;
  --- 841,849 ----
      return copy;
    }
    
  ! /* escape_uri is now a macro for os_escape_path */
    
  ! char *escape_html(pool *p, const char *s)
    {
        int i, j;
        char *x;
  
  
  

Mime
View raw message