forked from apple/swift-nio
-
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.
Added helper to configure HTTP1 or H2 accordingly to the negotiated p…
…rotocol (apple#193) Motivation: Applications might want to support H2 (when available) and HTTP1 (as a fallback). The application logic should not change between the two versions of the protocol and the code to configure support for both the protocols is boilerplate and can be provided as an helper function. Modifications: This PR adds an helper function to configure HTTP1 or H2 pipelines according to the protocol negotiated by the TLS handler. Result: Applications that need to support clients using both HTTP1 and H2 can configure their channels by calling `configureCommonHTTPServerPipeline`, which should reduce the boilerplate they have to write. Co-Authored-By: Cory Benfield <lukasa@apple.com>
- Loading branch information
1 parent
fbfe24c
commit 798c19b
Showing
3 changed files
with
214 additions
and
7 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