Comments (9)
I merged the wrong PR haha. You had two, #110 and #120, I merged #110 not #120. I reverted #110 and merged #120 and released to npm.
from compress.
I added a comment to #110 - once PR is updated or a new one made, I will merge and release as major semver bump.
from compress.
Will do.
from compress.
Done.
from compress.
Merged. Once @jonathanong gives me npm access, I will publish v5.0.0 to npm and GitHub releases.
from compress.
@uhop I just tested locally and I seem to have a failing test:
> [email protected] test /Users/test/Projects/compress
> jest
PASS __tests__/encodings.js
PASS __tests__/middleware.js
FAIL __tests__/index.js
● Compress › should not compress if no accept-encoding is sent
assert(received)
Expected value to be equal to:
true
Received:
false
263 | if (err) { return done(err) }
264 |
> 265 | assert(!res.headers['content-encoding'])
| ^
266 | assert(!res.headers['transfer-encoding'])
267 | assert.equal(res.headers['content-length'], '1024')
268 | assert.equal(res.headers.vary, 'Accept-Encoding')
at Test.<anonymous> (__tests__/index.js:265:9)
at Test.assert (node_modules/supertest/lib/test.js:181:6)
at localAssert (node_modules/supertest/lib/test.js:131:12)
at node_modules/supertest/lib/test.js:128:5
at Test.Request.callback (node_modules/superagent/lib/node/index.js:716:12)
at Stream.<anonymous> (node_modules/superagent/lib/node/index.js:916:18)
at Unzip.<anonymous> (node_modules/superagent/lib/node/unzip.js:55:12)
from compress.
The unset
seems to not be working, hmm.
from compress.
v5.0.0 published to npm and GitHub
https://github.com/koajs/compress/releases/tag/v5.0.0
from compress.
Strange — I modified the test to not use unset()
… Are you sure you tested the right thing?
from compress.
Related Issues (20)
- remove jest --forceExit
- tests: remove callbacks HOT 1
- Brotli used, even if not in Accept-Encoding header (v4.0.0) HOT 4
- Not using the correct encoding HOT 2
- Can this be used without koa? HOT 1
- koa-compress not compressing response body. HOT 1
- 4.x seems to be significantly slower (not related to brotli!) HOT 4
- Expand documentation HOT 12
- Brotli Defaults HOT 13
- "flush" as it is used in tests HOT 1
- Default Brotli compression level is too slow HOT 16
- Q: `options.defaultEncoding` default `idenity`, typo? HOT 1
- Error [ERR_HTTP2_HEADERS_SENT]: Cannot set headers after they are sent to the client HOT 1
- Content-Length Not Set HOT 2
- 5.1 did not set brotli default quality to 4 correctly HOT 1
- An in-range update of eslint-plugin-flowtype is breaking the build 🚨 HOT 7
- An in-range update of supertest is breaking the build 🚨 HOT 4
- Check that response hasn't been sent already HOT 2
- consider adding `response.originalLength` property HOT 2
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 compress.