xref: /curl/tests/data/test1028 (revision cd4aee15)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6followlocation
7FTP
8PASV
9FILE
10</keywords>
11</info>
12
13#
14# Server-side
15<reply>
16<data1>
17HTTP/1.1 302 OK
18Date: Tue, 09 Nov 2010 14:49:00 GMT
19Server: test-server/fake swsclose
20Content-Type: text/html
21Funny-head: yesyes
22Location: ftp://%HOSTIP:%FTPPORT/%TESTNUMBER0002
23Content-Length: 0
24Connection: close
25
26</data1>
27<data2>
28data
29    to
30      see
31that FTP
32works
33  so does it?
34</data2>
35</reply>
36
37#
38# Client-side
39<client>
40<server>
41http
42ftp
43</server>
44<name>
45HTTP Location: redirect to FTP URL
46</name>
47<command>
48http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 -L
49</command>
50</client>
51
52#
53# Verify data after the test has been "shot"
54<verify>
55<strip>
56QUIT
57</strip>
58<protocol>
59GET /%TESTNUMBER0001 HTTP/1.1
60Host: %HOSTIP:%HTTPPORT
61User-Agent: curl/%VERSION
62Accept: */*
63
64USER anonymous
65PASS ftp@example.com
66PWD
67EPSV
68TYPE I
69SIZE %TESTNUMBER0002
70RETR %TESTNUMBER0002
71QUIT
72</protocol>
73<stdout>
74HTTP/1.1 302 OK
75Date: Tue, 09 Nov 2010 14:49:00 GMT
76Server: test-server/fake swsclose
77Content-Type: text/html
78Funny-head: yesyes
79Location: ftp://%HOSTIP:%FTPPORT/%TESTNUMBER0002
80Content-Length: 0
81Connection: close
82
83data
84    to
85      see
86that FTP
87works
88  so does it?
89</stdout>
90</verify>
91</testcase>
92