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