Comments (6)
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
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.
from compression.
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.
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.
I just used the exact versions you listed, including even the Node.js version.
from compression.
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.
from compression.
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.
postmanlabs/postman-app-support#7596
from compression.
Related Issues (20)
- Setting Vary header although caching is disabled HOT 1
- "drain" event listener leak when using res.once("drain"); can't use res.removeListener("drain") HOT 3
- compresssion doesn't work ,the vue.txt is 2m HOT 2
- Content-Type: application/json; charset=utf-8 No effect HOT 2
- Question: Why this middleware HOT 2
- Corrupted compressed .js-files for Mac OS / Safari -clients HOT 11
- Is compression working when node server is running on a container? HOT 2
- middleware fails when the request has more than 1 values for accept-encoding header HOT 2
- Is compression result cached? HOT 1
- change Transfer-encoding HOT 1
- Why does the data size increase after compression HOT 1
- Force size to be a minimum... HOT 2
- Chunked encoding is broken after using this middleware HOT 1
- Using a current debug version HOT 1
- Deflate backwards HOT 7
- Compression instrumentation (before/after compression hooks) HOT 2
- Angular Not Compressing? HOT 2
- Crash when compressing characters like ū HOT 1
- Express returns a non-compliant HTTP/206 response when gzip is enabled HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compression.