Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81336 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46713 invoked from network); 28 Jan 2015 20:38:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jan 2015 20:38:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.199 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.199 imap11-2.ox.privateemail.com Received: from [192.64.116.199] ([192.64.116.199:54182] helo=imap11-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BE/10-44076-6C849C45 for ; Wed, 28 Jan 2015 15:38:30 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id B4B068800E7; Wed, 28 Jan 2015 15:38:27 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap11.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap11.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id dM41nfZzOtIw; Wed, 28 Jan 2015 15:38:27 -0500 (EST) Received: from oa-res-26-240.wireless.abdn.ac.uk (oa-res-26-240.wireless.abdn.ac.uk [137.50.26.240]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id B07608800D5; Wed, 28 Jan 2015 15:38:25 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: <54C946D9.1030004@gmail.com> Date: Wed, 28 Jan 2015 20:38:23 +0000 Cc: Michael Wallner , Levi Morrison , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <54C8D36E.7010803@php.net> <584E167F-CD06-4ACB-A33A-92DD178BCFD8@ajf.me> <54C934C1.6080601@php.net> <32FA0837-DCDD-4157-AD1A-3A9DE91B5FFB@ajf.me> <54C946D9.1030004@gmail.com> To: Stanislav Malyshev X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] [RFC] [VOTE] pecl_http From: ajf@ajf.me (Andrea Faulds) Hi Stas, > On 28 Jan 2015, at 20:30, Stanislav Malyshev = wrote: >=20 > Hi! >=20 >> Personally, I=E2=80=99ve never liked that PHP requires cURL for doing = HTTP >> requests. It=E2=80=99s a language made for the web, it should have = built-in >=20 > I see no problem in depending on cURL. NIH'ing every part of the > software universe in unfeasible, and if somebody does this one job and > does it well - why not use it? We don't have enough resources here to > implement every detail of the huge protocol like HTTP, and that's the > whole point of opensource to reuse and combine projects. I suppose cURL isn=E2=80=99t so bad=E2=80=A6 really, the API is the = biggest issue with that. HTTP requests in PHP feel like a second-class = citizen and must be done through an awkward set of PHP bindings to a C = library. That=E2=80=99s awful for a language made for the web. I=E2=80=99d be okay with cURL were it not for the API, I guess. = Actually, if we=E2=80=99re to keep HTTP stream wrappers and keep using = cURL, then the HTTP stream wrapper should probably also use cURL, right? >> HTTP, and it should share code between its server-side HTTP and >> client-side HTTP stuff. I don=E2=80=99t think that the HTTP stream = wrappers >> are a =E2=80=9Chack=E2=80=9D - they=E2=80=99re what PHP should have = had all along. I think we >=20 > HTTP stream wrappers work for some cases, but not for all and for = cases > where you need deep involvement with details of HTTP - like headers, > byteranges, content encodings, etc. - they might not be the best API = to > deal with it. This is true. The main thing I like about HTTP stream wrappers is that = they=E2=80=99re part of core PHP rather than some external library. = Also, they support headers, have done for ages.=20 Thanks. -- Andrea Faulds http://ajf.me/