| xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame] | 1 | <testcase> | 
|  | 2 | <info> | 
|  | 3 | <keywords> | 
|  | 4 | HTTP | 
|  | 5 | HTTP POST | 
|  | 6 | </keywords> | 
|  | 7 | </info> | 
|  | 8 |  | 
|  | 9 | # Server-side | 
|  | 10 | <reply> | 
|  | 11 | <data> | 
|  | 12 | HTTP/1.1 200 OK swsclose | 
|  | 13 | Date: Tue, 09 Nov 2010 14:49:00 GMT | 
|  | 14 | Server: test-server/fake | 
|  | 15 | Content-Length: 11 | 
|  | 16 |  | 
|  | 17 | blablabla | 
|  | 18 |  | 
|  | 19 | </data> | 
|  | 20 | </reply> | 
|  | 21 |  | 
|  | 22 | # Client-side | 
|  | 23 | <client> | 
|  | 24 | <features> | 
|  | 25 | Mime | 
|  | 26 | </features> | 
|  | 27 | <server> | 
|  | 28 | http | 
|  | 29 | </server> | 
|  | 30 | <name> | 
|  | 31 | HTTP RFC1867-type formposting with types on text fields | 
|  | 32 | </name> | 
|  | 33 | <command> | 
|  | 34 | http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F "name=daniel;type=moo/foo" -F "html= <body>hello</body>;type=text/html;charset=verymoo" | 
|  | 35 | </command> | 
|  | 36 | # We create this file before the command is invoked! | 
|  | 37 | </client> | 
|  | 38 |  | 
|  | 39 | # Verify data after the test has been "shot" | 
|  | 40 | <verify> | 
|  | 41 | <strip> | 
|  | 42 | ^(Content-Type: multipart/form-data;|------------).* | 
|  | 43 | </strip> | 
|  | 44 | <protocol> | 
|  | 45 | POST /we/want/%TESTNUMBER HTTP/1.1 | 
|  | 46 | Host: %HOSTIP:%HTTPPORT | 
|  | 47 | User-Agent: curl/%VERSION | 
|  | 48 | Accept: */* | 
|  | 49 | Content-Length: 320 | 
|  | 50 | Content-Type: multipart/form-data; boundary=----------------------------212d9006ceb5 | 
|  | 51 |  | 
|  | 52 | ------------------------------212d9006ceb5 | 
|  | 53 | Content-Disposition: form-data; name="name" | 
|  | 54 | Content-Type: moo/foo | 
|  | 55 |  | 
|  | 56 | daniel | 
|  | 57 | ------------------------------212d9006ceb5 | 
|  | 58 | Content-Disposition: form-data; name="html" | 
|  | 59 | Content-Type: text/html;charset=verymoo | 
|  | 60 |  | 
|  | 61 | <body>hello</body> | 
|  | 62 | ------------------------------212d9006ceb5-- | 
|  | 63 | </protocol> | 
|  | 64 | </verify> | 
|  | 65 | </testcase> |