xref: /curl/tests/data/test1362 (revision cd4aee15)
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 stdout
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 -
43</command>
44<postcheck>
45perl %SRCDIR/libtest/notexists.pl %LOGDIR/name%TESTNUMBER
46</postcheck>
47</client>
48
49# Verify data after the test has been "shot"
50<verify>
51<strip>
52QUIT
53</strip>
54<protocol>
55USER anonymous
56PASS ftp@example.com
57PWD
58CWD path
59EPSV
60TYPE I
61SIZE file%TESTNUMBER
62RETR file%TESTNUMBER
63QUIT
64</protocol>
65
66<file1 name="%LOGDIR/file%TESTNUMBER">
67HTTP/1.1 200 OK
68Date: Tue, 09 Nov 2010 14:49:00 GMT
69Server: test-server/fake
70Content-Length: 6
71Connection: close
72Content-Type: text/html
73Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
74
75MOOOO
76</file1>
77
78<file2 name="%LOGDIR/stdout%TESTNUMBER">
79220-        _   _ ____  _
80220-    ___| | | |  _ \| |
81220-   / __| | | | |_) | |
82220-  | (__| |_| |  _ {| |___
83220    \___|\___/|_| \_\_____|
84331 We are happy you popped in!
85230 Welcome you silly person
86257 "/" is current directory
87250 CWD command successful.
88229 Entering Passive Mode (stripped)
89200 I modify TYPE as you wanted
90213 214
91150 Binary data connection for %TESTNUMBER () (214 bytes).
92226 File transfer complete
93</file2>
94<stripfile2>
95s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
96</stripfile2>
97
98</verify>
99</testcase>
100