1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP FORMPOST
6HTTP replaced headers
7HTTP proxy
8HTTP proxy Digest auth
9--proxy-anyauth
10</keywords>
11
12</info>
13# Server-side
14<reply>
15# The stupid test server doesn't response anything at all until the full
16# request has been sent, and then of course the full POST has already been
17# sent!
18<data>
19HTTP/1.1 407 no, tell me who you are first swsclose
20Date: Thu, 09 Nov 2010 14:49:00 GMT
21Server: test-server/fake
22Proxy-Authenticate: Digest realm="many secrets", nonce="911"
23Proxy-Connection: close
24Content-Length: 0
25
26</data>
27<data1000>
28HTTP/1.1 200 A OK
29Server: Microsoft-IIS/6.0
30Content-Type: text/html; charset=iso-8859-1
31Content-Length: 3
32
33ok
34</data1000>
35<datacheck>
36HTTP/1.1 407 no, tell me who you are first swsclose
37Date: Thu, 09 Nov 2010 14:49:00 GMT
38Server: test-server/fake
39Proxy-Authenticate: Digest realm="many secrets", nonce="911"
40Proxy-Connection: close
41Content-Length: 0
42
43HTTP/1.1 200 A OK
44Server: Microsoft-IIS/6.0
45Content-Type: text/html; charset=iso-8859-1
46Content-Length: 3
47
48ok
49</datacheck>
50
51</reply>
52
53# Client-side
54<client>
55<server>
56http
57</server>
58<features>
59crypto
60</features>
61 <name>
62HTTP POST multipart without Expect: header using proxy anyauth (Digest)
63 </name>
64 <command>
65-x http://%HOSTIP:%HTTPPORT http://remotehost:54321/we/want/258 -F name=daniel -F tool=curl -F file=@log/test258.txt -H "Expect:" -U uuuser:pppassword --proxy-anyauth
66</command>
67# We create this file before the command is invoked!
68<file name="log/test258.txt">
69foo-
70This is a moo-
71bar
72</file>
73</client>
74
75# Verify data after the test has been "shot"
76<verify>
77<strip>
78^(User-Agent:|Content-Type: multipart/form-data;|------).*
79</strip>
80<protocol>
81POST http://remotehost:54321/we/want/258 HTTP/1.1
82User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
83Host: remotehost:54321
84Accept: */*
85Proxy-Connection: Keep-Alive
86Content-Length: 409
87Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
88
89------------------------------7c633d5c27ce
90Content-Disposition: form-data; name="name"
91
92daniel
93------------------------------7c633d5c27ce
94Content-Disposition: form-data; name="tool"
95
96curl
97------------------------------7c633d5c27ce
98Content-Disposition: form-data; name="file"; filename="test258.txt"
99Content-Type: text/plain
100
101foo-
102This is a moo-
103bar
104
105------------------------------7c633d5c27ce--
106POST http://remotehost:54321/we/want/258 HTTP/1.1
107User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
108Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/258", response="2501654ca391f0b5c8c12a1da77e34cd"
109Host: remotehost:54321
110Accept: */*
111Proxy-Connection: Keep-Alive
112Content-Length: 409
113Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
114
115------------------------------7c633d5c27ce
116Content-Disposition: form-data; name="name"
117
118daniel
119------------------------------7c633d5c27ce
120Content-Disposition: form-data; name="tool"
121
122curl
123------------------------------7c633d5c27ce
124Content-Disposition: form-data; name="file"; filename="test258.txt"
125Content-Type: text/plain
126
127foo-
128This is a moo-
129bar
130
131------------------------------7c633d5c27ce--
132</protocol>
133</verify>
134</testcase>
135