Skip to content

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

Merged
merged 3 commits into from
Jun 27, 2016
Merged

Add HTTP/2 Server Push to ext/curl #1692

merged 3 commits into from
Jun 27, 2016

Conversation

dshafik
Copy link
Contributor

@dshafik dshafik commented Dec 23, 2015

As per the RFC

@jpauli
Copy link
Member

jpauli commented Dec 23, 2015

Hi.

Could we add some tests in this PR please ?

@dshafik
Copy link
Contributor Author

dshafik commented Dec 23, 2015

@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.

@jpauli
Copy link
Member

jpauli commented Dec 23, 2015

I have no idea, but I'm sceptic at merging a PR that adds some code like this one, with no test at all.

@dshafik
Copy link
Contributor Author

dshafik commented Dec 23, 2015

@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.

@jpauli
Copy link
Member

jpauli commented Dec 23, 2015

Does the RFC point that ? If not, perhaps it is the moment to open the discussion ?
Tests also have the advantage to reveal eventual memory leaks or bad memory accesses (using valgrind mainly)

@rlerdorf
Copy link
Member

We could think about adding HTTP/2 to the built-in server to have a native test target.

@dshafik
Copy link
Contributor Author

dshafik commented Dec 23, 2015

@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

@php-pulls
Copy link

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.

@dshafik
Copy link
Contributor Author

dshafik commented Dec 23, 2015

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?

@jpauli jpauli added the RFC label Dec 24, 2015
@php-pulls php-pulls merged commit ad15e1c into php:master Jun 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants