Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96161 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95337 invoked from network); 26 Sep 2016 21:52:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Sep 2016 21:52:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=me@daveyshafik.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=me@daveyshafik.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain daveyshafik.com from 209.85.161.174 cause and error) X-PHP-List-Original-Sender: me@daveyshafik.com X-Host-Fingerprint: 209.85.161.174 mail-yw0-f174.google.com Received: from [209.85.161.174] ([209.85.161.174:34474] helo=mail-yw0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5E/E3-04248-5B899E75 for ; Mon, 26 Sep 2016 17:52:55 -0400 Received: by mail-yw0-f174.google.com with SMTP id g192so167046125ywh.1 for ; Mon, 26 Sep 2016 14:52:53 -0700 (PDT) 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:from:date:message-id :subject:to:cc; bh=zanGLK2D+e86L4CJB7h9mNscm1yb16eQ+BY8V/JKbtY=; b=Aq5ROYvY33TiVLezIxw5TJyPq2fvUN7j84ViMDks4CPLpCQfbJ3NyO44kH9hWhRIw3 hjPtfy3Hu4Fkt0nn/qwe4Haq6DN9CgAsFILGz6SphEsBXFwvhChCK2ZRjXrOInu8U4yn 7oOk7wcqNgjBhbkFLNq+5kEG3Drn/Mpwrh/vtj/NiNqedy3XmylCADQaT2UZ9ttjI4rB gwBogqjHgTZXS+g+JvQUfvNrhoCMexuBpu3tXIf5ULXE58KTgYcLCRDoJFSU6E12o7ih ST2sQjZNKReRi1a47HZR2UYLfseFhaRl8UoJlyl7UAU1IV10cUANCZmQ+D8gM/DwGwBs SWwQ== 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:from :date:message-id:subject:to:cc; bh=zanGLK2D+e86L4CJB7h9mNscm1yb16eQ+BY8V/JKbtY=; b=W04NspccmOKr86yoS4TjUg68pC+Hr31psRg0qGe9mkKQmeLbKZnVoRuUx0XO/Z0XXP Fr9oOf9ZkTCkNMClzVFy7Inm809eZ2DpC72+MK6aWzjaP1XNg8QBCAfOxDLfqKKb9Mh3 ojWXKeOeEczQpg7hic/AVszkdXbDLx17/RrENAj0galyqR23zsny6fDRpV1N8XoJsVIS lEqjkE5iteox/zqpEDXc+o1RlQRcxxT/hL3iVCZhJhtYJWLHqGqy4MjcBvOwUizPm1kx 7xCuL5yi10KkO+nnE4cwmcEdhjWi1ehtRdeeAlEuw7FvihHxGr1Eh7TIv8E7VwMbu2QJ IL1A== X-Gm-Message-State: AE9vXwNHtAR1wxR6kQelF2R3B0mZ++9Lhlj+pZUEBWXCKL4gUC2uqpVrT/8Nt5yi7NCeuaObi9Kkie8uNGx2SWNq X-Received: by 10.13.208.133 with SMTP id s127mr19253505ywd.250.1474926771111; Mon, 26 Sep 2016 14:52:51 -0700 (PDT) MIME-Version: 1.0 Sender: me@daveyshafik.com Received: by 10.129.179.10 with HTTP; Mon, 26 Sep 2016 14:52:50 -0700 (PDT) In-Reply-To: <1e5a2abd-0044-5d57-d4b2-ddbbd3577639@gmail.com> References: <1e5a2abd-0044-5d57-d4b2-ddbbd3577639@gmail.com> Date: Mon, 26 Sep 2016 14:52:50 -0700 X-Google-Sender-Auth: UvND_oyReby5TyQE3dUjn0CiDsI Message-ID: To: Rowan Collins Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a114e5e9a433bda053d70260a Subject: Re: [PHP-DEV] Server-Side Request/Response Objects From: davey@php.net (Davey Shafik) --001a114e5e9a433bda053d70260a Content-Type: text/plain; charset=UTF-8 On Mon, Sep 26, 2016 at 2:32 PM, Rowan Collins wrote: > On 26/09/2016 20:37, Paul Jones wrote: > >> tl;dr: Gauging interest in an extension for server-side PHP request and >> response objects (*not* HTTP messages per se; see below) prior to writing >> an RFC for them on the wiki. >> > > This sounds like an interesting project, but I have a few questions. > > First, the obvious one: why does this need to be an extension and/or built > into core? Are there reasons such as performance for implementing this in C > rather than PHP? Does it provide functionality that is hard to implement in > a userland library? > > You mention that it is not just an HTTP wrapper, but although you mention > researching other frameworks, I can't see any reference to PSR-7 [ > http://www.php-fig.org/psr/psr-7/]. What do you see as the relationship > between your proposal and that standardisation effort? > > Regarding the design of the objects themselves, why is stdRequest > property-only, but stdResponse method-only? The asymmetry feels awkward to > me. > > I think the most interesting parts are those that attempt to rationalise > $_SERVER, and I think a library (or built-in functionality) devoted to > those could be very useful. Some of that overlaps with PSR-7, but that > standard doesn't go into depth on things like Accept headers, > Authentication, etc. > > Like I say, it's an interesting idea, but I'm not sure how it fits in with > the wider ecosystem. Additionally to this, we need to start thinking about what it means to move away from simple request/response architectures. In the age of WebSockets and HTTP/2 multiplexing w/Server Push, the likelihood of multiple responses for one request, or even responses with no associated request, are possible. I'd rather look at this as the target for this kind of exploration and implementation. - Davey --001a114e5e9a433bda053d70260a--