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 | # |
| 10 | # Server-side |
| 11 | <reply> |
| 12 | </reply> |
| 13 | |
| 14 | # Client-side |
| 15 | <client> |
| 16 | <server> |
| 17 | http |
| 18 | </server> |
| 19 | # tool is what to use instead of 'curl' |
| 20 | <tool> |
| 21 | lib%TESTNUMBER |
| 22 | </tool> |
| 23 | |
| 24 | <name> |
| 25 | send HTTP POST using read callback that returns CURL_READFUNC_ABORT |
| 26 | </name> |
| 27 | # the 1s post-command delay helps to prevent a spurious failure on s390 |
| 28 | <command delay="1"> |
| 29 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER |
| 30 | </command> |
| 31 | </client> |
| 32 | |
| 33 | # |
| 34 | # Verify data after the test has been "shot" |
| 35 | <verify> |
| 36 | <protocol> |
| 37 | %if !hyper |
| 38 | POST /%TESTNUMBER HTTP/1.1
|
| 39 | Host: %HOSTIP:%HTTPPORT
|
| 40 | Accept: */*
|
| 41 | Content-Length: 1
|
| 42 | Content-Type: application/x-www-form-urlencoded
|
| 43 |
|
| 44 | %endif |
| 45 | </protocol> |
| 46 | # 42 - aborted by callback |
| 47 | <errorcode> |
| 48 | 42 |
| 49 | </errorcode> |
| 50 | </verify> |
| 51 | </testcase> |