xref: /curl/tests/data/test1632 (revision cd4aee15)
1<testcase>
2<info>
3<keywords>
4FTP
5HTTPS-proxy
6</keywords>
7</info>
8
9# Server-side
10<reply>
11
12# This is the HTTPS proxy response
13<connect>
14HTTP/1.1 200 OK
15Date: Tue, 09 Nov 2010 14:49:00 GMT
16Server: test-server/fake
17Content-Type: text/html
18Funny-head: yesyes
19Content-Length: 0
20
21</connect>
22
23# This is the FTP server response. The Life and Adventures of Robinson Crusoe
24<data>
25I was born in the year %TESTNUMBER, in the city of York, of a good family, though not
26of that country, myfather being a foreigner of Bremen, who settled first at
27Hull.  He got a good estate by merchandise,and leaving off his trade, lived
28afterwards at York, from whence he had married my mother, whoserelations were
29named Robinson, a very good family in that country, and from whom I was
30calledRobinson Kreutznaer; but, by the usual corruption of words in England,
31we are now called—nay wecall ourselves and write our name—Crusoe; and so my
32companions always called me.
33</data>
34
35<data2>
36I had two elder brothers, one of whom was lieutenant-colonel to an
37English regiment of foot inFlanders, formerly commanded by the famous Colonel
38Lockhart, and was killed at the battle nearDunkirk against the Spaniards.
39What became of my second brother I never knew, any more thanmy father or
40mother knew what became of me.
41</data2>
42
43</reply>
44
45# Client-side
46<client>
47<server>
48ftp
49https-proxy
50</server>
51<name>
52FTP through HTTPS-proxy, with connection reuse
53</name>
54<command>
55-p -x https://%HOSTIP:%HTTPSPROXYPORT ftp://ftp.site.thru.https.proxy:%FTPPORT/%TESTNUMBER --proxy-insecure ftp://ftp.site.thru.https.proxy:%FTPPORT/%TESTNUMBER0002
56</command>
57<features>
58http
59proxy
60</features>
61</client>
62
63# Verify data after the test has been "shot"
64<verify>
65<strip>
66QUIT
67</strip>
68
69# The second and third CONNECT will be made to the dynamic port number the FTP
70# server opens for us, so we can't compare with known pre-existing numbers!
71
72<strippart>
73s/((https.proxy):(\d+))/$2:12345/
74s/^(User-Agent: curl).*/$1/
75</strippart>
76<proxy>
77CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1
78Host: ftp.site.thru.https.proxy:12345
79User-Agent: curl
80Proxy-Connection: Keep-Alive
81
82CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1
83Host: ftp.site.thru.https.proxy:12345
84User-Agent: curl
85Proxy-Connection: Keep-Alive
86
87CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1
88Host: ftp.site.thru.https.proxy:12345
89User-Agent: curl
90Proxy-Connection: Keep-Alive
91
92</proxy>
93<protocol>
94USER anonymous
95PASS ftp@example.com
96PWD
97EPSV
98TYPE I
99SIZE %TESTNUMBER
100RETR %TESTNUMBER
101EPSV
102SIZE %TESTNUMBER0002
103RETR %TESTNUMBER0002
104QUIT
105</protocol>
106</verify>
107</testcase>
108