• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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>
59!SSPI
60crypto
61proxy
62</features>
63 <name>
64HTTP POST multipart without Expect: header using proxy anyauth (Digest)
65 </name>
66 <command>
67-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
68</command>
69# We create this file before the command is invoked!
70<file name="log/test258.txt">
71foo-
72This is a moo-
73bar
74</file>
75</client>
76
77# Verify data after the test has been "shot"
78<verify>
79<strip>
80^(Content-Type: multipart/form-data;|------).*
81</strip>
82<protocol>
83POST http://remotehost:54321/we/want/258 HTTP/1.1
84Host: remotehost:54321
85User-Agent: curl/%VERSION
86Accept: */*
87Proxy-Connection: Keep-Alive
88Content-Length: 409
89Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
90
91------------------------------7c633d5c27ce
92Content-Disposition: form-data; name="name"
93
94daniel
95------------------------------7c633d5c27ce
96Content-Disposition: form-data; name="tool"
97
98curl
99------------------------------7c633d5c27ce
100Content-Disposition: form-data; name="file"; filename="test258.txt"
101Content-Type: text/plain
102
103foo-
104This is a moo-
105bar
106
107------------------------------7c633d5c27ce--
108POST http://remotehost:54321/we/want/258 HTTP/1.1
109Host: remotehost:54321
110Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/258", response="2501654ca391f0b5c8c12a1da77e34cd"
111User-Agent: curl/%VERSION
112Accept: */*
113Proxy-Connection: Keep-Alive
114Content-Length: 409
115Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
116
117------------------------------7c633d5c27ce
118Content-Disposition: form-data; name="name"
119
120daniel
121------------------------------7c633d5c27ce
122Content-Disposition: form-data; name="tool"
123
124curl
125------------------------------7c633d5c27ce
126Content-Disposition: form-data; name="file"; filename="test258.txt"
127Content-Type: text/plain
128
129foo-
130This is a moo-
131bar
132
133------------------------------7c633d5c27ce--
134</protocol>
135</verify>
136</testcase>
137