Commit 068517b
committed
fix(shield): widen Retry-After when the outer budget wins a header tie
maybe_tighten_rate_headers overwrote RateLimit-* with the longer-binding outer
budget on a remaining tie but left the inner layer's Retry-After untouched, so a
429 could advertise the outer's hour-long reset yet tell the client to retry
after the inner's minute. It now widens Retry-After to the winning reset on an
error response (never shrinking, and never adding one to a 200). Covered by the
test in 13acd1a.1 parent 13acd1a commit 068517b
1 file changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
366 | 384 | | |
367 | 385 | | |
368 | 386 | | |
| |||
0 commit comments