Skip to content

fetch: reject the fetch when an HTTP proxy refuses CONNECT to an https origin - #35965

Open
robobun wants to merge 6 commits into
mainfrom
farm/09d8d79b/fetch-connect-reject-non-2xx
Open

fetch: reject the fetch when an HTTP proxy refuses CONNECT to an https origin#35965
robobun wants to merge 6 commits into
mainfrom
farm/09d8d79b/fetch-connect-reject-non-2xx

address review: include status in ProxyConnectFailed Display; hoist C…

b62c16c
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 26, 2026 in 18m 18s

Code review found 1 potential issue

Found 4 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/http/lib.rs:4939 bun install now retries permanent 4xx CONNECT failures as transient network errors

Annotations

Check warning on line 4939 in src/http/lib.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

bun install now retries permanent 4xx CONNECT failures as transient network errors

Returning `Err(ProxyConnectFailed)` here leaves `task.response.metadata` as `None`, so `bun install`'s retry gate at [runTasks.rs:378](../src/install/PackageManager/runTasks.rs) (`metadata.is_none() || status > 499`) now fires for a 407/403 CONNECT and each manifest/tarball task is re-enqueued up to `max_retry_count` (default 5), plus the `has_network_error` branch at :367 halves `max_simultaneous_requests`. Previously a 407 produced `metadata.is_some()` with status ≤ 499 → no retry, immediate `