| <?xml version="1.0" encoding="US-ASCII"?> |
| <testcase> |
| <info> |
| <keywords> |
| HTTP |
| HTTP POST |
| </keywords> |
| </info> |
| # Server-side |
| <reply> |
| <data crlf="headers"> |
| HTTP/1.1 403 Go away and swsclose |
| Server: test-server/fake |
| Content-Type: text/html |
| Content-Length: 55 |
| Connection: close |
| |
| you are not supposed to be allowed to send things here |
| </data> |
| <servercmd> |
| skip: 2300 |
| </servercmd> |
| </reply> |
| |
| # Client-side |
| <client> |
| <server> |
| http |
| </server> |
| <name> |
| HTTP POST with server closing connection before (all) data is received |
| </name> |
| <command> |
| -d @%LOGDIR/input%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER -H "Expect: 100-continue" |
| </command> |
| <file name="%LOGDIR/input%TESTNUMBER"> |
| This creates the named file with this content before the test case is run, |
| which is useful if the test case needs a file to act on. We create this file |
| rather large (larger than your typical TCP packet) so that not all of it can nor |
| will be sent in one go as that is kind of the point of this test! |
| |
| Here's 2000 x 'O': |
| %repeat[2000 x O]% |
| </file> |
| </client> |
| |
| # Verify data after the test has been "shot" |
| <verify> |
| <protocol crlf="yes" nonewline="yes"> |
| POST /%TESTNUMBER HTTP/1.1 |
| Host: %HOSTIP:%HTTPPORT |
| User-Agent: curl/%VERSION |
| Accept: */* |
| Expect: 100-continue |
| Content-Length: 2313 |
| Content-Type: application/x-www-form-urlencoded |
| |
| This creates%SP |
| </protocol> |
| </verify> |
| </testcase> |