test44 (1450B)
1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP FORMPOST 6 HTTP replaced headers 7 </keywords> 8 </info> 9 # Server-side 10 <reply> 11 <data> 12 HTTP/1.0 200 OK swsclose 13 Date: Tue, 09 Nov 2010 14:49:00 GMT 14 Server: test-server/fake 15 16 blablabla 17 18 </data> 19 </reply> 20 21 # Client-side 22 <client> 23 <features> 24 Mime 25 </features> 26 <server> 27 http 28 </server> 29 <name> 30 HTTP RFC1867-type formposting without Expect: header 31 </name> 32 <command> 33 http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F name=daniel -F tool=curl -F file=@%LOGDIR/test%TESTNUMBER.txt -H "Expect:" 34 </command> 35 # We create this file before the command is invoked! 36 <file name="%LOGDIR/test%TESTNUMBER.txt"> 37 foo- 38 This is a moo- 39 bar 40 </file> 41 </client> 42 43 # Verify data after the test has been "shot" 44 <verify> 45 <strip> 46 ^(Content-Type: multipart/form-data;|------).* 47 </strip> 48 <protocol> 49 POST /we/want/%TESTNUMBER HTTP/1.1 50 Host: %HOSTIP:%HTTPPORT 51 User-Agent: curl/%VERSION 52 Accept: */* 53 Content-Length: 432 54 Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce 55 56 ------------------------------7c633d5c27ce 57 Content-Disposition: form-data; name="name" 58 59 daniel 60 ------------------------------7c633d5c27ce 61 Content-Disposition: form-data; name="tool" 62 63 curl 64 ------------------------------7c633d5c27ce 65 Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt" 66 Content-Type: text/plain 67 68 foo- 69 This is a moo- 70 bar 71 72 ------------------------------7c633d5c27ce-- 73 </protocol> 74 </verify> 75 </testcase>