]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
remove trailing slashes from FTP urls
authorwessels <>
Tue, 26 Nov 1996 00:42:54 +0000 (00:42 +0000)
committerwessels <>
Tue, 26 Nov 1996 00:42:54 +0000 (00:42 +0000)
src/url.cc

index 6f011ebd6b35125b4f1d680c9fca798a29b92eeb..50c7fb9de292c2ba110288209ead8420aae1b83a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: url.cc,v 1.45 1996/11/22 08:37:52 wessels Exp $
+ * $Id: url.cc,v 1.46 1996/11/25 17:42:54 wessels Exp $
  *
  * DEBUG: section 23    URL Parsing
  * AUTHOR: Duane Wessels
@@ -238,6 +238,10 @@ urlParse(method_t method, char *url)
        debug(23, 0, "urlParse: Invalid port == 0\n");
        return NULL;
     }
+    /* remove trailing slashes from FTP URLs */
+    t = urlpath + strlen(urlpath);
+    while (*(--t) == '/')
+       *t = '\0';
     request = get_free_request_t();
     request->method = method;
     request->protocol = protocol;