Giter Club home page Giter Club logo

Comments (4)

vadson777 avatar vadson777 commented on May 20, 2024

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.

from laravel-httpcache.

dresb avatar dresb commented on May 20, 2024

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.

from laravel-httpcache.

carlosvini avatar carlosvini commented on May 20, 2024

Same error here, the sub request is dispatched through the middlewares but the route remains the same of the main request.

from laravel-httpcache.

josearagon avatar josearagon commented on May 20, 2024

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!

from laravel-httpcache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.