The current Retry-After parsing in github/client.go only supports integer seconds. Per RFC 7231, servers may also send an HTTP-date format (e.g. Retry-After: Thu, 01 Dec 2025 16:00:00 GMT).
Current Behavior
Only strconv.Atoi(ra) is tried. If the value is an HTTP-date, it's silently ignored and the default backoff is used.
Expected Behavior
Parse both integer seconds and HTTP-date formats. For HTTP-date, compute the delay as the difference between the parsed time and time.Now().
Notes
GitHub in practice only returns integer seconds, so this is a defense-in-depth/interoperability enhancement rather than a bug fix.
Identified during review of PR #93 (GPT review finding #1).
Low priority.
## Context
The current Retry-After parsing in `github/client.go` only supports integer seconds. Per RFC 7231, servers may also send an HTTP-date format (e.g. `Retry-After: Thu, 01 Dec 2025 16:00:00 GMT`).
## Current Behavior
Only `strconv.Atoi(ra)` is tried. If the value is an HTTP-date, it's silently ignored and the default backoff is used.
## Expected Behavior
Parse both integer seconds and HTTP-date formats. For HTTP-date, compute the delay as the difference between the parsed time and `time.Now()`.
## Notes
- GitHub in practice only returns integer seconds, so this is a defense-in-depth/interoperability enhancement rather than a bug fix.
- Identified during review of PR #93 (GPT review finding #1).
- Low priority.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Context
The current Retry-After parsing in
github/client.goonly supports integer seconds. Per RFC 7231, servers may also send an HTTP-date format (e.g.Retry-After: Thu, 01 Dec 2025 16:00:00 GMT).Current Behavior
Only
strconv.Atoi(ra)is tried. If the value is an HTTP-date, it's silently ignored and the default backoff is used.Expected Behavior
Parse both integer seconds and HTTP-date formats. For HTTP-date, compute the delay as the difference between the parsed time and
time.Now().Notes