test653 (1895B)
1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP POST 6 MIME 7 </keywords> 8 </info> 9 10 # 11 # Server-side 12 <reply> 13 <data> 14 HTTP/1.1 200 OK 15 Date: Tue, 09 Nov 2010 14:49:00 GMT 16 Server: test-server/fake swsclose 17 Connection: close 18 Content-Type: text/html 19 20 hello 21 </data> 22 <datacheck> 23 HTTP/1.1 200 OK 24 Date: Tue, 09 Nov 2010 14:49:00 GMT 25 Server: test-server/fake swsclose 26 Connection: close 27 Content-Type: text/html 28 29 hello 30 HTTP/1.1 200 OK 31 Date: Tue, 09 Nov 2010 14:49:00 GMT 32 Server: test-server/fake swsclose 33 Connection: close 34 Content-Type: text/html 35 36 hello 37 </datacheck> 38 </reply> 39 40 # Client-side 41 <client> 42 <features> 43 Mime 44 </features> 45 <server> 46 http 47 </server> 48 # tool is what to use instead of 'curl' 49 <tool> 50 lib%TESTNUMBER 51 </tool> 52 53 <name> 54 Reuse of handle after altering mime data 55 </name> 56 <command> 57 http://%HOSTIP:%HTTPPORT/%TESTNUMBER 58 </command> 59 </client> 60 61 # 62 # Verify data after the test has been "shot" 63 <verify> 64 <strippart> 65 s/^--------------------------[A-Za-z0-9]*/------------------------------/ 66 s/boundary=------------------------[A-Za-z0-9]*/boundary=----------------------------/ 67 </strippart> 68 # Note that the stripping above removes 12 bytes from every occurrence of the 69 # boundary string and since 5 of them are in the body contents, we see 70 # (5*12) == 60 bytes less 71 <protocol> 72 POST /%TESTNUMBER HTTP/1.1 73 Host: %HOSTIP:%HTTPPORT 74 Accept: */* 75 Content-Length: 162 76 Content-Type: multipart/form-data; boundary=---------------------------- 77 78 ------------------------------ 79 Content-Disposition: form-data; name="name" 80 81 short value 82 -------------------------------- 83 POST /%TESTNUMBER HTTP/1.1 84 Host: %HOSTIP:%HTTPPORT 85 Accept: */* 86 Content-Length: 179 87 Content-Type: multipart/form-data; boundary=---------------------------- 88 89 ------------------------------ 90 Content-Disposition: form-data; name="name" 91 92 long value for length change 93 -------------------------------- 94 </protocol> 95 </verify> 96 </testcase>