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

HTTP/2 Push Body Not Fetched #530

Closed
dshafik opened this issue Nov 18, 2015 · 9 comments
Closed

HTTP/2 Push Body Not Fetched #530

dshafik opened this issue Nov 18, 2015 · 9 comments
Assignees
Labels

Comments

@dshafik
Copy link

dshafik commented Nov 18, 2015

Similar to #529 I am using the http2-serverpush.c example — this time unaltered, along with the node-http2 server, here

While the easy handle is definitely being added to the multi handle, and seeming to do things with the buffer, nothing is ever returned. Using nghttp I get both the requested resource response, and the pushed response.

The only thing that I have noticed amiss is that the parent pointer as passed into the push callback is never returned from curl_multi_info_read() (here, but perhaps that's expected and I'm missing something there.

@bagder bagder self-assigned this Nov 18, 2015
@bagder bagder added the HTTP/2 label Nov 18, 2015
@bagder
Copy link
Member

bagder commented Nov 18, 2015

I just verified that my test case against nghttpd still works fine though - using that same unaltered example code. What curl version are you using now?

For reference, I invoke my test server like this: https://github.com/bagder/curl-http2-dev/blob/master/run-nghttp2-push.sh

I suppose I might need to bite the bullet and get the node-http2 server up and see if I can reproduce with that one...

The only thing that I have noticed amiss is that the parent pointer as passed into the push callback is never returned

That sounds wrong. So what happens to that transfer? Does that simply never end?

@dshafik
Copy link
Author

dshafik commented Nov 18, 2015

@bagder using the test server you specified, the sample does work, but my own code does not. I'll look further into that.

WRT the parent point, another (different from parent and easy) pointer is returned which works just fine, was just not something I expected.

@dshafik
Copy link
Author

dshafik commented Nov 18, 2015

I have my code working against the nghttp2 test server now, but even though nghttp works against the node server curl does not, still. I'm pretty sure something is still amiss here.

@bagder
Copy link
Member

bagder commented Nov 24, 2015

The server link in the original mention doesn't work anymore. I presume the problem persists? How do I get that style of server running in my place or can I reach yours/a public one to reproduce this issue?

@dshafik
Copy link
Author

dshafik commented Nov 28, 2015

@bagder oops, I removed it. I have re-instantiated it. To run it, just clone the repo, then in node-server run:

npm install
node index.js

That will make it available on port 8080, which you can easily change on the last line of index.js

It should return a simple bit of HTML, regardless of request:

Hello World! <script src="/main.js"></script>

And then pushes a file /main.js that looks like this:

alert("hello from push stream!")

If you hit this with nghttp on the command line, it works fine; however as noted, not through curl.

@bagder
Copy link
Member

bagder commented Nov 29, 2015

Thanks, analyzing...

@bagder
Copy link
Member

bagder commented Nov 29, 2015

I just pushed 8cbd806 and 8f281fb that fixed the problem for me. It'd be great if you could also give it a try.

@dshafik
Copy link
Author

dshafik commented Nov 30, 2015

Can confirm this fixes it, thanks!

@bagder
Copy link
Member

bagder commented Nov 30, 2015

Lovely, then it concludes this issue. Thanks for flying!

@bagder bagder closed this as completed Nov 30, 2015
@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants