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 |
| 14 | Server: test-server/fake |
| 15 | Location: data/reply/%TESTNUMBER |
| 16 | Content-Length: 32 |
| 17 | Connection: close |
| 18 | |
| 19 | Redirect to the same URL again! |
| 20 | </data> |
| 21 | <datacheck> |
| 22 | HTTP/1.1 301 This is a weirdo text message |
| 23 | Server: test-server/fake |
| 24 | Location: data/reply/%TESTNUMBER |
| 25 | Content-Length: 32 |
| 26 | Connection: close |
| 27 | |
| 28 | HTTP/1.1 301 This is a weirdo text message |
| 29 | Server: test-server/fake |
| 30 | Location: data/reply/%TESTNUMBER |
| 31 | Content-Length: 32 |
| 32 | Connection: close |
| 33 | |
| 34 | HTTP/1.1 301 This is a weirdo text message |
| 35 | Server: test-server/fake |
| 36 | Location: data/reply/%TESTNUMBER |
| 37 | Content-Length: 32 |
| 38 | Connection: close |
| 39 | |
| 40 | HTTP/1.1 301 This is a weirdo text message |
| 41 | Server: test-server/fake |
| 42 | Location: data/reply/%TESTNUMBER |
| 43 | Content-Length: 32 |
| 44 | Connection: close |
| 45 | |
| 46 | HTTP/1.1 301 This is a weirdo text message |
| 47 | Server: test-server/fake |
| 48 | Location: data/reply/%TESTNUMBER |
| 49 | Content-Length: 32 |
| 50 | Connection: close |
| 51 | |
| 52 | HTTP/1.1 301 This is a weirdo text message |
| 53 | Server: test-server/fake |
| 54 | Location: data/reply/%TESTNUMBER |
| 55 | Content-Length: 32 |
| 56 | Connection: close |
| 57 | |
| 58 | </datacheck> |
| 59 | </reply> |
| 60 | |
| 61 | # Client-side |
| 62 | <client> |
| 63 | <server> |
| 64 | http |
| 65 | </server> |
| 66 | <name> |
| 67 | looping HTTP Location: following with --max-redirs |
| 68 | </name> |
| 69 | <command> |
| 70 | http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L --max-redirs 5 |
| 71 | </command> |
| 72 | </client> |
| 73 | |
| 74 | # Verify data after the test has been "shot" |
| 75 | <verify> |
| 76 | <protocol> |
| 77 | GET /want/%TESTNUMBER HTTP/1.1
|
| 78 | Host: %HOSTIP:%HTTPPORT
|
| 79 | User-Agent: curl/%VERSION
|
| 80 | Accept: */*
|
| 81 |
|
| 82 | GET /want/data/reply/%TESTNUMBER HTTP/1.1
|
| 83 | Host: %HOSTIP:%HTTPPORT
|
| 84 | User-Agent: curl/%VERSION
|
| 85 | Accept: */*
|
| 86 |
|
| 87 | GET /want/data/reply/data/reply/%TESTNUMBER HTTP/1.1
|
| 88 | Host: %HOSTIP:%HTTPPORT
|
| 89 | User-Agent: curl/%VERSION
|
| 90 | Accept: */*
|
| 91 |
|
| 92 | GET /want/data/reply/data/reply/data/reply/%TESTNUMBER HTTP/1.1
|
| 93 | Host: %HOSTIP:%HTTPPORT
|
| 94 | User-Agent: curl/%VERSION
|
| 95 | Accept: */*
|
| 96 |
|
| 97 | GET /want/data/reply/data/reply/data/reply/data/reply/%TESTNUMBER HTTP/1.1
|
| 98 | Host: %HOSTIP:%HTTPPORT
|
| 99 | User-Agent: curl/%VERSION
|
| 100 | Accept: */*
|
| 101 |
|
| 102 | GET /want/data/reply/data/reply/data/reply/data/reply/data/reply/%TESTNUMBER HTTP/1.1
|
| 103 | Host: %HOSTIP:%HTTPPORT
|
| 104 | User-Agent: curl/%VERSION
|
| 105 | Accept: */*
|
| 106 |
|
| 107 | </protocol> |
| 108 | |
| 109 | <errorcode> |
| 110 | 47 |
| 111 | </errorcode> |
| 112 | </verify> |
| 113 | </testcase> |