Comments (35)
I pushed the code with a package.json and an example of a file that hangs (there are others, so it may just be the fact it is quite large)
https://github.com/psq/comp-bug
from compression.
Awesome @psq ! I'm looking into it right now :)
/cc @robbywashere
from compression.
btw, tested with node 0.10.17 and 0.10.28, same result
from compression.
So far I cannot repro on 0.10.28 on Windows :(
from compression.
Chrome 35
from compression.
It is also not reproducing for me on node 0.10.28 on Ubuntu 12.04.4 using Chrome 35. Can you offer a patch or an insight into what is causing the issue?
from compression.
Please revert change and publish it to npm. We can investigate it later.
from compression.
interesting this is only a mac issue then. I'll track down which commit introduced the regression. My guess would be on that one: 5426d13, but I'll double check in a few minutes.
from compression.
@psq just to confirm, when you run a clean clone of what you pushed and run the steps you said, you are able to reproduce the issue on Chrome using Mac? I just want to verify that you did indeed make sure the sample you uploaded reproduced the issue :)
from compression.
@dougwilson yes, I can reproduce the problem with both clone and safari with 1.0.4, and directly using the content of git (see above comment that identifies the commit).
from compression.
Also, same behavior with firefox (29.0.1)
from compression.
Yea, I tried Firefox too on both and it worked fine. I just mentioned Chrome because you said that was where it was broken.
from compression.
OSX Chrome and Safari here.
from compression.
So you serve web site from your Mac OS X laptop? Has anyone been able to reproduce on a non-Mac machine so far?
from compression.
people here develop using macs (but prod server is ubuntu).
from compression.
No, but people can blindly deploy broken app. Not everyone is using robust integration tests.
from compression.
tracing down what is happening, or not happening. once I have enough traces, I'll get a system where it works so I can compare.
from compression.
Seriously guys, can someone debug this on Mac OS X to come up with a patch or an explanation as to what is going on, rather than arguing to revert this? I'm trying to look into it to figure it out, by the arguing is taking all my attention, and it's not easy since I can't reproduce it, either. Please let's do something constructive.
from compression.
Same issue, running node 0.10.28 and 0.11.13 running from Debian 6 and 7. I'm working on tracking it down in the code though. Try to get back to you asap.
from compression.
I have just got it to reproduce. I am looking into it right now and should have a working patch very soon.
from compression.
I have a fix and am validating it.
from compression.
Awesome thanks.
from compression.
Hi, everyone. Can I have at least one other person verify that the commit c73f1f3 fixes the issue?
from compression.
yes! this fixes this for me on mac with chrome/safari.
FYI, I could also reproduce the issue with xubuntu 13.10 and 14.04. Will double check there as well.
from compression.
also works on xubuntu 14.04 with firefox. Thank you very much for the fix, @dougwilson
from compression.
OK. I'm releasing this as 1.0.5 right now and then having it work up through connect 2/express 3.
from compression.
Can anyone re-try on the now-current master? There was an issue with the patch when requests were not compressed. Just want to confirm instead of rushing something out.
from compression.
sure, will do right now.
from compression.
looks like it works, and chrome shows this in the reply: Content-Encoding:gzip
full headers for request/response:
Remote Address:127.0.0.1:1234
Request URL:http://127.0.0.1:1234/bootstrap.min.css
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8,fr;q=0.6
Connection:keep-alive
Host:127.0.0.1:1234
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36
Response Headersview source
Accept-Ranges:bytes
Cache-Control:public, max-age=0
Connection:keep-alive
Content-Encoding:gzip
Content-Type:text/css; charset=UTF-8
Date:Wed, 04 Jun 2014 01:06:37 GMT
ETag:W/"988964153"
Last-Modified:Tue, 03 Jun 2014 22:51:07 GMT
Transfer-Encoding:chunked
Vary:Accept-Encoding
X-Powered-By:Express
from compression.
Works for me too.
from compression.
OK, thanks everyone.I was already planning to move this dumb res
streaming intercepting into it's own library. Now it's even more complicated :D
from compression.
1.0.5 published to npm.
from compression.
thank you again. Also tested the npm with our full app, works great.
from compression.
OK, everyone, the whole connect 2/express 3 chain has been updated with the fix, if anyone is still using the version of compress
that is bundled.
from compression.
It works great on my end. Thanks a lot doug!
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
- compression not working json payload HOT 6
- 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.