-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add HTTP/2 Server Push to ext/curl #1692
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
Conversation
Hi. Could we add some tests in this PR please ? |
@jpauli I can double check/add tests for the refactoring, but the curl push stuff requires an HTTP/2 capable server with push support; do you have any thoughts on how to test it? Currently I have a docker container I spin up with both a node.js and nghttpd test servers on it, but that obviously isn't something we'd want to port over into the php test suite. |
I have no idea, but I'm sceptic at merging a PR that adds some code like this one, with no test at all. |
@jpauli I agree, but it will need discussion to figure out the best way to handle it. We should probably figure out a way for all HTTP/2 related functionality – in the future that might be the http stream and other extensions. |
Does the RFC point that ? If not, perhaps it is the moment to open the discussion ? |
We could think about adding HTTP/2 to the built-in server to have a native test target. |
@rlerdorf that's not a bad idea but also a big undertaking - I'm not sure we could even do push as it is blocking AFAIK |
I don't see that as being a limitation. You can obviously write a single-threaded event-driven HTTP/2 implementation. In fact that is the best way to implement it. But yes, it is non-trivial. Unless we can find a nice library that does all the heavy lifting that we can just link against. |
We could probably use nghttp2 for all the heavy lifting, it's a pretty fantastic library - but it's another dependency for core, of course. Perhaps make it conditional so that it will serve HTTP/1 regardless? |
As per the RFC