xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP GET |
| 6 | followlocation |
| 7 | --max-redirs |
| 8 | </keywords> |
| 9 | </info> |
| 10 | # Server-side |
| 11 | <reply> |
| 12 | <data> |
| 13 | HTTP/1.1 301 This is a weirdo text message swsclose |
| 14 | Server: test-server/fake |
| 15 | Location: data/reply/25 |
| 16 | Content-Length: 0 |
| 17 | Connection: close |
| 18 | |
| 19 | </data> |
| 20 | </reply> |
| 21 | |
| 22 | # Client-side |
| 23 | <client> |
| 24 | <server> |
| 25 | http |
| 26 | </server> |
| 27 | <name> |
| 28 | HTTP Location: following with --max-redirs 0 |
| 29 | </name> |
| 30 | <command> |
| 31 | http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L --max-redirs 0 |
| 32 | </command> |
| 33 | </client> |
| 34 | |
| 35 | # Verify data after the test has been "shot" |
| 36 | <verify> |
| 37 | <protocol> |
| 38 | GET /want/%TESTNUMBER HTTP/1.1
|
| 39 | Host: %HOSTIP:%HTTPPORT
|
| 40 | User-Agent: curl/%VERSION
|
| 41 | Accept: */*
|
| 42 |
|
| 43 | </protocol> |
| 44 | |
| 45 | <errorcode> |
| 46 | 47 |
| 47 | </errorcode> |
| 48 | </verify> |
| 49 | </testcase> |