forked from linkerd/linkerd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
proxy: Move absolute URI detection to
bind::Protocol
(linkerd#938)
This is in preparation for landing the Tokio upgrade. In the upcoming Hyper release, the handling of absolute form request URIs moved from `hyper::Request` to the `hyper::client::connect::Connect` trait. Once we upgrade to the new Tokio, we will have to upgrade our Hyper dependency as well. Currently, Conduit detects whether the request URI is in absolute form in `h1::normalize_our_view_of_uri` and adds an extension to the request if it is. This will no longer work with the new Hyper, as that function is called from the `bind::NormalizeUri` service, which is not constructed until after the client connection is established. Therefore, it is necessary to move this information to `bind::Protocol`, so that it can be passed to `transparency::client::HyperConnect` (our implementation of Hyper's `Connect` trait) when we are using the newest Hyper. For now, however, I've left in the `UriIsAbsoluteForm` extension and continued to set it in `h1::normalize_our_view_of_uri`, since we currently still use it on the current Hyper version. I thought it was good to minimize the changes to this existing code, as it will be removed when we migrate to the new Hyper. This PR shouldn't cause any functional changes. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
- Loading branch information
Showing
4 changed files
with
65 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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