Commit 1a85d7b
committed
Handle Retry-After header for 429 and 503 in gateway prober
When a gateway returns 429 Too Many Requests or 503 Service
Unavailable, the Retry-After response header specifies how long
to wait before retrying. Previously these responses fell back to
static TTL defaults, ignoring the server-specified duration.
Add a retry_after_or helper that parses the Retry-After header
value as seconds and uses it as the cache TTL, falling back to
the configured default when the header is absent.
Closes #14741 parent 45d286f commit 1a85d7b
1 file changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
249 | 258 | | |
250 | 259 | | |
251 | 260 | | |
| |||
281 | 290 | | |
282 | 291 | | |
283 | 292 | | |
| 293 | + | |
| 294 | + | |
284 | 295 | | |
285 | | - | |
286 | 296 | | |
| 297 | + | |
| 298 | + | |
287 | 299 | | |
288 | | - | |
289 | 300 | | |
290 | 301 | | |
291 | 302 | | |
| |||
0 commit comments