xref: /curl/tests/data/test1391 (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<server>
28ftp
29</server>
30<name>
31FTP DL, file with C-D inside, using -o fname -i -D file
32</name>
33<command option="no-output,no-include">
34ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -i -D %LOGDIR/heads%TESTNUMBER
35</command>
36<postcheck>
37perl %SRCDIR/libtest/notexists.pl %LOGDIR/file%TESTNUMBER %LOGDIR/name%TESTNUMBER
38</postcheck>
39</client>
40
41# Verify data after the test has been "shot"
42<verify>
43<strip>
44QUIT
45</strip>
46<protocol>
47USER anonymous
48PASS ftp@example.com
49PWD
50CWD path
51EPSV
52TYPE I
53SIZE file%TESTNUMBER
54RETR file%TESTNUMBER
55QUIT
56</protocol>
57
58<file1 name="%LOGDIR/download%TESTNUMBER">
59HTTP/1.1 200 OK
60Date: Tue, 09 Nov 2010 14:49:00 GMT
61Server: test-server/fake
62Content-Length: 6
63Connection: close
64Content-Type: text/html
65Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
66
67MOOOO
68</file1>
69
70<file2 name="%LOGDIR/heads%TESTNUMBER">
71220-        _   _ ____  _
72220-    ___| | | |  _ \| |
73220-   / __| | | | |_) | |
74220-  | (__| |_| |  _ {| |___
75220    \___|\___/|_| \_\_____|
76331 We are happy you popped in!
77230 Welcome you silly person
78257 "/" is current directory
79250 CWD command successful.
80229 Entering Passive Mode (stripped)
81200 I modify TYPE as you wanted
82213 222
83150 Binary data connection for %TESTNUMBER () (222 bytes).
84226 File transfer complete
85</file2>
86<stripfile2>
87s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
88</stripfile2>
89
90<file3 name="%LOGDIR/stdout%TESTNUMBER">
91</file3>
92
93</verify>
94</testcase>
95