aboutsummaryrefslogtreecommitdiff
path: root/tests/data/test1501
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2012-11-04 18:22:48 +0100
committerDaniel Stenberg <daniel@haxx.se>2012-11-04 19:05:39 +0100
commitb2954e66e87be7414a4508f8167ca531e653bea8 (patch)
treef7efa072bdae808c52f7bded50d1a75cde2df82f /tests/data/test1501
parent7c0f201075029a7c87c5cfe84f0405bb08441fbf (diff)
FTP: prevent the multi interface from blocking
As pointed out in Bug report #3579064, curl_multi_perform() would wrongly use a blocking mechanism internally for some commands which could lead to for example a very long block if the LIST response never showed. The solution was to make sure to properly continue to use the multi interface non-blocking state machine. The new test 1501 verifies the fix. Bug: http://curl.haxx.se/bug/view.cgi?id=3579064 Reported by: Guido Berhoerster
Diffstat (limited to 'tests/data/test1501')
-rw-r--r--tests/data/test150153
1 files changed, 53 insertions, 0 deletions
diff --git a/tests/data/test1501 b/tests/data/test1501
new file mode 100644
index 000000000..8c7e13af7
--- /dev/null
+++ b/tests/data/test1501
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+multi
+LIST
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+<servercmd>
+DELAY LIST 2
+DELAY TYPE 2
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib1501
+</tool>
+ <name>
+FTP with multi interface and slow LIST response
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/1501/
+</command>
+</client>
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+0
+</errorcode>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD 1501
+EPSV
+TYPE A
+LIST
+QUIT
+</protocol>
+
+</verify>
+</testcase>