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