Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89294 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53356 invoked from network); 22 Nov 2015 17:15:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Nov 2015 17:15:02 -0000 Authentication-Results: pb1.pair.com header.from=me@daveyshafik.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=me@daveyshafik.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain daveyshafik.com from 209.85.160.179 cause and error) X-PHP-List-Original-Sender: me@daveyshafik.com X-Host-Fingerprint: 209.85.160.179 mail-yk0-f179.google.com Received: from [209.85.160.179] ([209.85.160.179:33373] helo=mail-yk0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 05/25-23339-418F1565 for ; Sun, 22 Nov 2015 12:15:01 -0500 Received: by ykdv3 with SMTP id v3so215930420ykd.0 for ; Sun, 22 Nov 2015 09:14:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daveyshafik-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=UZh49zzGFwfpWFGAjfsphbIfp41IUhk4LbW6gu8dHFU=; b=tLLMzGRflDvgeGe7W7y7LCgy5BwiRmU23IFv7imVI46RGJPhyerqd5t3smq8Hzn5Jv JFuCUcu2rMm+wiPLLKHeelsNxHbliy+hE5LEt/+2ujtQLR0mZANWVtPxuRM03qp4wRbL CDzo2maxwjfo142QtcA1Mb49tyNcfuuD71oaapZKD5CvNRk2qWghI1agxqyFCgOnEGGr z061P/4MYX4fXbk6YNxMTRxixOVEWYuQqpiodX2ry30Fr1pFymMPKkoy41fujci4w5g8 mtaZIk2OPo71Mz+8sigRvp8ii2e1gp6QIOjd62b6Pa6ZwACTPETnVtZMb4rTx4uH4kVV dJRQ== 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:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=UZh49zzGFwfpWFGAjfsphbIfp41IUhk4LbW6gu8dHFU=; b=Jfgoco0Z9jkv7mhA7CUlzgOulMVLhapSg/GpfJQ1HzkKZBn7UfGlk834tqjMkDhs7i 3l8Ts0GK3OIXY46t+wPOPWBwLMIxFGcKmryw9amQ5ANbsCaAYEz/cOhyP4niAt29K+rv jRQuu8Kl6Cfcr5CJT1hU6e4PE59jrG8zsbGKTnUmCfslZ5gaoS7rRWFB7v2S4hVH/MNG 3HgVfUIgjO+/8zFZoEMpk10R+x+H8z1T9vwaNtFGK7p2inXVDjwcE8K7+ydLd4QOkbPu 1ckPKt0e8duqgY3pHHKZVj2lAw+AHNiaGtbt8xd9ciWoLyct6hLba9rgWn0gbIl430M8 8iXQ== X-Gm-Message-State: ALoCoQmeeQLcKqfrYIKNBU2DUT1BW+wJ8PouFe+Q+5OFf3PoaMsxVUgO/dX2qhQGqi1h9J4rtMC/ MIME-Version: 1.0 X-Received: by 10.129.80.138 with SMTP id e132mr20479843ywb.90.1448212496697; Sun, 22 Nov 2015 09:14:56 -0800 (PST) Sender: me@daveyshafik.com Received: by 10.13.253.130 with HTTP; Sun, 22 Nov 2015 09:14:56 -0800 (PST) In-Reply-To: References: Date: Sun, 22 Nov 2015 12:14:56 -0500 X-Google-Sender-Auth: AOj5VEmOQvc6OeEyLiSVSAfsMno Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1147fa526d066e0525243fc9 Subject: Re: [RFC] HTTP/2 Server Push support in ext/curl From: davey@php.net (Davey Shafik) --001a1147fa526d066e0525243fc9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Nov 18, 2015 at 6:34 PM, Davey Shafik wrote: > Forgot to mention, if you'd like to try this patch for yourself, check ou= t > my Docker container stuff here (with instructions :): > https://github.com/dshafik/php-http2-push-example > > On Wed, Nov 18, 2015 at 5:31 PM, Davey Shafik wrote: > >> Hey folks, >> >> I'd like to introduce a new RFC for 7.1 that will add support for HTTP/2 >> Server Push to ext/curl. >> >> This is exposing new features from libcurl to user land, which means the= y >> must have the latest (in fact currently unreleased, due to a bugfix) >> version of libcurl. >> >> For those who are not aware, HTTP/2 support is growing rapidly, and is >> already available in 60% of browsers, Apache 2 (via mod_h2), nginx, and >> even IIS. >> >> The RFC can be seen here: https://wiki.php.net/rfc/curl_http2_push >> With the patch at: >> https://github.com/php/php-src/compare/master...dshafik:curl-http2-push >> >> The patch still needs some work, possibly a lot of work due to my >> inexperience with C. Specifically, there are some memory leaks I've mana= ged >> to introduce with the headers array stuff (I'm pretty sure, lines >> 529-535[1]) and there is some duplicated code from interface.c (lines >> 454-523[2]) that I was unable to refactor out successfully to it's own >> function. Plus, on the whole it seems incredibly untidy to me. >> >> Feedback welcome! >> >> - Davey >> >> [1] >> https://github.com/php/php-src/compare/master...dshafik:curl-http2-push#= diff-ab7a9164033bd55887d45d0a6cb837eeR529 >> [2] >> https://github.com/php/php-src/compare/master...dshafik:curl-http2-push#= diff-ab7a9164033bd55887d45d0a6cb837eeR451 >> > > I have made some further changes to this patch (tidied it up a bit, and refactored out the duplicate code) and RFC (no longer passing in the number of headers, this was a holdover from the C API and unnecessary in PHP, just use count() on the header array). If you tried out the Docker container, a simple rebuild (perhaps with --no-cache) will fetch the latest patch and rebuild. The memory leaks are still there, and I'm not much closer to plugging them =E2=80=94 again, any help would be appreciated. Thanks, --001a1147fa526d066e0525243fc9--