GNURLOPT_FTP_USE_EPSV(3)
π GNURLOPT_FTP_USE_EPSV(3) π
okay bestie, welcome to the curl_easy_setopt options corner π this one is about CURLOPT_FTP_USE_EPSV, and it's literally the switch for whether curl tries EPSV before PASV on passive FTP downloads. Let's get into it, no cap.
πΈ NAME πΈ
CURLOPT_FTP_USE_EPSV - enable/disable use of EPSV
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_USE_EPSV, long
epsv);
π¦ DESCRIPTION π¦
Pass epsv as a long. If the value is 1, it tells curl to use the EPSV command when doing passive FTP downloads (which it does by default). Using EPSV means that it will first attempt to use EPSV before using PASV, but if you pass zero to this option, it will not try using EPSV, only plain PASV.
If the server is an IPv6 host, this option will have no effect as of 7.12.3.
lowkey important: that IPv6 bit is not a vibe check fail, it's just how it is β no effect as of 7.12.3.
π DEFAULT π
1
π PROTOCOLS π
FTP
π EXAMPLE π
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/old-server/file.txt");
/* let's shut off this modern feature */
curl_easy_setopt(curl, CURLOPT_FTP_USE_EPSV, 0L);
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
π§ AVAILABILITY π§
Along with FTP
π RETURN VALUE π
Returns CURLE_OK if FTP is supported, and CURLE_UNKNOWN_OPTION if not.
β SEE ALSO β
(and yes, that trailing comma after the last ref is in the original β iykyk π )
and that's the whole page, bestie β signed off with libcurl 7.37.0 and dated 17 Jun 2014, page GNURLOPT_FTP_USE_EPSV(3) π
π
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2014, 2017, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms