You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inspect headers for each send, after redirect and retry decisions. Replay a same-origin claims challenge at the challenged hop and do not reauthorize a redirected request whose credentials were stripped.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Active middleware defects leave incorrect retry-attempt headers on redirected requests and place downstream observability spans outside the authorization span.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The claims replay preserves a stale Retry-Attempt header despite restarting the retry counter, causing reported attempt counts to become inconsistent and decrease on subsequent retries.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Clear stale retry-attempt header before claims replay
Copying the challenged request also preserves Retry-Attempt from the completed retry invocation, but the claims replay starts a new RetryHandler invocation with a fresh counter. For a 429 → 429 → 401 (claims) → 429 → 200 sequence, the headers become absent, 1, 2, 2, 1: the first claims replay reports a stale attempt count, and its next retry decreases it. Please clear the retry header when preparing the claims replay, just as at the redirect boundary, so transmitted and inspected headers match the fresh retry counter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
gradlew.bat --no-daemon :components:http:okHttp:test