]> granicus.if.org Git - curl/commitdiff
ftp: check for previous patch must be case sensitive!
authorDaniel Stenberg <daniel@haxx.se>
Fri, 30 Sep 2016 14:46:47 +0000 (16:46 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 31 Oct 2016 07:46:35 +0000 (08:46 +0100)
... otherwise example.com/PATH and example.com/path would be assumed to
be the same and they usually aren't!

lib/ftp.c

index d307c407154cda9ae94f9dfe4df967aee2d809bf..f78978d6b2d1112650b0d69ee34df4ecc1f3a02e 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -4415,7 +4415,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
 
     dlen -= ftpc->file?strlen(ftpc->file):0;
     if((dlen == strlen(ftpc->prevpath)) &&
-       strnequal(path, ftpc->prevpath, dlen)) {
+       !strncmp(path, ftpc->prevpath, dlen)) {
       infof(data, "Request has same path as previous transfer\n");
       ftpc->cwddone = TRUE;
     }