http-utils: resolve relative `Location` headers against the request URI #3701
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.35) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 165 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.306
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3701"
general
weight: 0.35
idelpivnitskiy
Motivation
RedirectingHttpRequesterFiltertreated aLocationvalue as a request-target, but RFC 9110 section 10.2.2 defines it as a URI-reference to resolve against the target URI. Only absolute URLs and absolute paths worked. A protocol-relative//host/xmade the multi-address client connect to a host namednullor fail withMalformedURLException. Relative-path (d,../d) and query-only (?r) locations produced malformed request-targets.Modifications
Locationagainst the previous request's URI per RFC 3986 section 5, then build the redirect request-target from the result: absolute-form when non-relative redirects are allowed, origin-form otherwise.Result
Protocol-relative, relative-path, and query-only redirects now work with both the single-address and multi-address clients.
Behavior change
RedirectRequestTransformernow receives a request whose target is fully resolved, with dot-segments removed. A redirect to the same host and port with a different scheme is now non-relative. A non-relative redirect whose scheme or host is missing or empty is no longer followed.