xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP GET |
| 6 | RETRY-AFTER |
| 7 | </keywords> |
| 8 | </info> |
| 9 | |
| 10 | # |
| 11 | # Server-side |
| 12 | <reply> |
| 13 | <data> |
| 14 | HTTP/1.1 301 OK |
| 15 | Accept-Ranges: bytes |
| 16 | Content-Length: 0 |
| 17 | Connection: close |
| 18 | Location: /%TESTNUMBER0002 |
| 19 | |
| 20 | </data> |
| 21 | <data2> |
| 22 | HTTP/1.1 429 too many requests |
| 23 | Retry-After: 1 |
| 24 | Content-Length: 0 |
| 25 | Connection: close |
| 26 | |
| 27 | </data2> |
| 28 | |
| 29 | <datacheck> |
| 30 | HTTP/1.1 301 OK |
| 31 | Accept-Ranges: bytes |
| 32 | Content-Length: 0 |
| 33 | Connection: close |
| 34 | Location: /%TESTNUMBER0002 |
| 35 | |
| 36 | HTTP/1.1 429 too many requests |
| 37 | Retry-After: 1 |
| 38 | Content-Length: 0 |
| 39 | Connection: close |
| 40 | |
| 41 | HTTP/1.1 301 OK |
| 42 | Accept-Ranges: bytes |
| 43 | Content-Length: 0 |
| 44 | Connection: close |
| 45 | Location: /%TESTNUMBER0002 |
| 46 | |
| 47 | HTTP/1.1 429 too many requests |
| 48 | Retry-After: 1 |
| 49 | Content-Length: 0 |
| 50 | Connection: close |
| 51 | |
| 52 | </datacheck> |
| 53 | </reply> |
| 54 | |
| 55 | # |
| 56 | # Client-side |
| 57 | <client> |
| 58 | <server> |
| 59 | http |
| 60 | </server> |
| 61 | <name> |
| 62 | --retry with a 429 response and Retry-After: |
| 63 | </name> |
| 64 | <command> |
| 65 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER -d moo --retry 1 -L |
| 66 | </command> |
| 67 | </client> |
| 68 | |
| 69 | # |
| 70 | # Verify data after the test has been "shot" |
| 71 | <verify> |
| 72 | <protocol> |
| 73 | POST /%TESTNUMBER HTTP/1.1
|
| 74 | Host: %HOSTIP:%HTTPPORT
|
| 75 | User-Agent: curl/%VERSION
|
| 76 | Accept: */*
|
| 77 | Content-Length: 3
|
| 78 | Content-Type: application/x-www-form-urlencoded
|
| 79 |
|
| 80 | mooGET /%TESTNUMBER0002 HTTP/1.1
|
| 81 | Host: %HOSTIP:%HTTPPORT
|
| 82 | User-Agent: curl/%VERSION
|
| 83 | Accept: */*
|
| 84 |
|
| 85 | POST /%TESTNUMBER HTTP/1.1
|
| 86 | Host: %HOSTIP:%HTTPPORT
|
| 87 | User-Agent: curl/%VERSION
|
| 88 | Accept: */*
|
| 89 | Content-Length: 3
|
| 90 | Content-Type: application/x-www-form-urlencoded
|
| 91 |
|
| 92 | mooGET /%TESTNUMBER0002 HTTP/1.1
|
| 93 | Host: %HOSTIP:%HTTPPORT
|
| 94 | User-Agent: curl/%VERSION
|
| 95 | Accept: */*
|
| 96 |
|
| 97 | </protocol> |
| 98 | </verify> |
| 99 | </testcase> |