[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 13/222: FTP: skip CWD to entry dir when target is absolute
From: |
gnunet |
Subject: |
[gnurl] 13/222: FTP: skip CWD to entry dir when target is absolute |
Date: |
Thu, 07 Nov 2019 00:08:29 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit acf1d2acd17b194966be41e848ffd48b02ecef0c
Author: Zenju <address@hidden>
AuthorDate: Wed Sep 11 20:04:28 2019 +0200
FTP: skip CWD to entry dir when target is absolute
Closes #4332
---
lib/ftp.c | 4 +++-
tests/data/test1225 | 1 -
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/ftp.c b/lib/ftp.c
index e807a2acd..0793dc1f3 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -877,7 +877,9 @@ static CURLcode ftp_state_cwd(struct connectdata *conn)
if((conn->data->set.ftp_filemethod == FTPFILE_NOCWD) && !ftpc->cwdcount)
/* No CWD necessary */
result = ftp_state_mdtm(conn);
- else if(conn->bits.reuse && ftpc->entrypath) {
+ else if(conn->bits.reuse && ftpc->entrypath &&
+ /* no need to go to entrypath when we have an absolute path */
+ !(ftpc->dirdepth && ftpc->dirs[0][0] == '/')) {
/* This is a re-used connection. Since we change directory to where the
transfer is taking place, we must first get back to the original dir
where we ended up after login: */
diff --git a/tests/data/test1225 b/tests/data/test1225
index 2b2519c94..09a1abb79 100644
--- a/tests/data/test1225
+++ b/tests/data/test1225
@@ -45,7 +45,6 @@ TYPE I
SIZE 1225
RETR 1225
CWD /
-CWD /
CWD foo
CWD bar
EPSV
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 04/222: asyn-thread: s/AF_LOCAL/AF_UNIX for Solaris, (continued)
- [gnurl] 04/222: asyn-thread: s/AF_LOCAL/AF_UNIX for Solaris, gnunet, 2019/11/06
- [gnurl] 03/222: winbuild/MakefileBuild.vc: Add vssh, gnunet, 2019/11/06
- [gnurl] 02/222: winbuild/MakefileBuild.vc: Fix line endings, gnunet, 2019/11/06
- [gnurl] 01/222: ldap: Stop using wide char version of ldapp_err2string, gnunet, 2019/11/06
- [gnurl] 08/222: docs/HTTP3: fix `--with-ssl` ngtcp2 configure flag, gnunet, 2019/11/06
- [gnurl] 06/222: curlver: bump to 7.66.1, gnunet, 2019/11/06
- [gnurl] 05/222: setopt: make it easier to add new enum values, gnunet, 2019/11/06
- [gnurl] 11/222: parsedate: still provide the name arrays when disabled, gnunet, 2019/11/06
- [gnurl] 12/222: curl: fix memory leaked by parse_metalink(), gnunet, 2019/11/06
- [gnurl] 07/222: RELEASE-NOTES: synced, gnunet, 2019/11/06
- [gnurl] 13/222: FTP: skip CWD to entry dir when target is absolute,
gnunet <=
- [gnurl] 10/222: curl:file2string: load large files much faster, gnunet, 2019/11/06
- [gnurl] 09/222: openssl: close_notify on the FTP data connection doesn't mean closure, gnunet, 2019/11/06
- [gnurl] 15/222: appveyor: add a winbuild, gnunet, 2019/11/06
- [gnurl] 23/222: smb: check for full size message before reading message details, gnunet, 2019/11/06
- [gnurl] 17/222: docs: fix typo in CURLOPT_HTTP_VERSION man, gnunet, 2019/11/06
- [gnurl] 18/222: docs: remove trailing ':' from section names in CURLOPT_TRAILER* man, gnunet, 2019/11/06
- [gnurl] 25/222: doh: clean up dangling DOH handles and memory on easy close, gnunet, 2019/11/06
- [gnurl] 14/222: FTP: allow "rubbish" prepended to the SIZE response, gnunet, 2019/11/06
- [gnurl] 22/222: quiche: persist connection details, gnunet, 2019/11/06
- [gnurl] 19/222: doh: fix (harmless) buffer overrun, gnunet, 2019/11/06