-
-
Notifications
You must be signed in to change notification settings - Fork 986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: Error with express and compression module with version >= 1.6.0 #72
Comments
Hm. I'mm check it out. In the meantime, especially if I can't seem to figure it out, can you post a tiny app that produces the error? |
Here's a tiny app that I think demonstrates the issue var express = require('express')
var app = express()
var session = require('express-session');
var compression = require('compression');
app.use(session({secret: 'keyboard cat'}));
app.use(compression());
app.get('/', function (req, res, next) {
res.setHeader('Content-Type', 'text/plain')
res.write('hello, world\n');
res.end();
});
app.listen(3000); then do curl localhost:3000 -v -H 'Accept-Encoding: gzip'
|
Interesting. @joewagner you are the man :) I didn't have time to look yet, so I think it's far to say that is what caused the issue for @dmmalam 1.6.0 did change the |
Reordering has seemed to fix the issue for now. Thanks @joewagner Dharmesh Malam On Mon, Aug 4, 2014 at 11:00 PM, Douglas Christopher Wilson <
|
Great for the confirmation. We'll leave this open, though, because I think it's definitely a bug, in one library or the other, so this will remind me. |
@dougwilson I looked at this a bit more, and looks like the fix for issue expressjs/compression#61 introduced this issue. |
haha. Yep. I have looked into it a little bit and I think I'm leaning towards both things need fixing and I need to really get out the expressjs/discussions#301 so it can truly be fixed in both places by a real solution, but that work is delayed right now due to express chopping (the timeline for turning express into a bunch of micro libs has sped up). |
Totally! let me know if you want me to try to come up with PR for either of these |
It's always welcome :) |
OK, working on a fix now. It's really a bug in this module, because it changes the meaning of |
You can also use 1.7.3 of this module if you want the old middleware order you had. |
express-session gives the following error when used with the expressjs/compression module from version 1.6.0. I've stuck to using 1.5.2 to avoid the error.
The text was updated successfully, but these errors were encountered: