Code Monkey home page Code Monkey logo

Comments (3)

brikis98 avatar brikis98 commented on May 9, 2024

How are you looking at the HTML code? If it's through a browser, I would think the browser is decompressing it for you.

from ping-play.

mantsak avatar mantsak commented on May 9, 2024

I just created a new branch in my fork with the extension of both HTMLCompressorFilter and gzipFilter

https://github.com/mantsak/ping-play/tree/withcompressors

I was using curl with following line:

curl -v -H "Accept-Encoding: gzip,deflate" http://localhost:9000/withoutBigPipe

Interestingly, withoutBigPipe does work 100% correct, the HTML code gets somewhat compressed and then it's getting gzipped. The order of the filters is important of course. gzipFilter is the first one and done last.

withBigPipe does neither. I found in @mohiva 's code that chunked encoding is not compressed by default,

The same in @playframework code. GzipFilter.scale has a comment in there:

* It will only gzip non chunked responses. Chunked responses are often comet responses, gzipping will interfere in
* that case. If you want to gzip a chunked response, you can apply the gzip enumeratee manually to the enumerator.

This is no bug at all on your side. If, then only a feature request. But not important at all. I think the priority here is to be able to save waiting time for the user and not saving bandwith.

from ping-play.

brikis98 avatar brikis98 commented on May 9, 2024

Ah, gotcha, thanks for following up. I didn't realize the GzipFilter skipped chunked responses. It seems like a reasonable feature request and I'd be happy to merge in a PR that does it :)

from ping-play.

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.