On 2/18/11 3:13 AM, Jay wrote:
> For every esi request in our application while its in dev/debug mode,
> the toolbar will render under that esi request. So if our page has 4
> esi tags, we'll get 5 toolbars. This obviously messes up the rendering
> of our website a bit on our dev platform.
> 
> Tried to fix this myself by setting headers or checking the request
> type to see if it was a master request, but it appears even those esi
> requests are master requests.
> 
> Fabien, how can we modify this if statement to not render the toolbar?
> 
>          if (!$response->headers->has('X-Debug-Token')
>              || '3' === substr($response->getStatusCode(), 0, 1)
>              || ($response->headers->has('Content-Type')&&  false ===
> strpos($response->headers->get('Content-Type'), 'html'))
>              || 'html' !== $request->getRequestFormat()
>              || $request->isXmlHttpRequest()
>          ) {
>              return $response;
>          }

Your problems should now be solved with the following two commits:

*
https://github.com/fabpot/symfony/commit/dff35851626f62509adff86c85382bfe5cc4979a:
This fixes the warning problem when the profiler is used in the dev
environment and when ESIs are activated.

*
https://github.com/fabpot/symfony/commit/0834bf47dcc7094538a6c958fd62a15049712be0:
The WDT is now only injected on well-formed HTML (with a proper </body>
tag). This means that the WDT is never included in sub-requests or ESI
requests.

Fabien

-- 
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