Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78537 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45270 invoked from network); 31 Oct 2014 20:51:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Oct 2014 20:51:42 -0000 Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.46 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 74.125.82.46 mail-wg0-f46.google.com Received: from [74.125.82.46] ([74.125.82.46:43694] helo=mail-wg0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 35/BC-15608-D56F3545 for ; Fri, 31 Oct 2014 15:51:42 -0500 Received: by mail-wg0-f46.google.com with SMTP id x13so7381899wgg.33 for ; Fri, 31 Oct 2014 13:51:39 -0700 (PDT) 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=K2JLQTLT4DpaFCEyhNpH8UAGgkKAHoRJ63ADNPEl16E=; b=H5JQE0Ul+RRM/RT4BSQD5vQgH3d8kYsZJ+KxDWF+E6vmC+seKsZKCdy2BEdCjvW157 bz4IiKwLdlzR+iylGcYCJp6EDDl+8PrGvBNA9NhFJC7Z4ZmIHUCvXb/A867MceeQYdYL SxrkTunq0i7hZqEXA/Xp3htrBKzEK2dgbvdCHkvGuwzXbFK6H99+xApi/EBoCfJQ6ioH Z8W8sN2Ff1Oy1oio/c7kWzs/ULeNqJyGXL9DTeblSzlTjRdEwHHlexBzinwfLdQM0IQR yr1vC0IDe2nKGT0KMiClchTQKJ9Myh5H25rnuLC013iSY2eKTGwY5YkzvszmvLzmtc1b y/tg== MIME-Version: 1.0 X-Received: by 10.194.92.82 with SMTP id ck18mr30371028wjb.103.1414788699051; Fri, 31 Oct 2014 13:51:39 -0700 (PDT) Received: by 10.216.123.4 with HTTP; Fri, 31 Oct 2014 13:51:38 -0700 (PDT) In-Reply-To: References: <5452B87B.5040009@garfieldtech.com> <0B797CE3-7AFA-4330-9A98-D3CAFC6D6072@ajf.me> <5453B114.6050400@gmail.com> <5453C250.8090803@gmail.com> <5453D6D5.2070705@garfieldtech.com> <5453E492.6020304@gmail.com> Date: Fri, 31 Oct 2014 16:51:38 -0400 Message-ID: To: Will Fitch Cc: Rowan Collins , PHP Internals Content-Type: multipart/alternative; boundary=047d7bd9201ad6df6b0506be292d Subject: Re: [PHP-DEV] New Standardized HTTP Interface From: theanomaly.is@gmail.com (Sherif Ramadan) --047d7bd9201ad6df6b0506be292d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, Oct 31, 2014 at 4:29 PM, Will Fitch wrote: > > On Oct 31, 2014, at 4:21 PM, Sherif Ramadan > wrote: > > > > On Fri, Oct 31, 2014 at 4:16 PM, Will Fitch wrote: > >> >> >> >> While not too specific to Rowan, reiterating the pecl/http approach is >> indirectly what your asking for? I have mentioned this numerous times, b= ut >> you haven=E2=80=99t responded with a reason not to take this approach - = which is an >> RFC that was presented for discussion prior to yours. > > > I'm trying to understand how pecl/http solves the aforementioned problem > any better? Again, I have no problem with competing ideas and it's not as > though one is prohibited from presenting an idea for the mere fact that > there exists a competing one. I'm just not seeing how pecl/http solves th= e > problem I intend to solve better. The reason I haven't responded to you y= et > is because I'm stilling weighing the two to try and make sense of whether > or not these are in fact competing ideas or complimenting ones. > > Please, feel free to weigh in with anything that contradicts or concludes > what I'm saying. I certainly don't expect to have all of the answers. > > > What doesn=E2=80=99t pecl/http solve under your situation? The fact that= =E2=80=99s it=E2=80=99s > not directly integrated as part of ZE and handling process? > Well, you're the one suggesting an alternative. The onus is on you to prove that it solves the same problem, not me. However, I'll bite for the purposes of moving the discussion along... As far as I understand, pecl/http attempts to solve a much larger scope of problems than this RFC. Namely, dealing with HTTP messages in general, whether they are a part of PHP's request/response model or not. i.e. there is no direct integration of the PHP request into pecl/http and as such it doesn't directly solve a problem such as properly parsing the HTTP request body during a PUT request and properly populating the $_FILES/$_POST superglobals. It also doesn't solve similar problems where a transport message body is sent entirely in JSON to PHP and PHP is responsible for handling. Of course, yes, you can do accomplish this today with some hacks like using the php://input stream, but it's only up until recently that this stream has become reusable. It's also potentially creating some duplication, but albeit this isn't the only problem. This RFC also attempts to make it possible for users to directly apply filters to input from the HTTP request so that they can simply retrieve the fitlered data from the HttpRequest object directly without having to do things like $foo =3D isset($_POST['foo']) ? filter_var($_POST['foo'], FILTER_VAR_INT) : 0; // for example I have nothing against pecl/http. I think it's a very useful library and Mike seems to have put a great deal of work into it. I would gladly vote it into PHP core. I'm just not clear on how it solves the same problems this RFC attempts to solve. They can actually compliment each other in some areas; I can see that. > > I certainly have no problem with competing ideas either. However, the onl= y > proposed patch in this RFC is a gist with PHP pseudocode. > > > > It's not pseudocode since it's actually perfectly valid PHP code that will compile and run in the PHP interpreter. However, it is intended to demonstrate the behavior. The pecl/http RFC is also further along as it's in discussion phase with an actual implementation. This RFC is merely a draft, with no actual implementation proposed yet (but that's not at all uncommon as many RFCs proposed in PHP did not provide an actual implementation until after they were voted in: generators, list in foreach, and finally are among a small number that come to mind). So let's not get hung up on implementation being the barrier to entry for an RFC as that's never ever been the case in the past. It is, however, entirely understandable that the RFC should explain the actual behavior and consequences as well as possible if it does not provide an actual implementation. This is just a very early stage discussion to gather ideas so that I can improve and finalize the RFC. I have not actually placed the RFC into discussion or voting phase just yet. So let's not put the cart before the horse. --047d7bd9201ad6df6b0506be292d--