xref: /curl/tests/data/test259 (revision 3fd80c7b)
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: Tue, 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: Tue, 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>
55Mime
56!SSPI
57crypto
58proxy
59</features>
60<name>
61HTTP POST multipart with Expect: header using proxy anyauth (Digest)
62</name>
63<command>
64-x http://%HOSTIP:%HTTPPORT http://remotehost:54321/we/want/%TESTNUMBER -F name=daniel -F tool=curl -F file=@%LOGDIR/test%TESTNUMBER.txt -U uuuser:pppassword --proxy-anyauth -H "Expect: 100-continue"
65</command>
66# We create this file before the command is invoked!
67<file name="%LOGDIR/test%TESTNUMBER.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^(Content-Type: multipart/form-data;|------).*
78</strip>
79<protocol>
80POST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1
81Host: remotehost:54321
82User-Agent: curl/%VERSION
83Accept: */*
84Proxy-Connection: Keep-Alive
85Expect: 100-continue
86Content-Length: 433
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="test%TESTNUMBER.txt"
99Content-Type: text/plain
100
101foo-
102This is a moo-
103bar
104
105------------------------------7c633d5c27ce--
106POST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1
107Host: remotehost:54321
108Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/%TESTNUMBER", response="b479994d13e60f3aa192a67c5892ddc5"
109User-Agent: curl/%VERSION
110Accept: */*
111Proxy-Connection: Keep-Alive
112Expect: 100-continue
113Content-Length: 433
114Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
115
116------------------------------7c633d5c27ce
117Content-Disposition: form-data; name="name"
118
119daniel
120------------------------------7c633d5c27ce
121Content-Disposition: form-data; name="tool"
122
123curl
124------------------------------7c633d5c27ce
125Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"
126Content-Type: text/plain
127
128foo-
129This is a moo-
130bar
131
132------------------------------7c633d5c27ce--
133</protocol>
134</verify>
135</testcase>
136