Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add server-api to support http 1.1 upgrades #50

Merged
merged 5 commits into from
Jul 31, 2023
Merged

Conversation

anuragsoni
Copy link
Owner

@anuragsoni anuragsoni commented Jul 30, 2023

Explore adding support for HTTP 1.1 upgrades. This involves updating the API for the core response/server types just-enough to allow using libraries like async_websocket so shuttle based http servers can also serve web socket requests.

This is a WIP api, and should probably be called expert instead of upgrade. The intention for this new function is to write an initial response, and instead of writing a body surface the underlying file-descriptor to a user provided handler. The intended use-case is for http-upgrades where the user's service can either reject a request, or specify an initial response (headers) and then start using another protocol with the connected peer. This helps upgrade an existing http/1.1 connection to another protocol without having the client perform another TCP handshake.

@anuragsoni anuragsoni force-pushed the support-http-upgrades branch from 908a5df to 7edf4b8 Compare July 31, 2023 02:52
@anuragsoni anuragsoni changed the title [WIP] Support http 1.1 upgrades Add server-api to support http 1.1 upgrades Jul 31, 2023
@anuragsoni anuragsoni marked this pull request as ready for review July 31, 2023 03:40
@anuragsoni anuragsoni merged commit d25566a into main Jul 31, 2023
@anuragsoni anuragsoni deleted the support-http-upgrades branch July 31, 2023 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant