1<testcase>
2<info>
3<keywords>
4SMTP
5HTTP
6HTTP CONNECT
7HTTP proxy
8</keywords>
9</info>
10
11#
12# Server-side
13<reply>
14<connect>
15HTTP/1.1 200 Mighty fine indeed
16smtp: sure hit me
17
18</connect>
19</reply>
20
21#
22# Client-side
23<client>
24<server>
25smtp
26http-proxy
27</server>
28<features>
29http
30</features>
31 <name>
32SMTP send tunneled through HTTP proxy
33 </name>
34<stdin>
35From: different
36To: another
37
38body
39</stdin>
40 <command>
41smtp://smtp.1320:%SMTPPORT/1320 --mail-rcpt recipient@example.com --mail-from sender@example.com -T - -p -x %HOSTIP:%PROXYPORT
42</command>
43</client>
44
45#
46# Verify data after the test has been "shot"
47<verify>
48<strip>
49^User-Agent: curl/.*
50</strip>
51<protocol>
52EHLO 1320
53MAIL FROM:<sender@example.com>
54RCPT TO:<recipient@example.com>
55DATA
56QUIT
57</protocol>
58<upload>
59From: different
60To: another
61
62body
63.
64</upload>
65<proxy>
66CONNECT smtp.1320:%SMTPPORT HTTP/1.1
67Host: smtp.1320:%SMTPPORT
68User-Agent: curl/7.24.0-DEV (i686-pc-linux-gnu) libcurl/7.24.0-DEV OpenSSL/1.0.0e zlib/1.2.3.4 c-ares/1.7.6-DEV libidn/1.23 libssh2/1.4.0_DEV librtmp/2.2e
69Proxy-Connection: Keep-Alive
70
71</proxy>
72</verify>
73</testcase>
74