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