Open patrikden opened 6 years ago
I have the same issue. When I include esi tag, middleware parses it, but the answer for esi is the index page. If index page has esi tag initially, than I get infinite loop of rendering the same page again and again. I tried to debug, and I found out that Symfony's HttpCache creates a subrequest with the right url (from esi tag), but the answer for this subrequest is index page. But if I try to open this esi-url in new tab I get the right answer.
I can confirm this issue. A simple test, like
Route::get('esi-get', function () {
return 'esi content';
});
Route::group(['middleware' => ['httpcache', 'ttl:300']], function () {
Route::get('esi-test', function () {
return '<div><esi:include src="http://localhost.laravel/esi-get" /></div>';
});
});
Generates a cached page in storage/httpcache
:
<div><?php echo $this->surrogate->handle($this, 'http://localhost.laravel/esi-get', '', false) ?></div>
Which Outputs:
<div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div>...
In perpetuity until it runs out of memory when visited.
Same error here, the sub request is dispatched through the middlewares but the route remains the same of the main request.
Hello @barryvdh,
I have same error. ESI include has been create an infinite loop that throw an allowed memory time error or max execution time exceeded.
Can you check it or help me please?
Thanks a lot!
Version 0.3.0 installed on laravel 5.4.
I try get ESI functionality. I have index page with included:
And route to partial:
route('get-esi') conatain only
and nothing else. When I'm open it in new window - thats work fine, only
Hi! TEST
on the page.But when i Try include it like ESI I try get ESI functionality. I have index page with included:
it load index page instead of route('get-esi').
What do I wrong? Please help