Skip to content

Commit

Permalink
Response write/end to noop() when request aborted
Browse files Browse the repository at this point in the history
  • Loading branch information
ZJONSSON committed Jan 11, 2013
1 parent 6db901f commit 8f8af69
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/middleware/compress.js
Expand Up @@ -73,6 +73,11 @@ module.exports = function compress(options) {
// vary
res.setHeader('Vary', 'Accept-Encoding');

// Remove response write/end if request aborted
req.on("close",function() {
res.write = res.end = function() {}
});

// proxy

res.write = function(chunk, encoding){
Expand Down

0 comments on commit 8f8af69

Please sign in to comment.