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 CONNECT |
| 7 | proxytunnel |
| 8 | </keywords> |
| 9 | </info> |
| 10 | |
| 11 | # |
| 12 | # Server-side |
| 13 | <reply> |
| 14 | <data> |
| 15 | HTTP/1.1 200 OK |
| 16 | Date: Tue, 09 Nov 2010 14:49:00 GMT |
| 17 | Server: test-server/fake swsclose |
| 18 | Content-Type: text/html |
| 19 | Funny-head: yesyes |
| 20 | Content-Length: 9 |
| 21 | |
| 22 | contents |
| 23 | </data> |
| 24 | <connect> |
| 25 | HTTP/1.1 200 Mighty fine indeed
|
| 26 |
|
| 27 | </connect> |
| 28 | <datacheck> |
| 29 | HTTP/1.1 200 Mighty fine indeed
|
| 30 |
|
| 31 | HTTP/1.1 200 OK |
| 32 | Date: Tue, 09 Nov 2010 14:49:00 GMT |
| 33 | Server: test-server/fake swsclose |
| 34 | Content-Type: text/html |
| 35 | Funny-head: yesyes |
| 36 | Content-Length: 9 |
| 37 | |
| 38 | contents |
| 39 | </datacheck> |
| 40 | </reply> |
| 41 | |
| 42 | # |
| 43 | # Client-side |
| 44 | <client> |
| 45 | <features> |
| 46 | debug |
| 47 | proxy |
| 48 | </features> |
| 49 | <server> |
| 50 | http |
| 51 | http-proxy |
| 52 | </server> |
| 53 | <name> |
| 54 | CONNECT with short sends |
| 55 | </name> |
| 56 | <setenv> |
| 57 | # make the first send cut off after this amount of data |
| 58 | CURL_SMALLREQSEND=48 |
| 59 | # make repeated sends small too |
| 60 | CURL_SMALLSENDS=40 |
| 61 | </setenv> |
| 62 | <command> |
| 63 | http://test.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER -p -x %HOSTIP:%PROXYPORT -d "datatopost=ohthatsfunyesyes" |
| 64 | </command> |
| 65 | </client> |
| 66 | |
| 67 | # |
| 68 | # Verify data after the test has been "shot" |
| 69 | <verify> |
| 70 | <proxy> |
| 71 | CONNECT test.%TESTNUMBER:%HTTPPORT HTTP/1.1
|
| 72 | Host: test.%TESTNUMBER:%HTTPPORT
|
| 73 | User-Agent: curl/%VERSION
|
| 74 | Proxy-Connection: Keep-Alive
|
| 75 |
|
| 76 | </proxy> |
| 77 | <protocol nonewline="yes"> |
| 78 | POST /we/want/that/page/%TESTNUMBER HTTP/1.1
|
| 79 | Host: test.%TESTNUMBER:%HTTPPORT
|
| 80 | User-Agent: curl/%VERSION
|
| 81 | Accept: */*
|
| 82 | Content-Length: 27
|
| 83 | Content-Type: application/x-www-form-urlencoded
|
| 84 |
|
| 85 | datatopost=ohthatsfunyesyes |
| 86 | </protocol> |
| 87 | </verify> |
| 88 | </testcase> |