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

nghttp2-asio + server example compiling, but no data is coming in, connection is disconnected immediately after connection establishment #21

Open
capiman opened this issue Aug 10, 2024 · 1 comment

Comments

@capiman
Copy link

capiman commented Aug 10, 2024

I was able to compile nghttp2-asio together with the server example.

With additional debug output I see that http2_handler::start is called, when I connect to the example server.
All the callbacks are set and finally 0 is returned (so seems no error happened).
The connection is then just disconnected.
I can do it again and again, and above sequence happens again.

But then nothing more happens. The callback are never called.

What would be the next function/method, which would be called? Where do I find the code which disconnects my established connection, because, perhaps then, I can see what fails?

There was earlier some --enable-asio-lib (or similar, in nghttp2). I assume this is not more needed?
Could it be dependency on Boost? Which Boost version is known to be working, so I can just try this version?

@capiman
Copy link
Author

capiman commented Aug 11, 2024

It is due to checking NGHTTP2_CLIENT_MAGIC. See here for checked string:

https://github.com/nghttp2/nghttp2/blob/d97bc7d8745ded136efa6e9e747f2310406893dd/lib/includes/nghttp2/nghttp2.h#L252

One need to use curl option --http2-prior-knowledge (and of course a curl which supports this).

(And I switched to latest master of nghttp2, but unsure if this is really needed. Before it was 1.61.0 or so)

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

1 participant