Skip to content

FTP Bug: Curl sends "CWD /" despite CURLFTPMETHOD_NOCWD #1718

@PeterLamare

Description

@PeterLamare

Reproduce:
Set CURLFTPMETHOD_NOCWD and access different URLs reusing the same easy handle.

Consequence:
Killing the performance gain of reusing an easy handle by needless CWD round trips.

Fix:
The bug seems to be in src/lib/ftp.c ftp_parse_url_path():
it compares "ftpc->prevpath" with "data->state.path", and sets "ftpc->cwddone = TRUE" if equal.
This is obviously incorrect for CURLFTPMETHOD_NOCWD where the working directory is not set to state.path, instead it should compare "ftpc->prevpath" against ""

-Lama

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions