Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89932 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53238 invoked from network); 30 Dec 2015 23:28:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Dec 2015 23:28:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=me@daveyshafik.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=me@daveyshafik.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain daveyshafik.com from 74.125.82.42 cause and error) X-PHP-List-Original-Sender: me@daveyshafik.com X-Host-Fingerprint: 74.125.82.42 mail-wm0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:35638] helo=mail-wm0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EC/A7-51216-E9864865 for ; Wed, 30 Dec 2015 18:28:30 -0500 Received: by mail-wm0-f42.google.com with SMTP id f206so50311415wmf.0 for ; Wed, 30 Dec 2015 15:28:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daveyshafik-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=9aif7tLN8mwFFkc+1iIMkmAg17GZy4t9WHjzoPzRIJ8=; b=E4lrMPZTxBXNxH9kOtZ7NmUy2j4tS1J1lW/e+7W53yI0TqqQogrXYykafG+UD10V0Y dbeEYqo3re7MLXpMvTFaVGlxDsmAzp43+nBQFu7nV70TT75IljDffGKHxtxoUoHozJnK qg8gQBSAvAmlmjM7AXUPoaYQdWeD7PEidkSTGlvnmtHhxocXAzIMQKXK3BG8WmsPCmay X8q8QPU1fp/gdRSt/byK+mcSfpB6DzgTjGJFtFz1jngBYiJoIB3Giy8J7TMVlh3tWePa WQOg/qHFLz88mTAQZy91hosPvOY/+LQUkyoZhg35y6NxK9ZaoGRsv9suUJ8kXSufdayy oKHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:date:message-id:subject:from :to:content-type; bh=9aif7tLN8mwFFkc+1iIMkmAg17GZy4t9WHjzoPzRIJ8=; b=jyIVpGJM9auFz+XuC6Qduaea9kv3dQVwRjFUonX/l559XV+ituJKsACBg7trs/EStu /wfwniX98i2DxtTn0QqzyKEiYVoUDj0DIRa9iLFeDFeMb0w2BIX+DcVYpsks35hcYhhq mfjc8uiRzZOGKUOiY87PpADVn8dMt0iJ1/lg0Xg4RcdM29KgUxjmHDLsZqok/WNveHS/ PB+Ik/0a+tvxK4GMXHfeMOZgkYQ79L9DYem1/1279GMoJWW8IbcnAMPPnlTYtGmYX1fK ZphAplRdej9U8TEwjFztADGE8AnRvbSbUtbIezvNK0adSmq/uPco8nPd24wjLfZg3NaO 0MvQ== X-Gm-Message-State: ALoCoQmw8bgLkKFWn3om7QgvL5CpfHNC8KQYEGMzgxkohfMN3b8FOFrYoEYAT/VlNHPtrKz+E563Ivz2FF4pgO0JyybRQxwXZD3Pc+7kf0F0EdHgOfGnQq4= MIME-Version: 1.0 X-Received: by 10.28.126.77 with SMTP id z74mr67097554wmc.3.1451518107597; Wed, 30 Dec 2015 15:28:27 -0800 (PST) Sender: me@daveyshafik.com Received: by 10.194.83.198 with HTTP; Wed, 30 Dec 2015 15:28:27 -0800 (PST) Date: Wed, 30 Dec 2015 23:28:27 +0000 X-Google-Sender-Auth: XgLTallXsSbq3EyNpl4m6Iupjgg Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1141f14c3054cb052825e552 Subject: Testing HTTP/2 support in PHP From: davey@php.net (Davey Shafik) --001a1141f14c3054cb052825e552 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hey all, In the PR for adding HTTP/2 Server Push support to curl, Julien raises the question of adding tests for this feature [1]. This is currently very difficult. While we have the cli-server, it currently only supports HTTP/1.x. This means we need another httpd to test against that supports both HTTP/2 and server push =E2=80=94 currently that means something like a node script usi= ng node-http2, or nghttpd (both of which have been what I tested the patch against). While I have a docker container for testing, this obviously doesn't fit well into `make tests`. The simplest solution along those lines is to check for `node` and run a node daemon, but it doesn't scale well to lots of use cases, and is purely for testing. However, Rasmus raised the possibility of adding HTTP/2 support to the cli-server [2], and (someone? @php-pulls) suggested we pull in a third party lib to do the heavy lifting [3]. My recommendation would be to use libnghttp2 [4] which curl also uses =E2= =80=94 however, as this adds a new dependency, I think it should be optional (e.g. --with-nghttp2-dir=3D[PATH]), with it falling back to the current HTTP/1.x implementation. We could also add a flag (e.g. --[no-]http2) on the CLI for enabling/disabling it =E2=80=94 this would be helpful for testing HTTP/2 cl= ient fallback when it's not supported. This is a much more useful tool than relying on node for make tests, and allows us to test adding HTTP/2 support to ext/curl, the HTTP stream (which could also use libnghttp2=E2=80=A6), userland HTTP/2 clients, pecl_http (if= that's still a thing), etc. Now, I don't think I have the ability to achieve this, but I'm willing to give it a go. At the very least, I'm more than happy to write up the RFC and work with someone on this. Thoughts? - Davey [1] https://github.com/php/php-src/pull/1692#issuecomment-166935246 [2] https://github.com/php/php-src/pull/1692#issuecomment-166972540 [3] https://github.com/php/php-src/pull/1692#issuecomment-166997465 [4] https://nghttp2.org --001a1141f14c3054cb052825e552--