From: wessels <> Date: Tue, 26 Nov 1996 00:42:54 +0000 (+0000) Subject: remove trailing slashes from FTP urls X-Git-Tag: SQUID_3_0_PRE1~5403 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=513f4ecca0ebb59e792364d65fbcba209c1c95c2;p=thirdparty%2Fsquid.git remove trailing slashes from FTP urls --- diff --git a/src/url.cc b/src/url.cc index 6f011ebd6b..50c7fb9de2 100644 --- a/src/url.cc +++ b/src/url.cc @@ -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;