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