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