-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
http2 - compat not working as http #15491
Comments
I've tried with master. |
Just an FYI, but you can't do Also browsers won't connect via http2 to a non-secure server. |
@apapirovski: It's the same with |
A full source is going to be difficult since there are quite a lot of components involved to get it fully working. Have to think about how/if I can create a repo case you can run. What kind of debugging info would be useful? |
Do you have an example of how to create a http2 file upload using a client in node? |
Yeah, for sure. This test has a fully working example: https://github.com/nodejs/node/blob/master/test/parallel/test-http2-client-upload.js |
@apapirovski: The minimal case seems to work. So basically:
Not sure where to go from here... |
Can you tell me a bit more about what's happening in the full case? How exactly is the comparison for http vs http2 being done — are you just swapping Would love to help (since it sounds like there might be a legitimate issue) but it's hard without insight into what your code is doing, especially since the reduced test case works for you. |
I'm making a simple proxy that forwards http2 requests from Chrome to our backend storage server: Currently, I simply switch from // Doesn't work
// const httpsServer = http2
// .createSecureServer({
// cert: readFileSync('./server.crt'),
// key: readFileSync('./server.key'),
// allowHTTP1: true
// })
const httpsServer = https
.createServer({
cert: readFileSync('./server.crt'),
key: readFileSync('./server.key')
}) When I try to upload from Chrome the requests are stuck on "pending": |
Using nginx instead as http2->http1 proxy works. So I don't think it's a problem with the storage server. We're trying to replace nginx with a minimal node alternative. |
I think I'm able to replicate the issue. Looking into it. |
Issue is definitely in |
this same problem with me |
@apapirovski: Yep, that fixes it! |
Handle edge case where stream pause is called between resume being called and actually evaluated. Other minor adjustments to avoid various edge cases around stream events. Add new tests that cover all changes. Fixes: nodejs#15491
Handle edge case where stream pause is called between resume being called and actually evaluated. Other minor adjustments to avoid various edge cases around stream events. Add new tests that cover all changes. Fixes: #15491 PR-URL: #15503 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
Handle edge case where stream pause is called between resume being called and actually evaluated. Other minor adjustments to avoid various edge cases around stream events. Add new tests that cover all changes. Fixes: #15491 PR-URL: #15503 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
Handle edge case where stream pause is called between resume being called and actually evaluated. Other minor adjustments to avoid various edge cases around stream events. Add new tests that cover all changes. Fixes: nodejs/node#15491 PR-URL: nodejs/node#15503 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
I've got a weird case where
http
&https
works without problem. However,http2
compat does not.In the case where I'm trying to do a
PATCH
,PUT
orPOST
the request doesn't finish withhttp2
.GET
,HEAD
and other "safe" methods work without problem.Given that
http2
compat should be mostly an in place replacement forhttp
I believe this is a bug somewhere?I'm basically using http2-proxy something like:
Can't create a full repo since I don't know how to do http2 requests in node.
The text was updated successfully, but these errors were encountered: