#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
<data mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
</info>
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
# Client-side
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+
+<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 ..
-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
+drwxrwxrwx 2 98 98 512 May 29 16:04 downthis.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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
# Client-side
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
REPLY PWD 257 "just one
</servercmd>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
<data mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
REPLY PWD 257 "/""hello"""
</servercmd>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
<data mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-#
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
\r
</connect>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
-HTTP/1.1 200 Mighty fine indeed\r
-Magic: sure you can FTP me\r
-\r
-HTTP/1.1 200 Mighty fine indeed\r
-Magic: sure you can FTP me\r
-\r
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
<servercmd>
SLOWDOWN
</servercmd>
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
<servercmd>
SLOWDOWN
</servercmd>
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
+dr-xr-xr-x 2 0 1 512 Nov 30 1995 moo
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+dr-xr-xr-x 5 0 1 512 Oct 1 1997 fine
+</data>
<servercmd>
REPLY USER 530 We don't like USER commands
COUNT USER 1
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
<servercmd>
REPLY PASS 332 Give me an ACCT now
REPLY ACCT 230 Thank-you for the ACCT
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTPS server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTPS server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTPS server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
file contents
</data>
+<data1>
+contents for file number two
+</data1>
+
<datacheck>
file contents
+contents for file number two
</datacheck>
-<datacheck1 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 .NeXT
--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
-</datacheck1>
</reply>
# Client-side
Two FTP fetches using different CURLOPT_FTP_FILEMETHOD
</name>
<command>
-ftp://%HOSTIP:%FTPPORT/path/to/the/file/%TESTNUMBER
+ftp://%HOSTIP:%FTPPORT/path/to/the/file/%TESTNUMBER ftp://%HOSTIP:%FTPPORT/path/to/the/file/%TESTNUMBER0001
</command>
</client>
SYST\r
CWD /\r
EPSV\r
-TYPE A\r
-LIST path/to/the/file/%TESTNUMBER.\r
+SIZE path/to/the/file/%TESTNUMBER0001\r
+RETR path/to/the/file/%TESTNUMBER0001\r
QUIT\r
</protocol>
</verify>
#
# Server-side
-<reply>
-<data mode="text">
-</data>
-</reply>
+#
+# Data is generated by the ftp server itself
# Client-side
<client>
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
#
# Server-side
<reply>
-# When doing LIST, we get the default list output hard-coded in the test
-# FTP server
-<datacheck mode="text">
+<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 ..
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
-</datacheck>
+</data>
</reply>
#
my ($folder, $fullcommand) = $_[0];
switch_directory($folder);
if($ftptargetdir =~ /^\/fully_simulated/) {
- $ftplistparserstate = "enabled";
+ $ftplistparserstate = "enabled";
+ logmsg "enabled FTP list parser mode\n";
}
else {
undef $ftplistparserstate;
sub LIST_ftp {
# print "150 ASCII data connection for /bin/ls (193.15.23.1,59196) (0 bytes)\r\n";
-# this is a built-in fake-dir ;-)
-my @ftpdir=("total 20\r\n",
-"drwxr-xr-x 8 98 98 512 Oct 22 13:06 .\r\n",
-"drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..\r\n",
-"drwxr-xr-x 2 98 98 512 May 2 1996 .NeXT\r\n",
-"-r--r--r-- 1 0 1 35 Jul 16 1996 README\r\n",
-"lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin\r\n",
-"dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev\r\n",
-"drwxrwxrwx 2 98 98 512 May 29 16:04 download.html\r\n",
-"dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc\r\n",
-"drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub\r\n",
-"dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr\r\n");
-
if($datasockf_conn eq 'no') {
if($nodataconn425) {
sendcontrol "150 Opening data connection\r\n";
return 0;
}
- if($ftplistparserstate) {
- @ftpdir = ftp_contentlist($ftptargetdir);
- }
-
logmsg "pass LIST data on data connection\n";
- if($cwd_testno) {
- loadtest("$logdir/test$cwd_testno");
-
+ if($ftplistparserstate) {
+ # provide a synthetic response
+ my @ftpdir = ftp_contentlist($ftptargetdir);
+ # old hard-coded style
+ for(@ftpdir) {
+ senddata $_;
+ }
+ }
+ else {
my @data = getpart("reply", "data");
for(@data) {
my $send = $_;
logmsg "send $send as data\n";
senddata $send;
}
- $cwd_testno = 0; # forget it again
- }
- else {
- # old hard-coded style
- for(@ftpdir) {
- senddata $_;
- }
}
close_dataconn(0);
sendcontrol "226 ASCII transfer complete\r\n";
sub SIZE_ftp {
my $testno = $_[0];
+
if($ftplistparserstate) {
my $size = wildcard_filesize($ftptargetdir, $testno);
if($size == -1) {
$sz = "($retrsize bytes)";
}
- sendcontrol "150 Binary data connection for $testno () $sz.\r\n";
+ sendcontrol "150 Binary data connection for $testno ($testpart) $sz.\r\n";
for(@data) {
my $send = $_;
/*
* Change the FTP_FILEMETHOD option to use full paths rather than a CWD
- * command. Alter the URL's path a bit, appending a "./". Use an innocuous
- * QUOTE command, after which curl will CWD to ftp_conn->entrypath and then
- * (on the next call to ftp_statemach_act) find a non-zero ftpconn->dirdepth
- * even though no directories are stored in the ftpconn->dirs array (after a
- * call to freedirs).
+ * command. Use an innocuous QUOTE command, after which curl will CWD to
+ * ftp_conn->entrypath and then (on the next call to ftp_statemach_act)
+ * find a non-zero ftpconn->dirdepth even though no directories are stored
+ * in the ftpconn->dirs array (after a call to freedirs).
*/
- newURL = aprintf("%s./", URL);
- if(!newURL) {
- curl_easy_cleanup(curl);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
slist = curl_slist_append(NULL, "SYST");
if(!slist) {
return TEST_ERR_MAJOR_BAD;
}
- test_setopt(curl, CURLOPT_URL, newURL);
+ test_setopt(curl, CURLOPT_URL, libtest_arg2);
test_setopt(curl, CURLOPT_FTP_FILEMETHOD, (long) CURLFTPMETHOD_NOCWD);
test_setopt(curl, CURLOPT_QUOTE, slist);
const char *pattern, const char *string)
{
(void)ptr;
- (void)pattern;
- (void)string;
+ fprintf(stderr, "lib574: match string '%s' against pattern '%s'\n",
+ string, pattern);
return CURL_FNMATCHFUNC_MATCH;
}