Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions hfile_libcurl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1373,8 +1373,13 @@ libcurl_open(const char *url, const char *modes, http_headers *headers)

// Avoid many repeated CWD calls with FTP, instead requesting the filename
// by full path (but not strictly compliant with RFC1738).
err |= curl_easy_setopt(fp->easy, CURLOPT_FTP_FILEMETHOD,
(long) CURLFTPMETHOD_NOCWD);
// Note as this is just an optimation, we don't care if it succeeds.
// Some libcurls are built without ftp support and this would fail in such
// cases (even if our URL is http://). If we attempt to do an ftp on such
// a machine we'll then get a more informative error, such as protocol
// not supported, instead of function not implemented.
curl_easy_setopt(fp->easy, CURLOPT_FTP_FILEMETHOD,
(long) CURLFTPMETHOD_NOCWD);

if (mode == 'r') {
err |= curl_easy_setopt(fp->easy, CURLOPT_WRITEFUNCTION, recv_callback);
Expand Down
Loading