Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81417 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17901 invoked from network); 30 Jan 2015 10:21:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jan 2015 10:21:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.171 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 74.125.82.171 mail-we0-f171.google.com Received: from [74.125.82.171] ([74.125.82.171:51944] helo=mail-we0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/54-31101-A2B5BC45 for ; Fri, 30 Jan 2015 05:21:31 -0500 Received: by mail-we0-f171.google.com with SMTP id k11so23872103wes.2 for ; Fri, 30 Jan 2015 02:21:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=kzAyNXH0aoQUzf125jF02thXmuzCSzCaspNZfoC65rE=; b=C0AtP48cQVxeSaCtjMhfn/xTWEKdQ4kkZRSZ/fBVAsXn9vnrD7ItYyldGIdj3tK5D7 lnTyR2m3hEXWZKWActeR5+rdWkkaOUvWUJlPCN7oK3+lINAz6GsL6IR3p0eXZOK8pMF/ YVn23vqLcCxEevQYAtKKm68U2lNqj9Xn+Vxmolz3eKm5/qwM2U1VHigSe9S7Tpu6DlQL N60Ki+FwOghf2+19j96GpcRgC2Ygwdm6kDi9UU9FNIcq7ZLUFz2p1nTvA4YI0/65TAg1 DdlWEW1HDAmhSMikbolecrnoIyKoWuoPlNojus8JzP8RquYuEC7Z/shK6jxwoTbbgSnp 3JLw== X-Received: by 10.180.189.67 with SMTP id gg3mr3336061wic.4.1422613287691; Fri, 30 Jan 2015 02:21:27 -0800 (PST) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.194.170.193 with HTTP; Fri, 30 Jan 2015 02:20:47 -0800 (PST) In-Reply-To: <54C8D36E.7010803@php.net> References: <54C8D36E.7010803@php.net> Date: Fri, 30 Jan 2015 11:20:47 +0100 X-Google-Sender-Auth: Jl5J7Ob08nS9hjCPYr2t6dkhIrc Message-ID: To: Michael Wallner Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a11c342baaa6d38050ddbf744 Subject: Re: [PHP-DEV] [RFC] [VOTE] pecl_http From: jpauli@php.net (Julien Pauli) --001a11c342baaa6d38050ddbf744 Content-Type: text/plain; charset=UTF-8 On Wed, Jan 28, 2015 at 1:17 PM, Michael Wallner wrote: > Hi, > > Discussion has been very low on this topic since it was proposed on > August 19th, so I just opened the vote on the RFC whether to add > pecl_http to the core. The vote will be open until about 12:00 UTC on > Friday, February 6th. > > https://wiki.php.net/rfc/pecl_http#vote > > Great debate in here. I did read all the answers and I agree with many. My opinions summed-up : - PHP is a web language, and if there is one thing that must be done right, it's to provide a rich-efficient-easy-to-extend HTTP API to our users, which with our actual stream wrappers, is not really the case. - Why not use Curl ? I fully agree with Stas message here : Curl is the open-source defacto library you bind against when you want to manage HTTP messages (and many other layer-7 formats). Many many opensource projects already binds it. Curl is rich, stable, opensource; cross platform, efficient and supported by many companies. To answer Andrea : our HTTP stream wrapper layer used to be able to use curl wrappers, we dropped such a support in 5.6 AFAIR, because it was beeing experimental for years, and nobody maintained this. * In addition to that : Curl is actively working on the next HTTP2 standard. If we, PHP, were using it, we would immediately be compatible with HTTP2 when it is released, without much effort. - pecl_http is rich. I'm not saying I'd have vote +1 to it, but from the very first start I used PHP, about 10y ago, I've always wondered why pecl_http wasn't a core de-facto extension. Just try to play with HTTP negociation or HTTP partial messages with vanilla PHP (without pecl_http) and you'll see what PITA it is. Look at Java interfaces (example : https://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/http/package-summary.html), they are not perfect, but they are clean, clear, OOP designed APIS. PHP current HTTP API just makes me scared. - And finally, probably the most important thing => I'm all +1 with Andrea , saying that we have way too many places into PHP source code where HTTP has been yet-once-again reimplemented. This is WRONG from a software development POV. Easy as this. Have a look at ext/SAOP, at php-fpm, at PHP streams .... So many duplicated code about handling HTTP. We suffer from that (bug fixed in one place but not the other one). We absolutely need to design a low level HTTP API at one unique place (ext/standard?) and reuse it everywhere as well as provide userland access to it, like we've done for so many dfferent things so far, but HTTP .... Julien.Pauli --001a11c342baaa6d38050ddbf744--