xref: /curl/tests/data/test1360 (revision e7a021e1)
1<testcase>
2<info>
3<keywords>
4FTP
5RETR
6-J
7</keywords>
8</info>
9
10# Server-side
11<reply>
12# file%TESTNUMBER contents...
13<data nocheck="yes">
14HTTP/1.1 200 OK
15Date: Tue, 09 Nov 2010 14:49:00 GMT
16Server: test-server/fake
17Content-Length: 6
18Connection: close
19Content-Type: text/html
20Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
21
22MOOOO
23</data>
24</reply>
25
26# Client-side
27<client>
28# this relies on the debug feature to allow us to set directory to store the
29# -O output in, using the CURL_TESTDIR variable
30<features>
31debug
32</features>
33<server>
34ftp
35</server>
36<name>
37FTP download, file with C-D inside, using -O -J -D stdout
38</name>
39<setenv>
40CURL_TESTDIR=%LOGDIR
41</setenv>
42<command option="no-output,no-include">
43ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -J -D -
44</command>
45<postcheck>
46perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER
47</postcheck>
48</client>
49
50# Verify data after the test has been "shot"
51<verify>
52<protocol>
53USER anonymous
54PASS ftp@example.com
55PWD
56CWD path
57EPSV
58TYPE I
59SIZE file%TESTNUMBER
60RETR file%TESTNUMBER
61QUIT
62</protocol>
63
64<file1 name="%LOGDIR/file%TESTNUMBER">
65HTTP/1.1 200 OK
66Date: Tue, 09 Nov 2010 14:49:00 GMT
67Server: test-server/fake
68Content-Length: 6
69Connection: close
70Content-Type: text/html
71Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
72
73MOOOO
74</file1>
75
76<file2 name="%LOGDIR/stdout%TESTNUMBER">
77220-        _   _ ____  _
78220-    ___| | | |  _ \| |
79220-   / __| | | | |_) | |
80220-  | (__| |_| |  _ {| |___
81220    \___|\___/|_| \_\_____|
82331 We are happy you popped in!
83230 Welcome you silly person
84257 "/" is current directory
85250 CWD command successful.
86229 Entering Passive Mode (stripped)
87200 I modify TYPE as you wanted
88213 214
89150 Binary data connection for %TESTNUMBER () (214 bytes).
90226 File transfer complete
91</file2>
92<stripfile2>
93s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
94</stripfile2>
95
96</verify>
97</testcase>
98