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 429 too many requests swsbounce |
| 15 | Retry-After: 1 |
| 16 | Content-Length: 4 |
| 17 | |
| 18 | moo |
| 19 | </data> |
| 20 | <data1> |
| 21 | HTTP/1.1 200 OK |
| 22 | Content-Length: 4 |
| 23 | Connection: close |
| 24 | |
| 25 | hey |
| 26 | </data1> |
| 27 | |
| 28 | <datacheck> |
| 29 | HTTP/1.1 429 too many requests swsbounce |
| 30 | Retry-After: 1 |
| 31 | Content-Length: 4 |
| 32 | |
| 33 | HTTP/1.1 200 OK |
| 34 | Content-Length: 4 |
| 35 | Connection: close |
| 36 | |
| 37 | hey |
| 38 | </datacheck> |
| 39 | </reply> |
| 40 | |
| 41 | # |
| 42 | # Client-side |
| 43 | <client> |
| 44 | <server> |
| 45 | http |
| 46 | </server> |
| 47 | <name> |
| 48 | --retry with a 429 response and Retry-After: and --fail |
| 49 | </name> |
| 50 | <command> |
| 51 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER --retry 1 --fail |
| 52 | </command> |
| 53 | </client> |
| 54 | |
| 55 | # |
| 56 | # Verify data after the test has been "shot" |
| 57 | <verify> |
| 58 | <protocol> |
| 59 | GET /%TESTNUMBER HTTP/1.1
|
| 60 | Host: %HOSTIP:%HTTPPORT
|
| 61 | User-Agent: curl/%VERSION
|
| 62 | Accept: */*
|
| 63 |
|
| 64 | GET /%TESTNUMBER HTTP/1.1
|
| 65 | Host: %HOSTIP:%HTTPPORT
|
| 66 | User-Agent: curl/%VERSION
|
| 67 | Accept: */*
|
| 68 |
|
| 69 | </protocol> |
| 70 | </verify> |
| 71 | </testcase> |