xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP GET |
| 6 | CURLE_PARTIAL_FILE |
| 7 | FAILURE |
| 8 | chunked Transfer-Encoding |
| 9 | </keywords> |
| 10 | </info> |
| 11 | # |
| 12 | # Server-side |
| 13 | <reply> |
| 14 | <data> |
| 15 | HTTP/1.1 200 funky chunky! swsclose |
| 16 | Server: fakeit/0.9 fakeitbad/1.0 |
| 17 | Transfer-Encoding: chunked |
| 18 | Connection: mooo |
| 19 | |
| 20 | 41
|
| 21 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
| 22 |
|
| 23 | </data> |
| 24 | <datacheck> |
| 25 | HTTP/1.1 200 funky chunky! swsclose |
| 26 | Server: fakeit/0.9 fakeitbad/1.0 |
| 27 | Transfer-Encoding: chunked |
| 28 | Connection: mooo |
| 29 | |
| 30 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
| 31 | </datacheck> |
| 32 | </reply> |
| 33 | |
| 34 | # |
| 35 | # Client-side |
| 36 | <client> |
| 37 | <server> |
| 38 | http |
| 39 | </server> |
| 40 | <name> |
| 41 | HTTP GET with chunked Transfer-Encoding closed prematurely |
| 42 | </name> |
| 43 | <command> |
| 44 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER |
| 45 | </command> |
| 46 | </client> |
| 47 | |
| 48 | # |
| 49 | # Verify data after the test has been "shot" |
| 50 | <verify> |
| 51 | <protocol> |
| 52 | GET /%TESTNUMBER HTTP/1.1
|
| 53 | Host: %HOSTIP:%HTTPPORT
|
| 54 | User-Agent: curl/%VERSION
|
| 55 | Accept: */*
|
| 56 |
|
| 57 | </protocol> |
| 58 | |
| 59 | # curl: (18) transfer closed with outstanding read data remaining |
| 60 | # 18 == CURLE_PARTIAL_FILE |
| 61 | # 56 == CURLE_RECV_ERROR |
| 62 | <errorcode> |
| 63 | %if hyper |
| 64 | 56 |
| 65 | %else |
| 66 | 18 |
| 67 | %endif |
| 68 | </errorcode> |
| 69 | </verify> |
| 70 | </testcase> |