Skip to content

UnsupportedWarning: Status message is not supported by HTTP/2 (RFC7540 8.1.2.4) #1253

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

Closed
khflx opened this issue Sep 21, 2018 · 6 comments
Closed
Labels

Comments

@khflx
Copy link

khflx commented Sep 21, 2018

Hi
I tried to use the koa 2.5.3 framework on http2, but when the client accesses a url that does not exist, it will trigger the "UnsupportedWarning: Status message is not supported by HTTP/2 (RFC7540 8.1.2.4)" warning.
This seems to be because koa is set or gets response.statusMessageRelated source code

Is there any way to solve it?

@fl0w
Copy link
Contributor

fl0w commented Sep 24, 2018

Yes and no. Setting the message is done currently so removing that would arguably be breaking.

One could remove setting the message for HTTP/2 but that would require Koa to know what server it's running on - uncool.

We could make it flag-able, e.g. app.statusMessageOn404 = false (working title) with default being set to true. But that's something @dead-horse @jonathanong could pitch in on before I do it.

@fl0w fl0w added the http/2 label Sep 24, 2018
@edevil
Copy link
Contributor

edevil commented Sep 28, 2018

What if our app is running using both http and http2? Would we need two separate apps with different flag values?

@fl0w
Copy link
Contributor

fl0w commented Sep 28, 2018

With that solution, yes. But I agree - it's not elegant.

Sort of off topic but it feels like Koa needs a grand vision on how to support http/2 before an effort is put to fully support it (and I'm probably not the right person to envision that). Specifically how the flow of pushing should be implemented. I almost feel like there needs to be another level of abstraction between Koa and server to keep Koa agnostic (without going if http1 {} else if http2 {} all over the place).

@ddtramp
Copy link

ddtramp commented Oct 31, 2018

use spdy package should be ok
npm install spdy -SE

const server = spdy.createServer(options, app.callback())
server.listen(443)

@ddtramp
Copy link

ddtramp commented Oct 31, 2018

do not use http2 module in the nodejs core, use spdy

node node:8.12.0-jessie

@fl0w
Copy link
Contributor

fl0w commented Nov 9, 2018

Solved by #1264

@fl0w fl0w closed this as completed Nov 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants