summaryrefslogtreecommitdiff
path: root/tests/data
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-02-08 16:40:34 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-02-09 14:06:28 +0100
commit528f71c2ecdbb03117af226978804148d69a1007 (patch)
tree1345d18162135945aff7657f539071c6b4019437 /tests/data
parent115c9e27f53809a254fba44b023bea92f4d4dcd0 (diff)
downloadcurl-528f71c2ecdbb03117af226978804148d69a1007.tar.gz
ftp: add 'list_only' to the transfer state struct
and rename it from 'ftp_list_only' since it is also used for SSH and POP3. The state is updated internally for 'type=D' FTP URLs. Added test case 1570 to verify. Closes #6578
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/Makefile.inc2
-rw-r--r--tests/data/test157073
2 files changed, 74 insertions, 1 deletions
diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
index 228e93d80..9667369b2 100644
--- a/tests/data/Makefile.inc
+++ b/tests/data/Makefile.inc
@@ -187,7 +187,7 @@ test1540 \
\
test1550 test1551 test1552 test1553 test1554 test1555 test1556 test1557 \
test1558 test1559 test1560 test1561 test1562 test1563 test1564 test1565 \
-test1566 test1567 test1568 test1569 \
+test1566 test1567 test1568 test1569 test1570 \
\
test1590 test1591 test1592 test1593 test1594 test1595 test1596 \
\
diff --git a/tests/data/test1570 b/tests/data/test1570
new file mode 100644
index 000000000..fd0c27395
--- /dev/null
+++ b/tests/data/test1570
@@ -0,0 +1,73 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+RETR
+</keywords>
+</info>
+# Server-side
+<reply>
+<data nocheck="yes">
+data
+ to
+ see
+that FTP
+works
+ so does it?
+</data>
+<servercmd>
+REPLY EPSV 500 no such command
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP first type=D then regular URL
+ </name>
+<tool>
+lib1569
+</tool>
+<command>
+"ftp://%HOSTIP:%FTPPORT/1570;type=D" ftp://%HOSTIP:%FTPPORT/1570
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPSV
+PASV
+TYPE A
+NLST
+PASV
+TYPE I
+SIZE 1570
+RETR 1570
+QUIT
+</protocol>
+</verify>
+<stdout>
+data
+ to
+ see
+that FTP
+works
+ so does it?
+data
+ to
+ see
+that FTP
+works
+ so does it?
+</stdout>
+
+</testcase>