xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP POST |
| 6 | HTTP MIME POST |
| 7 | HTTP FORMPOST |
| 8 | </keywords> |
| 9 | </info> |
| 10 | # Server-side |
| 11 | <reply> |
| 12 | <data> |
| 13 | HTTP/1.0 200 OK swsclose |
| 14 | Date: Tue, 09 Nov 2010 14:49:00 GMT |
| 15 | Server: test-server/fake |
| 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 custom Content-Type with parameter |
| 32 | </name> |
| 33 | <command> |
| 34 | http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -H 'Content-type: multipart/form-data; charset=utf-8' -F name=daniel -F tool=curl |
| 35 | </command> |
| 36 | </client> |
| 37 | |
| 38 | # Verify data after the test has been "shot" |
| 39 | <verify> |
| 40 | <strippart> |
| 41 | s/^--------------------------[a-z0-9]*/------------------------------/ |
| 42 | s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/ |
| 43 | </strippart> |
| 44 | <protocol> |
| 45 | POST /we/want/%TESTNUMBER HTTP/1.1
|
| 46 | Host: %HOSTIP:%HTTPPORT
|
| 47 | User-Agent: curl/%VERSION
|
| 48 | Accept: */*
|
| 49 | Content-Length: 242
|
| 50 | Content-Type: multipart/form-data; charset=utf-8; boundary=----------------------------
|
| 51 |
|
| 52 | ------------------------------
|
| 53 | Content-Disposition: form-data; name="name"
|
| 54 |
|
| 55 | daniel
|
| 56 | ------------------------------
|
| 57 | Content-Disposition: form-data; name="tool"
|
| 58 |
|
| 59 | curl
|
| 60 | --------------------------------
|
| 61 | </protocol> |
| 62 | </verify> |
| 63 | </testcase> |