Marc Slemko wrote:
> 
> You can try ftp://ftp.worldgate.com/pub/marcs/ for an example.
> 
> the proxy gives:
> 
> -rw-------   1 986   wheel      0 Apr  7 02:52 file with <A 
> HREF="ftp://ftp.worldgate.com/pub/marcs/spaces";>spaces</A>
> 
> In real life, there are more and more servers doing things this way,
> especially those hosted on NT boxes.  Unfortunately, however you do it you
> will run into problems with some names.
> 

Try this patch and see if it works. It's also going to the reporter
of the PR.
-- 
chuck
Chuck Murcko
The Topsail Group, West Chester PA USA
[EMAIL PROTECTED]
*** proxy_ftp.c.orig    Sun Apr  6 22:26:39 1997
--- proxy_ftp.c Mon Apr  7 00:42:49 1997
***************
*** 220,225 ****
--- 220,227 ----
      char buf2[IOBUFSIZE];
      char *filename;
      char *tempurl;
+     char *searchptr;
+     int searchidx;
      char urlptr[HUGE_STRING_LEN];
      long total_bytes_sent;
      register int n, o, w;
***************
*** 265,270 ****
--- 267,284 ----
              filename=strrchr(buf, ' ');
              *(filename++)=0;
              filename[strlen(filename)-1]=0;
+ 
+             /* handle filenames with spaces in 'em */
+             if (!strcmp(filename, ".") || !strcmp(filename, "..")) {
+                 searchptr = filename;
+                 searchidx = filename - buf;
+             }
+             else if (searchptr != NULL && filename > searchptr) {
+                 *(--filename) = ' ';
+                 buf[searchidx - 1] = 0;
+                 filename = &buf[searchidx];    
+             }   
+             
              /* Special handling for '.' and '..' */
              if (!strcmp(filename, "."))
              {

Reply via email to