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 replaced headers |
| 7 | </keywords> |
| 8 | </info> |
| 9 | # |
| 10 | # Server-side |
| 11 | <reply> |
| 12 | <data> |
| 13 | HTTP/1.0 200 OK
|
| 14 | Server: test-server/fake
|
| 15 | Content-Type: text/html
|
| 16 | Content-Length: 6
|
| 17 |
|
| 18 | blaha |
| 19 | </data> |
| 20 | </reply> |
| 21 | |
| 22 | # |
| 23 | # Client-side |
| 24 | <client> |
| 25 | <server> |
| 26 | http |
| 27 | </server> |
| 28 | <name> |
| 29 | HTTP POST with custom content-type |
| 30 | </name> |
| 31 | <command> |
| 32 | -d "hejsanallabarn" -H "Content-Type: silly/type" http://%HOSTIP:%HTTPPORT/%TESTNUMBER |
| 33 | </command> |
| 34 | </client> |
| 35 | |
| 36 | # |
| 37 | # Verify data after the test has been "shot" |
| 38 | <verify> |
| 39 | <protocol nonewline="yes"> |
| 40 | POST /%TESTNUMBER HTTP/1.1
|
| 41 | Host: %HOSTIP:%HTTPPORT
|
| 42 | User-Agent: curl/%VERSION
|
| 43 | Accept: */*
|
| 44 | Content-Type: silly/type
|
| 45 | Content-Length: 14
|
| 46 |
|
| 47 | hejsanallabarn |
| 48 | </protocol> |
| 49 | </verify> |
| 50 | </testcase> |