Re: New Standardized HTTP Interface
| From: | Andrea Faulds | Date: | Fri, 31 Oct 2014 16:19:21 +0000 |
| Subject: | Re: New Standardized HTTP Interface | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-78515@lists.php.net to get a copy of this message | ||
> On 30 Oct 2014, at 18:23, Sherif Ramadan <theanomaly.is@gmail.com> wrote:
>
> I've started a draft RFC, but please be patient as this is a working in
> progress, here https://wiki.php.net/rfc/http-interface on the
> wiki.
>
> The point here is to allow users to implement their own HttpRequest and
> HttpResponse classes that can deal directly with the raw request/response
> messages in any way the user deems fit. This alleviates cases like "what
> about when I want to have $_PUT or $_DELETE" and removes the ambiguity of
> the $_POST, $_GET superglobals to a more conforming way of handling the
> messages.
OK, I’ve gone and re-read the RFC and I finally understand this proposal, sorry for my previous
misunderstanding. You’re proposing a mechanism to plug in your own parser for the HTTP message
headers and body, right?
I’m not sure I really see what it solves, though? Why should we allow users to implement their own
slow parsers in userland? Why can’t we just have a single built-in parser like we’ve had the
last two decades? I don’t see the point.
--
Andrea Faulds
http://ajf.me/