{"ftp-alternative-to-user", ARG_STRG, ' ', C_FTP_ALTERNATIVE_TO_USER},
{"ftp-create-dirs", ARG_BOOL, ' ', C_FTP_CREATE_DIRS},
{"ftp-method", ARG_STRG, ' ', C_FTP_METHOD},
- {"ftp-pasv", ARG_BOOL, ' ', C_FTP_PASV},
+ {"ftp-pasv", ARG_NONE, ' ', C_FTP_PASV},
{"ftp-port", ARG_STRG, 'P', C_FTP_PORT},
{"ftp-pret", ARG_BOOL, ' ', C_FTP_PRET},
{"ftp-skip-pasv-ip", ARG_BOOL, ' ', C_FTP_SKIP_PASV_IP},
break;
case C_DUMP_CA_EMBED: /* --dump-ca-embed */
return PARAM_CA_EMBED_REQUESTED;
+ case C_FTP_PASV: /* --ftp-pasv */
+ tool_safefree(config->ftpport);
+ break;
case C_HTTP1_0: /* --http1.0 */
/* HTTP version 1.0 */
case C_URL: /* --url */
err = parse_url(global, config, nextarg);
break;
- case C_FTP_PASV: /* --ftp-pasv */
- tool_safefree(config->ftpport);
- break;
case C_SOCKS5: /* --socks5 */
/* socks5 proxy to use, and resolves the name locally and passes on the
resolved address */
test1516 test1517 test1518 test1519 test1520 test1521 test1522 test1523 \
test1524 test1525 test1526 test1527 test1528 test1529 test1530 test1531 \
test1532 test1533 test1534 test1535 test1536 test1537 test1538 test1539 \
-test1540 test1541 test1542 test1543 test1544 test1545 test1546 \
+test1540 test1541 test1542 test1543 test1544 test1545 test1546 test1547 \
\
test1550 test1551 test1552 test1553 test1554 test1555 test1556 test1557 \
test1558 test1559 test1560 test1561 test1562 test1563 test1564 test1565 \
--- /dev/null
+<testcase>
+# Based on test100 & test101
+<info>
+<keywords>
+FTP
+PASV
+LIST
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data mode="text">
+total 20
+drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
+drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
+drwxr-xr-x 2 98 98 512 May 2 1996 curl-releases
+-r--r--r-- 1 0 1 35 Jul 16 1996 README
+lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin
+dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev
+drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
+dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
+drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
+dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP dir list PASV overriding PORT
+</name>
+<command>
+ftp://%HOSTIP:%FTPPORT/test-%TESTNUMBER/ -P %CLIENTIP --ftp-pasv
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+QUIT
+</strip>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD test-%TESTNUMBER\r
+EPSV\r
+TYPE A\r
+LIST\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>