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

WSS over HTTP/2 returns invalid RST_STREAM frame #1752

Closed
mconca opened this issue Nov 4, 2019 · 2 comments
Closed

WSS over HTTP/2 returns invalid RST_STREAM frame #1752

mconca opened this issue Nov 4, 2019 · 2 comments

Comments

@mconca
Copy link

mconca commented Nov 4, 2019

This issue was first reported to Mozilla in bug 1590299.

The http2 session is closed because we receive invalid RST_STREAM frame:
00 00 04 03 00 00 00 00 00
According to spec the stream id must not be 0. If it is, then it's a protocol error.

lws-team added a commit that referenced this issue Nov 4, 2019
rst_stream is almost always called from the h2 parser... in the case
a ws-over-h2 is closing though, it can't reference the h2n parser sid
context to get the sid to send... it's unrelated at that time.

https://bugzilla.mozilla.org/show_bug.cgi?id=1590299
#1752
lws-team added a commit that referenced this issue Nov 4, 2019
rst_stream is almost always called from the h2 parser... in the case
a ws-over-h2 is closing though, it can't reference the h2n parser sid
context to get the sid to send... it's unrelated at that time.

https://bugzilla.mozilla.org/show_bug.cgi?id=1590299
#1752
@lws-team
Copy link
Member

lws-team commented Nov 4, 2019

I pushed a patch on master and v3.2-stable that should solve the wrong sid on RST_STREAM when it's ws-over-h2 (only). I'm not sure that's the root cause of the problem, since it's already decided to close the wsi at that point and the bugzilla bug is complaining the ws link is closing unexpectedly.

Also I opened a firefox bugzilla 9 months ago about ws-over-h2 behaviour I can still see from the lws testserver even with this patch, it may be related

https://bugzilla.mozilla.org/show_bug.cgi?id=1528850

@lws-team
Copy link
Member

lws-team commented Nov 4, 2019

Btw https://libwebsockets.org/testserver is updated to current master and should demonstrate the RST_STREAM fix. It still passes all h2spec tests in CI as well.

@lws-team lws-team closed this as completed Nov 7, 2019
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

2 participants