Skip to content

lws: remove HTTP/2 support#785

Merged
saghul merged 1 commit intomasterfrom
no-h2
Feb 19, 2026
Merged

lws: remove HTTP/2 support#785
saghul merged 1 commit intomasterfrom
no-h2

Conversation

@saghul
Copy link
Copy Markdown
Owner

@saghul saghul commented Feb 19, 2026

This is a weird one. I'm not sure I'm doing the right thing, so let's
see how things evolve.

HTTP/2 introduces some complexity since one HTTP connection is no longer
equal to a struct lws_wsi. This means a lot of care needs to be taken
for destroying things in our context.

In addition, some logic (redirects, chunked encoding) needs to be
written twice basically.

Redirect handling has been moved to JS because it's way easier to
handle, as cross-domain redirects seem to not work right out of the box.

So, I'm making the call to not support HTTP/2 for now. This is a small
runtime and right now its drawbacks outweigh the benefits.

I suspect a number of these problems are caused by the fact that we are
running libuv as our event loop, as a foreign one at that.

This is a weird one. I'm not sure I'm doing the right thing, so let's
see how things evolve.

HTTP/2 introduces some complexity since one HTTP connection is no longer
equal to a `struct lws_wsi`. This means a lot of care needs to be taken
for destroying things in our context.

In addition, some logic (redirects, chunked encoding) needs to be
written twice basically.

Redirect handling has been moved to JS because it's way easier to
handle, as cross-domain redirects seem to not work right out of the box.

So, I'm making the call to not support HTTP/2 for now. This is a small
runtime and right now its drawbacks outweigh the benefits.

I suspect a number of these problems are caused by the fact that we are
running libuv as our event loop, as a foreign one at that.
@saghul saghul merged commit d7fec59 into master Feb 19, 2026
19 checks passed
@saghul saghul deleted the no-h2 branch February 19, 2026 13:31
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