xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP GET |
| 6 | </keywords> |
| 7 | </info> |
| 8 | |
| 9 | # Server-side |
| 10 | <reply> |
| 11 | <data> |
| 12 | HTTP/1.1 301 OK swsbounce |
| 13 | Location: /%TESTNUMBER |
| 14 | Content-Length: 3 |
| 15 | |
| 16 | OK |
| 17 | </data> |
| 18 | <data1> |
| 19 | HTTP/1.1 200 OK |
| 20 | Connection: close |
| 21 | Content-Length: 15 |
| 22 | |
| 23 | Actual content |
| 24 | </data1> |
| 25 | |
| 26 | <datacheck> |
| 27 | HTTP/1.1 301 OK swsbounce |
| 28 | Location: /%TESTNUMBER |
| 29 | Content-Length: 3 |
| 30 | |
| 31 | HTTP/1.1 200 OK |
| 32 | Connection: close |
| 33 | Content-Length: 15 |
| 34 | |
| 35 | </datacheck> |
| 36 | |
| 37 | </reply> |
| 38 | |
| 39 | # Client-side |
| 40 | <client> |
| 41 | <server> |
| 42 | http |
| 43 | </server> |
| 44 | <name> |
| 45 | HTTP GET with resume and redirect (to a page that doesn't resume) |
| 46 | </name> |
| 47 | <command> |
| 48 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER -C 50 -L |
| 49 | </command> |
| 50 | </client> |
| 51 | |
| 52 | # Verify data after the test has been "shot" |
| 53 | <verify> |
| 54 | <protocol> |
| 55 | GET /%TESTNUMBER HTTP/1.1
|
| 56 | Host: %HOSTIP:%HTTPPORT
|
| 57 | Range: bytes=50-
|
| 58 | User-Agent: curl/%VERSION
|
| 59 | Accept: */*
|
| 60 |
|
| 61 | GET /%TESTNUMBER HTTP/1.1
|
| 62 | Host: %HOSTIP:%HTTPPORT
|
| 63 | Range: bytes=50-
|
| 64 | User-Agent: curl/%VERSION
|
| 65 | Accept: */*
|
| 66 |
|
| 67 | </protocol> |
| 68 | # 33 is CURLE_RANGE_ERROR |
| 69 | <errorcode> |
| 70 | 33 |
| 71 | </errorcode> |
| 72 | </verify> |
| 73 | </testcase> |