On 08.04.2011 13:55, Christophe COEVOET wrote:
> Le 07/04/2011 20:20, MMac a écrit :
>> This is just a guess, but from what I can tell all (or most) of the
>> changes required would be in the Esi class file in the HttpCache
>> component correct? Stof do you have any idea how much work would be
>> required to make esi support json responses?
> The cache does not have to support processing JSON. The process
> described in a previous message was wong as it said that the tag would
> be encoded in JSON which is wrong.
> You cannot use json_encode to create your content (the response would
> contain invalid JSON because of the ESI tag). And then putting the
> content have to make the response valid by just replacing the tag.
> 
> So allowing to parse JSON is just changing the configuration of the ESI
> (which is not possible at the moment) to make it parse ESI and then it
> is your work to ensure that the output will be valid.

Yeah generating and parsing ESI tags in JSON is gonna be pretty
difficult, and I'm not sure Varnish will do it at all.

I think your best option would be to generate a valid XML/HTML response
that contains ESI tags that will them render json content. Then you get
that XML and extract/parse the json bits in your JS code.

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