compression
compression copied to clipboard
Use headersSent instead of _header
As discussed in #127 this PR now includes the changes that do break node v0.8 and has tests.
I did not remove the travis config for v0.8 since I'm not sure that's something that should be in a PR.
Hm, I just noticed that I branched from my other changes. Should I remove those changes from this PR?
Hi @maritz I can try to cut them out myself during the merge, but if you can remove them, that may be good especially in case something else changes (either in the other PR or between that PR merging and the major release to include this change).
@dougwilson I rebased and cut out the extra commits.
For background information regarding res._header
and res.headersSent
equivalence:
https://github.com/nodejs/node/blob/93e0bf9abf350637d772bcce14a5d9527b733300/lib/_http_outgoing.js#L741-L746
We can also add test cases to assert the equivalence (if really required). The code snippet is available @ https://github.com/expressjs/session/pull/908/commits/35880d6509e6ee6484521f746f936f8a56503be5.