Repository navigation
http: streams use the proxy route and a trusted CA, as fetch does - #496
Merged
Merged
Conversation
open and open.how now pick RouteDirect or RouteProxy through proxy.select, as pool.one.of does. open.how and open.raw.how take a CA file after cert; it follows only same-origin hops. origin.route is the shared key, request, and route choice for the pool and the stream. http 0.36.0.0. Closes #471
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Http.openandHttp.open.hownow connect the wayfetchdoes. Before this change,stream.origincalledconn.open.alldirectly. That skipped the proxy choice, so a program behindHTTPS_PROXYcouldfetcha URL but could notopena stream to it. It also passed""as the CA, so a stream to a server with a private CA failed wherefetch.casucceeded.Changes
origin.routebuilds the pool key, the request as sent, and theRoute(RouteDirectorRouteProxy) for one origin. The pool path (pool.origin.route) and the stream path (stream.route) both use it, so they cannot drift apart. The proxy rules are the same: an HTTP proxy gets an absolute-form target andProxy-Authorization, and an HTTPS proxy getsCONNECTbefore TLS.stream.one.ofcallsproxy.select, aspool.one.ofdoes.route.opentakes the h2 ALPN offer flag. Pools passTrue. Streams passFalse, because a stream speaks HTTP/1.1 only.open.how,open.raw.how, andopen.how.enctakecaaftercert.StreamHopscarries it. A redirect keeps the CA only on the same origin (stream.trust, usingpool.next.ca).Breaking:
http0.35.0.0 → 0.36.0.0. No sibling callsopen.howoropen.raw.how. Siblings stay on 0.35.0.0 until a re-pin wave.Verification
scripts/check.sh http: exit 0.check.bendnow sends a forward stream and a CONNECT stream through the local proxy. The proxy checks the absolute-form target, theHostheader, andProxy-Authorization, and it sees the CONNECT authority.http/ca-check.sh(native):open.howwith the test CA follows a redirect and readsok. With"", it fails withErrTls100.http/mtls-check.sh(native): all mTLS stream and fetch checks pass with the newopen.howsignature.scripts/publish.sh --check:[email protected] will publish.Closes #471
Refs #440