Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110270 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 83376 invoked from network); 24 May 2020 16:25:42 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 May 2020 16:25:42 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3AA0F1804C3 for ; Sun, 24 May 2020 08:05:23 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 24 May 2020 08:05:22 -0700 (PDT) Received: by mail-wm1-f52.google.com with SMTP id h4so13210394wmb.4 for ; Sun, 24 May 2020 08:05:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=Uues/r1kPis1b0D4CRUAPEdreBYsEjQDGVuZG/xSD/E=; b=FptMtNYIXm/FJy02WSxes0duue8xPBdYX0dWMfsw8N8ubyCdW4MOJ4fpb70dLRa1rB yeLg884kDwT4CYk/mKxICnEF4ZdKCKCxO37c60+lFDT57lNRYroIzfnoGLW1qKe+2eVV Mbc+Q9QxXPKAzZj4pgoGZy4yF9GQsorAVLk5++CUKMX8AFFXX32M3QuxF4bw6No0XjMV ekOyDjr2x+bBAEX/zBI7AUxbrWvPgV29vCHrE/Xch6PPndEHPR2ArcXqdXNcxjszuTVM tO8TQ2ANCr/F/G5Ei+B9VgQqrmNGD7TIwzd7mDJaR6TWRb3+K/y8OfPDGwZxofAhpgQs NWgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=Uues/r1kPis1b0D4CRUAPEdreBYsEjQDGVuZG/xSD/E=; b=RTF+zdbGd+wtxXDfWjdtw3gJXhKM+Hw+2d110t6I9I7HXHuPHNOHI8TTZicPFVSqIb Ihls1r7YcvwXahc0cSO078pPqmtH6xnfVXE95wBxmCSsv7ovw/AbBMqFlsLeGo9F7N65 z90eOCXlD10JOnCBhi4xsJ9PSejvfGW5DvNixzuSMmXg9u828sE0tU+b8BtzWYp9gy/B RONgGNnAU+kM2OUXPIArlVfAuNDhQ8gE4Ts/ShMhKp8jAilOMrVM9kdow7TsMuHndPoH 7lso4L2CYo+RrDTY1OVHR801FmzWWlllGGKrsGgAyu3GsUNxhbpQP2cnstGOigUG+qug p65g== X-Gm-Message-State: AOAM533Tz5XncRXyvQSK5x+wGViGDABnglOSlXZdjLqtHO41Xj8sg5KN h9EWzwrob3nW3ZeD8E+p9QC4C65W X-Google-Smtp-Source: ABdhPJyrur+cd3iqqIkF3aj7CvV/eCVPBYnMk4C2/Hx6ELh170LNeg91bKTcM6KhyiW4nsTW8HxFfQ== X-Received: by 2002:a1c:7f4e:: with SMTP id a75mr20794386wmd.94.1590332721096; Sun, 24 May 2020 08:05:21 -0700 (PDT) Received: from [192.168.0.14] (cpc84253-brig22-2-0-cust114.3-3.cable.virginm.net. [81.108.141.115]) by smtp.googlemail.com with ESMTPSA id u10sm15150111wmc.31.2020.05.24.08.05.20 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 24 May 2020 08:05:20 -0700 (PDT) To: PHP Internals References: Message-ID: <2635b2ea-fe04-299e-d24e-d20917f9c0d2@gmail.com> Date: Sun, 24 May 2020 16:05:19 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [PHP-DEV] HTTP/1.1 by default in PHP 8.0 From: rowan.collins@gmail.com (Rowan Tommins) On 23/05/2020 08:08, Davey Shafik wrote: > This is ridiculously timely as I've been spending my evening working > on HTTP/2 stuff in PHP. > [...] > I believe that HTTP/2 has the potential to dramatically change how we > serve content on the web, and PHP should jump on the bandwagon. Hi Davey, I'm glad someone's working on this, because PHP should definitely be trying to keep up with such things. My only hesitation is that other than as a proof-of-concept, just allowing 'protocol_version'=>2 as a stream option isn't going to bring much advantage, because it doesn't give access to any of the interesting new features - it's still a single, one-way, synchronous request. Given it's always been a web programming language, PHP has surprisingly poor native support for HTTP. On the server side, we have the SAPI layer, which delegates most of the protocol to external applications in generally CGI-type ways. On the client side, we have the very minimal stream wrapper (which doesn't even support pipelining with Connection:Keep-Alive), or some painfully low-level bindings around libcurl. To really make use of HTTP/2, I would imagine both would need quite significant re-thinks: On the server side, can the SAPI and FastCGI definitions be extended, or do they need to be replaced, as Python defined ASGI [1] to replace WSGI? On the client side, should there be a better built-in HTTP client, whether based on libcurl or lower-level pieces like nghttp; or do we keep it low-level and expose nghttp2 itself in some way? [1] https://asgi.readthedocs.io/en/latest/introduction.html Regards, -- Rowan Tommins (né Collins) [IMSoP]