A plain HTTP request whose server can't be reached (the name doesn't
resolve, the port is closed, the host or network is unreachable, or
it times out) no longer gets a 502 page the engine made up. The
client's connection is reset unanswered, so the browser or app shows
its own connection error, as it would with no proxy, and the flow ends
as an error with the same plain reason a failed CONNECT gets.
The plain HTTP client now connects through the CONNECT dial, so it
shares its 10 second budget and its failure reasons. On macOS, when
Network.framework falls back to a local system proxy, the real cause
is found by looking the name up apart; the fallback wording goes to
the debug log only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The engine now opens the TCP connection to a CONNECT's server before it
answers. When the server can't be reached, the CONNECT gets a 502 (or a
504 on a timeout) and the client reports its own connection error, rather
than a 200 followed by a 502 inside the decrypted session or a silent
hang-up in a tunnel. The failure is recorded as one error flow.
The dialled connection is handed to the tunnel, or to the first upstream
connection of a decrypted one, so nothing is dialled twice.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Rebuild a bare-path plain-HTTP request's URL from Host, answer 400
"no host in request" when there is none, and refuse with 508 a rebuilt
request that is routed back into the proxy, which would otherwise loop
without end.
- Drop Host when forwarding to an HTTP/2 upstream. Google's servers reset
every stream that carries Host alongside :authority.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>