Commit 87c56284 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

--disable-epsv

parent 6c81d746
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -7,7 +7,11 @@
                               History of Changes

Daniel (29 November 2001)
- Eric provided a few more fixes for building on Macs.
- Added --disable-epsv as an option. When used, curl won't attempt to use the
  EPSV command when doing passive FTP downloads.

- Eric provided a few more fixes for building on Macs. He also pointed out
  a flaw in the signal handler restoration code.

Daniel (28 November 2001)
- Fiddled with some Tru64 problems reported by Dimitris Sarris. They appear
+11 −0
Original line number Diff line number Diff line
@@ -313,6 +313,7 @@ static void help(void)
       " -d/--data <data>   HTTP POST data (H)\n"
       "    --data-ascii <data>   HTTP POST ASCII data (H)\n"
       "    --data-binary <data>  HTTP POST binary data (H)\n"
       "    --disable-epsv  Prevents curl from using EPSV (F)\n"
       " -D/--dump-header <file> Write the headers to this file\n"
       "    --egd-file <file> EGD socket path for random data (SSL)\n"
       " -e/--referer       Referer page (H)");
@@ -387,6 +388,7 @@ struct Configurable {
  char *cookiefile; /* read from this file */
  bool use_resume;
  bool resume_from_current;
  bool disable_epsv;
  int resume_from;
  char *postfields;
  long postfieldsize;
@@ -862,6 +864,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
    {"5b", "egd-file",   TRUE},
    {"5c", "connect-timeout", TRUE},
    {"5d", "ciphers",    TRUE},
    {"5e", "disable-epsv", FALSE},

    {"0", "http1.0",     FALSE},
    {"1", "tlsv1",       FALSE},
@@ -1028,6 +1031,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
      case 'd': /* ciphers */
        GetStr(&config->cipher_list, nextarg);
        break;
      case 'e': /* --disable-epsv */
        config->disable_epsv ^= TRUE;
        break;
      default: /* the URL! */
        {
          struct getout *url;
@@ -2306,6 +2312,11 @@ operate(struct Configurable *config, int argc, char *argv[])
      if(config->httpversion)
        curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, config->httpversion);

      /* new in libcurl 7.9.2: */
      if(config->disable_epsv)
        /* disable it */
        curl_easy_setopt(curl, CURLOPT_FTP_USE_EPSV, FALSE);
      
      res = curl_easy_perform(curl);
        
      if(config->writeout) {