Git Product home page Git Product logo

Comments (6)

andrewdavey avatar andrewdavey commented on September 26, 2024

Thanks for reporting the problem. That sounds like the GZip encoding is going wrong somewhere. I'll have to look into it.

from cassette.

andrewdavey avatar andrewdavey commented on September 26, 2024

I think this is the same problem http://stackoverflow.com/questions/4313162/urlcompression-response-filter-conflict

The page HTML, which Cassette does some rewriting to, is getting compressed before the Cassette response filter runs. Options:

  1. Set dynamicCompressionBeforeCache="false". Not ideal, since I assume you have good reason for using that :)
  2. Cassette could detect pre-compressed page and not attempt to rewrite. You'd lose the ability of referencing asset modules in partial views which are actually rendered further up the page.
  3. Cassette could decompress the page HTML before rewriting. This may be tricky, given the response filter only gets chunks of output to process at a time. Research required...

from cassette.

andrewdavey avatar andrewdavey commented on September 26, 2024

Latest code in master should fix this. It performs response.Flush() in PostRequestHandlerExecute. This means the page rewriting filter is called before the page output is compressed for the output cache.

Can you please test and let me know if it's working for you now?
Thanks.

from cassette.

andrewdavey avatar andrewdavey commented on September 26, 2024

I had to remove the Flush call. It breaks too many other things in ASP.NET.

For now there are two options.

  1. Set dynamicCompressionBeforeCache="false"
  2. In the Cassette configuration class, set application.HtmlRewritingEnabled = false; This means that asset Reference calls in a page must occur before the call to Render. Only partial views that want to put references into the <head> are affected by this, since they are executed after the head has been rendered.

from cassette.

tommck avatar tommck commented on September 26, 2024

Unfortunately, I had to leave off implementing Cassette for now (stability
of code base). I will be reattempting soon and then will be able to try and
help figure things out.

Thanks for the work,

Tom

On Tue, Sep 13, 2011 at 6:27 AM, Andrew Davey <
[email protected]>wrote:

I had to remove the Flush call. It breaks too many other things in ASP.NET
.

For now there are two options.

  1. Set dynamicCompressionBeforeCache="false"
  2. In the Cassette configuration class, set
    application.HtmlRewritingEnabled = false; This means that asset
    Reference calls in a page must occur before the call to Render. Only
    partial views that want to put references into the <head> are affected by
    this, since they are executed after the head has been rendered.

Reply to this email directly or view it on GitHub:
#33 (comment)

from cassette.

andrewdavey avatar andrewdavey commented on September 26, 2024

Yes, the code has been pretty changeable while under development - the perils of release early, release often!

I'm hoping to get everything settled and ready for 1.0 soon. So please keep an eye on the project. When you do give it another go, give me a shout if you run into any issues.

from cassette.

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.