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