From: wessels <> Date: Fri, 24 Jul 1998 05:52:35 +0000 (+0000) Subject: A small fix to ftp.c to eleminate a unneeded BASE HREF on "root" X-Git-Tag: SQUID_3_0_PRE1~2994 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aac537247fbbc95ebe90c67c12de8c4b72ace1b3;p=thirdparty%2Fsquid.git A small fix to ftp.c to eleminate a unneeded BASE HREF on "root" directories. (Henrik) --- diff --git a/src/ftp.cc b/src/ftp.cc index da50cfc5f4..94258fcd7e 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.241 1998/07/22 20:37:22 wessels Exp $ + * $Id: ftp.cc,v 1.242 1998/07/23 23:52:35 wessels Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -906,9 +906,12 @@ ftpCheckUrlpath(FtpStateData * ftpState) ftpState->flags.isdir = 1; ftpState->flags.root_dir = 1; } else if (!strCmp(request->urlpath, "/%2f/")) { + /* UNIX root directory */ + ftpState->flags.use_base = 0; ftpState->flags.isdir = 1; ftpState->flags.root_dir = 1; } else if ((l >= 1) && (*(strBuf(request->urlpath) + l - 1) == '/')) { + /* Directory URL, ending in / */ ftpState->flags.isdir = 1; ftpState->flags.use_base = 0; if (l == 1)