Skip to content

fix: validate and bound Retry-After delays - #33

Merged
smiggleworth merged 1 commit into
mainfrom
fix/bound-retry-after
Aug 24, 2026
Merged

fix: validate and bound Retry-After delays#33
smiggleworth merged 1 commit into
mainfrom
fix/bound-retry-after

Conversation

@smiggleworth

Copy link
Copy Markdown
Contributor

Closes #24.

Summary

  • fall back to normal retry backoff for malformed Retry-After values
  • clamp valid server-provided delays with configurable maxRetryAfter
  • enforce deadlines against the resulting finite wait
  • cover malformed, far-future, normal, and invalid-option cases

Validation

  • npm run check

No package version or publishing changes.

@smiggleworth
smiggleworth marked this pull request as ready for review August 24, 2026 10:31
Copilot AI lite review requested due to automatic review settings August 24, 2026 10:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@smiggleworth
smiggleworth merged commit 0054cb5 into main Aug 24, 2026
3 checks passed
@smiggleworth
smiggleworth deleted the fix/bound-retry-after branch August 24, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

retry() middleware mishandles malformed/unbounded Retry-After header (NaN wait, no max clamp)

2 participants