httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Murcko <ch...@hyperreal.com>
Subject cvs commit: apache/src/modules/proxy proxy_ftp.c
Date Sun, 13 Apr 1997 15:20:31 GMT
chuck       97/04/13 08:20:31

  Modified:    src/modules/proxy  proxy_ftp.c
  Log:
  Removed useless check terms, added handling of DOS dir format.
  
  Note that selection of a directory whose name contains spaces is still not
  possible. That still needs to be fixed. File selection is OK.
  
  Example:
  
  ftp://emwac.ed.ac.uk/microsoft/tools
  
  Revision  Changes    Path
  1.19      +12 -5     apache/src/modules/proxy/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/modules/proxy/proxy_ftp.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -C3 -r1.18 -r1.19
  *** proxy_ftp.c	1997/04/13 05:00:54	1.18
  --- proxy_ftp.c	1997/04/13 15:20:30	1.19
  ***************
  *** 220,227 ****
        char buf2[IOBUFSIZE];
        char *filename;
        char *tempurl;
  -     char *searchptr = NULL;
        int searchidx = 0;
        int firstfile = 1;
        char urlptr[HUGE_STRING_LEN];
        long total_bytes_sent;
  --- 220,227 ----
        char buf2[IOBUFSIZE];
        char *filename;
        char *tempurl;
        int searchidx = 0;
  +     char *searchptr = NULL;
        int firstfile = 1;
        char urlptr[HUGE_STRING_LEN];
        long total_bytes_sent;
  ***************
  *** 263,270 ****
    	    buf[sizeof(buf)-1] = '\0';
                n=strlen(buf);
            }
  !         else if(buf[0]=='d' || buf[0]=='-' || buf[0]=='l')
            {
                filename=strrchr(buf, ' ');
                *(filename++)=0;
                filename[strlen(filename)-1]=0;
  --- 263,279 ----
    	    buf[sizeof(buf)-1] = '\0';
                n=strlen(buf);
            }
  !         else if(buf[0]=='d' || buf[0]=='-' || buf[0]=='l' || isdigit(buf[0]))
            {
  + 	    if(isdigit(buf[0])) {		/* handle DOS dir */
  + 	        searchptr = strchr(buf, '<');
  + 	        if(searchptr != NULL)
  + 		    *searchptr = '[';
  + 	        searchptr = strchr(buf, '>');
  + 	        if(searchptr != NULL)
  + 		    *searchptr = ']';
  + 	    }
  + 		
                filename=strrchr(buf, ' ');
                *(filename++)=0;
                filename[strlen(filename)-1]=0;
  ***************
  *** 272,282 ****
                /* handle filenames with spaces in 'em */
                if(!strcmp(filename, ".") || !strcmp(filename, "..") || firstfile) {
    		firstfile = 0;
  -                 searchptr = filename;
                    searchidx = filename - buf;
                }
  !             else if (searchptr != NULL && searchidx != 0 &&
  ! 	      buf[searchidx] != 0) {
                    *(--filename) = ' ';
                    buf[searchidx - 1] = 0;
                    filename = &buf[searchidx];    
  --- 281,289 ----
                /* handle filenames with spaces in 'em */
                if(!strcmp(filename, ".") || !strcmp(filename, "..") || firstfile) {
    		firstfile = 0;
                    searchidx = filename - buf;
                }
  !             else if (searchidx != 0 && buf[searchidx] != 0) {
                    *(--filename) = ' ';
                    buf[searchidx - 1] = 0;
                    filename = &buf[searchidx];    
  
  
  

Mime
View raw message