Giter Site home page Giter Site logo

Comments (6)

juber-nunes avatar juber-nunes commented on April 27, 2024

I know this has been tagged as a question but perhaps it should be dealt as a bug.

I was trying a very simplified version, if that worked I would know it was something else in my code so here's my setup

image

compression v1.7.4
express v4.17.3
node v16.14.0

Here's the before and after results, no matter what I'm still getting the same 5.24mb in my response.

image

from compression.

dougwilson avatar dougwilson commented on April 27, 2024

Hi @juber-ivre sorry you are having trouble. Though you did not provide the testdata value for your app, I made up a 5mb randome value for testing. Unfortunately I am unable to reproduce your issue and am getting a compressed response from your example app.

You are always welcome to submit a pupl request with a fix, though, as it sounds like you are saying you have identified this as a bug in this module. If you're unsure of how to make the fix, please outline where you have located the bug and/or provide a complete, reproducable example so we can try and come up with a fix for your issue.

from compression.

juber-nunes avatar juber-nunes commented on April 27, 2024

Thanks for your response @dougwilson. Do you think that may be a relation with versions I'm using? Perhaps you could suggest versions you have on your local? I've tried JSON and Text but both the same. I'm hitting the middleware for sure but I'd need to dig further to see why is not compressing.I'll be back with some more info.

from compression.

dougwilson avatar dougwilson commented on April 27, 2024

I just used the exact versions you listed, including even the Node.js version.

from compression.

juber-nunes avatar juber-nunes commented on April 27, 2024

Went to another round of tests, trying a even simpler scenario but still unable to see the compression on Postman. I can see I'm hitting "shouldCompress" at all times but not getting the expected ending result.

image

image

from compression.

juber-nunes avatar juber-nunes commented on April 27, 2024

Got to the bottom of it. Compression is working accordingly but Postman seems to have an open issue with regards compressed size, as per reference below.

On Browser you can see compressed size as well the source size.

image

postmanlabs/postman-app-support#7596

from compression.

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.