compression icon indicating copy to clipboard operation
compression copied to clipboard

Use headersSent instead of _header

Open maritz opened this issue 6 years ago • 4 comments

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.

maritz avatar Jan 10 '18 18:01 maritz

Hm, I just noticed that I branched from my other changes. Should I remove those changes from this PR?

maritz avatar Jan 10 '18 18:01 maritz

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 avatar Jan 15 '18 16:01 dougwilson

@dougwilson I rebased and cut out the extra commits.

maritz avatar Sep 27 '18 10:09 maritz

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.

lamweili avatar Aug 04 '22 02:08 lamweili