Permalink
Browse files

[FrameworkBundle] fixed ESI calls

  • Loading branch information...
1 parent 369e4a6 commit b8e5689363a5429ed75f8e166df1324ee5c42ecc @fabpot fabpot committed Dec 20, 2012
Showing with 10 additions and 2 deletions.
  1. +10 −2 src/Symfony/Bundle/FrameworkBundle/HttpKernel.php
View
12 src/Symfony/Bundle/FrameworkBundle/HttpKernel.php
@@ -113,11 +113,19 @@ public function render($controller, array $options = array())
}
if ($this->esiSupport && $options['standalone']) {
- $uri = $this->generateInternalUri($controller, $options['attributes'], $options['query']);
+ if (0 === strpos($controller, 'http://') || 0 === strpos($controller, 'https://')) {
+ $uri = $controller;
+ } else {
+ $uri = $this->generateInternalUri($controller, $options['attributes'], $options['query']);
+ }
$alt = '';
if ($options['alt']) {
- $alt = $this->generateInternalUri($options['alt'][0], isset($options['alt'][1]) ? $options['alt'][1] : array(), isset($options['alt'][2]) ? $options['alt'][2] : array());
+ if (is_string($options['alt']) && (0 === strpos($controller, 'http://') || 0 === strpos($controller, 'https://'))) {
+ $alt = $options['alt'];
+ } else {
+ $alt = $this->generateInternalUri($options['alt'][0], isset($options['alt'][1]) ? $options['alt'][1] : array(), isset($options['alt'][2]) ? $options['alt'][2] : array());
+ }
}
return $this->container->get('esi')->renderIncludeTag($uri, $alt, $options['ignore_errors'], $options['comment']);

0 comments on commit b8e5689

Please sign in to comment.