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

[v0.3] Support HTTP Upgrade #135

Open
lann opened this issue Nov 9, 2024 · 1 comment
Open

[v0.3] Support HTTP Upgrade #135

lann opened this issue Nov 9, 2024 · 1 comment

Comments

@lann
Copy link
Contributor

lann commented Nov 9, 2024

The HTTP "Upgrade" mechanism allows for a client and server to negotiate switching an HTTP connection to use another protocol. This is most notably used by WebSockets but has a few other uses including the popular WebTransport proposal.

I would expect implementation of this feature to be optional, so it might make sense for it to use separate interface(s) that can take ownership of a request/response and return some stream(-like) resource representing the underlying connection. This could even perhaps live outside of wasi-http itself if we find a good pattern for representing this kind of "interface extension", similar to proposals in #4.

@lann
Copy link
Contributor Author

lann commented Nov 9, 2024

I suppose the obvious alternative here would be protocol-specific interfaces e.g. wasi-websocket, which would be implementable in browsers unlike a generic upgrade mechanism.

Both could also be supported, e.g. a wasi-websocket connection resource that can be obtained either by an upgrade interface that takes ownership of a wasi-http request/response or via a constrained browser-compatible outbound-websocket interface.

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

No branches or pull requests

1 participant