httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@znep.com>
Subject [PATCH] proxy and ftp://site/dir//file
Date Tue, 28 Oct 1997 04:33:49 GMT
Trying to get a URL like ftp://site/dir//file through mod_proxy fails
because Apache tries a "CWD " for the empty path component.  Regardless of
if the given URL can be considered valid, I think the below change to
avoid this behavior is appropriate.

Index: modules/proxy/proxy_ftp.c
===================================================================
RCS file: /export/home/cvs/apachen/src/modules/proxy/proxy_ftp.c,v
retrieving revision 1.40
diff -u -r1.40 proxy_ftp.c
--- proxy_ftp.c	1997/09/30 21:02:14	1.40
+++ proxy_ftp.c	1997/10/28 04:20:40
@@ -626,6 +629,10 @@
 	*strp = '\0';
 
 	len = decodeenc(path);
+	if (len == 0) {
+	    path = strp + 1;
+	    continue;
+	}
 	bputs("CWD ", f);
 	bwrite(f, path, len);
 	bputs("\015\012", f);


Mime
View raw message