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

Avoided to write status message for HTTP/2 #45

Closed
wants to merge 4 commits into from

Conversation

genki
Copy link

@genki genki commented Feb 14, 2023

Currently node warns if using HTTP/2 as follows:

(node:53810) UnsupportedWarning: Status message is not supported by HTTP/2 (RFC7540 8.1.2.4)

In order to fit to the spec of HTTP/2, avoided to write status message.

@dougwilson
Copy link
Contributor

Hi @genki 👋 I noticed you pushed an additional commit. Before you spend too much time, perhaps you can elaborate on what, exactly, this changes. You didn't provide much information, but I gather from the PR title and body that you are getting a warning about writing a status message? Nothing in this module actually writes anything to a HTTP request or response -- it simply watches for events and then triggered a user-defined callback when one of those events happens. It seems like you change is saying that if the message is HTTP/2, then invoke the user callback, but do not provide any details for the reason? That seems like it would not only break our API contract, but it is unclear how, exactly, that would stop the warning you are seeing. We do need tests added as well, so it's possible that if you can add a test that demonstrates that warning happening and then being fixed by your change, it will also help clarify. Thank you!

@genki
Copy link
Author

genki commented Feb 14, 2023

@dougwilson Sorry for the frequent commit.
Because the testing was passed in my env so I needed to fix mistakes several times.
I have faced the warning while I am using the Vite with https.
Tracing the warning, the source of that was in the on-finished bundled in the Vite.
I understand the responsibility of createListener.
The real reason must be in the user callback. I will debug it.
Thank you :)

@genki genki closed this Feb 14, 2023
@genki genki deleted the no_status_msg_for_http2 branch February 14, 2023 01:59
@meduzen
Copy link

meduzen commented Mar 2, 2023

Hi @genki, I landed here because I encounter the same “error” message using vite preview with HTTPS. Have you been able to make progress?

I’ve checked vitejs/vite#2754 (mentioning also expressjs/compression#122 and vitejs/vite#6557) but couldn’t progress. There’s also maybe vitejs/vite#11815 to follow.

@genki genki restored the no_status_msg_for_http2 branch June 30, 2023 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants