On 29.11.2010 15:53, Nicolas A. Bérard-Nault wrote:
> My proposition is simple: the Request class should lay its bases closer
> to the HTTP RFC rather than using PHP's superglobals.

> Now, I fear this is not trivial to implement and will need a lot of
> discussions and love, which I'm ready to give in profuse amount. Since
> I'm not that well acquainted with the framework, I'll need your advice
> and I hence thank you in advance for your time.

You make very good points imo. I'll definitely try to help out if you
have questions.

Just a few ideas after thinking about it 30seconds on how this could be
implemented:

I'd say the Content-Type header should be looked at, and if nothing
useful can be determined out of it, just assume it's
application/x-www-form-urlencoded, and use parse_url() or $_POST straight.

If it is known type (application/json, text/xml, ..?) then it could be
loaded properly and handled in various ways. I guess for json,
$this->request should be json_decode($body), for xml maybe a DOMDocument
with the body loaded in it. And for urlencoded the actual ParameterBag
will do.

Then you probably want to allow registering custom handlers much like we
did on the View layer proposal [1], but I think xml and json should get
most people pretty far.

[1] https://github.com/fabpot/symfony/pull/200

Cheers

-- 
Jordi Boggiano
@seldaek :: http://seld.be/

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to