-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http: Parameterize normalize_ur::DefaultAuthority (#886)
The NormalizeUri module needs is configured with a fallback authority in case we're dealing with poorly-formed HTTP requests (i.e., HTTP/1.0). Currently, the module is parameterized on a `SocketAddr`, because on the outbound side this makes sense as a default value. But on the inbound side, especially in a gateway configuration, it doesn't make sense to support a default value. It's better to just fail the request early. This change updates the NormalizeUri type to require its targets to be parameterized on a DefaultAuthority type. This type provides an _optional_ `http::uri::Authority` so the target may provide a named value (i.e., from a service profile response) when appropriate. It will also enable us to omit a default when appropriate.
- Loading branch information
Showing
4 changed files
with
108 additions
and
52 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