-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
websocket closed right after being opened #3151
Comments
If lws is the server, what's the client? hpack is an h2 thing, as is GOAWAY. It seems the client doesn't like what we sent? You can use Everything is fine without om-deflate enabled? |
Thanks for the quick response. The client is Edge or Brave (Chromium). This is the log of what the server send before receiving the error.
|
Does it affect it if you remove LWS_SERVER_OPTION_HTTP_HEADERS_SECURITY_BEST_PRACTICES_ENFORCE (to shorten the headers) Disabling tls is the same as disabling h2. Chrome seems to work fine, in h2 and ws-over-h2 with https://libwebsockets.org/testserver which is recent lws |
I confirm https://libwebsockets.org/testserver is working but lws version is Still the same problem without LWS_SERVER_OPTION_HTTP_HEADERS_SECURITY_BEST_PRACTICES_ENFORCE
|
It's literally caused by 24c37d1? What happens if you revert that patch? |
It is working if I revert the patch but the "Sec-WebSocket-Extensions: permessage-deflate" is not sent by the server
Shouldn't it be "sec-websocket-extensions" in lower case in h2? |
Yes it should be lower case for h2...
should be enough to try it. |
Oh well.... no actually that can only work for h1... it needs redoing. |
I finally got a chance to spend some time on this, I pushed a patch on main that should be compatible with h2... I could test that it still works with h1. If you're still interested in this please give it a try on your ws-over-h2 setup. |
Hello,
In case where permessage-deflate and ssl are activated, the websocket is closed right after being opened and the following error is written in the log:
It seems the problem occurs since version v4.3.0-311-g24c37d1e (compiled with -DLWS_WITHOUT_EXTENSIONS=OFF)
To reproduce, modify minimal-ws-server-pmd example to use ssl:
and add
The text was updated successfully, but these errors were encountered: