test258 (3267B)
1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP FORMPOST 6 HTTP replaced headers 7 HTTP proxy 8 HTTP 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> 19 HTTP/1.1 407 no, tell me who you are first swsclose 20 Date: Tue, 09 Nov 2010 14:49:00 GMT 21 Server: test-server/fake 22 Proxy-Authenticate: Digest realm="many secrets", nonce="911" 23 Proxy-Connection: close 24 Content-Length: 0 25 26 </data> 27 <data1000> 28 HTTP/1.1 200 A OK 29 Server: Microsoft-IIS/6.0 30 Content-Type: text/html; charset=iso-8859-1 31 Content-Length: 3 32 33 ok 34 </data1000> 35 <datacheck> 36 HTTP/1.1 407 no, tell me who you are first swsclose 37 Date: Tue, 09 Nov 2010 14:49:00 GMT 38 Server: test-server/fake 39 Proxy-Authenticate: Digest realm="many secrets", nonce="911" 40 Proxy-Connection: close 41 Content-Length: 0 42 43 HTTP/1.1 200 A OK 44 Server: Microsoft-IIS/6.0 45 Content-Type: text/html; charset=iso-8859-1 46 Content-Length: 3 47 48 ok 49 </datacheck> 50 51 </reply> 52 53 # Client-side 54 <client> 55 <server> 56 http 57 </server> 58 <features> 59 Mime 60 !SSPI 61 crypto 62 proxy 63 digest 64 </features> 65 <name> 66 HTTP POST multipart without Expect: header using proxy anyauth (Digest) 67 </name> 68 <command> 69 -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 70 </command> 71 # We create this file before the command is invoked! 72 <file name="%LOGDIR/test%TESTNUMBER.txt"> 73 foo- 74 This is a moo- 75 bar 76 </file> 77 </client> 78 79 # Verify data after the test has been "shot" 80 <verify> 81 <strip> 82 ^(Content-Type: multipart/form-data;|------).* 83 </strip> 84 <protocol> 85 POST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1 86 Host: remotehost:54321 87 User-Agent: curl/%VERSION 88 Accept: */* 89 Proxy-Connection: Keep-Alive 90 Content-Length: 433 91 Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce 92 93 ------------------------------7c633d5c27ce 94 Content-Disposition: form-data; name="name" 95 96 daniel 97 ------------------------------7c633d5c27ce 98 Content-Disposition: form-data; name="tool" 99 100 curl 101 ------------------------------7c633d5c27ce 102 Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt" 103 Content-Type: text/plain 104 105 foo- 106 This is a moo- 107 bar 108 109 ------------------------------7c633d5c27ce-- 110 POST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1 111 Host: remotehost:54321 112 Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/%TESTNUMBER", response="2501654ca391f0b5c8c12a1da77e34cd" 113 User-Agent: curl/%VERSION 114 Accept: */* 115 Proxy-Connection: Keep-Alive 116 Content-Length: 433 117 Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce 118 119 ------------------------------7c633d5c27ce 120 Content-Disposition: form-data; name="name" 121 122 daniel 123 ------------------------------7c633d5c27ce 124 Content-Disposition: form-data; name="tool" 125 126 curl 127 ------------------------------7c633d5c27ce 128 Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt" 129 Content-Type: text/plain 130 131 foo- 132 This is a moo- 133 bar 134 135 ------------------------------7c633d5c27ce-- 136 </protocol> 137 </verify> 138 </testcase>