1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

ftp: check for previous patch must be case sensitive!

... otherwise example.com/PATH and example.com/path would be assumed to
be the same and they usually aren't!
This commit is contained in:
Daniel Stenberg 2016-09-30 16:46:47 +02:00
parent ce8d09483e
commit 1833a45dde

View File

@ -4415,7 +4415,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
dlen -= ftpc->file?strlen(ftpc->file):0; dlen -= ftpc->file?strlen(ftpc->file):0;
if((dlen == strlen(ftpc->prevpath)) && 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"); infof(data, "Request has same path as previous transfer\n");
ftpc->cwddone = TRUE; ftpc->cwddone = TRUE;
} }