Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89940 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4355 invoked from network); 31 Dec 2015 15:03:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Dec 2015 15:03:56 -0000 Authentication-Results: pb1.pair.com header.from=pencap@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pencap@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.48 as permitted sender) X-PHP-List-Original-Sender: pencap@gmail.com X-Host-Fingerprint: 209.85.213.48 mail-vk0-f48.google.com Received: from [209.85.213.48] ([209.85.213.48:35881] helo=mail-vk0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4C/EC-51216-BD345865 for ; Thu, 31 Dec 2015 10:03:55 -0500 Received: by mail-vk0-f48.google.com with SMTP id f2so178195063vkb.3 for ; Thu, 31 Dec 2015 07:03:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=euPMZ1SEJBlIqsXs6e4G1wNfAf6ELKhIS/BhUaHUFlE=; b=WEgzRpYeuYQZEx40+gQhObJOR0PEqz4rMszUJ0eBDPhCRW7PJB0Zk0hAyTcsr/JNtw J5L4KeoWdfu8P4mHQwwGIkd7pjAsUllHHjopmTAOJN5GXv/KtCxAA49y1v+Hpq2koAro FFgDD5M7wCnkt79nI7ir4T5HkcOerYTqvU8X+505AwENQcErj6r+X1wW7ewllDZA+6JD tBhRyd2bKOYJLfidjOeyRoI3JCMZ+l8eaz/qAVxkgAY5BALFfqvijbB+i1LZfDLQEJDd tADqTlhijG9U6A4tPQPnL+cCpmXz6hmetPfD/HBXx7M8iWmwtn+URe3Aq07hrvW1d3bc gXiQ== MIME-Version: 1.0 X-Received: by 10.31.47.130 with SMTP id v124mr46086425vkv.117.1451574232665; Thu, 31 Dec 2015 07:03:52 -0800 (PST) Received: by 10.31.133.135 with HTTP; Thu, 31 Dec 2015 07:03:52 -0800 (PST) Received: by 10.31.133.135 with HTTP; Thu, 31 Dec 2015 07:03:52 -0800 (PST) In-Reply-To: References: Date: Thu, 31 Dec 2015 09:03:52 -0600 Message-ID: To: Davey Shafik Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a1143122a80de72052832f6e6 Subject: Re: [PHP-DEV] Testing HTTP/2 support in PHP From: pencap@gmail.com (Mike Willbanks) --001a1143122a80de72052832f6e6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Dec 30, 2015 5:29 PM, "Davey Shafik" wrote: > > Hey all, > > In the PR for adding HTTP/2 Server Push support to curl, Julien raises th= e > 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 u= sing > 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 us= e > 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 = client > fallback when it's not supported. I would prefer the second as http2 will be the standard to come. I'm not even sure disabling it is worth it, but as you mention some may not want the external library. > > 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. Agreed. > > 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 --001a1143122a80de72052832f6e6--