Skip to content

Commit

Permalink
Pass modified data to OutgoingMessage using write() insted of end()
Browse files Browse the repository at this point in the history
Fixes daffl#7.
  • Loading branch information
wrr committed Dec 19, 2013
1 parent e076c04 commit d238dd6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/connect-injector.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module.exports = function (when, converter) {
});
return next();
}
var super_write = res.write.bind(res);

// An object that we can mix into the response
var mixin = {
Expand Down Expand Up @@ -148,7 +149,8 @@ module.exports = function (when, converter) {
converterChain(this._interceptBuffer.getContents(), function (error, data) {
if (error) { return next(error); }

_super(data);
super_write(data);
_super();
});

return true;
Expand Down

0 comments on commit d238dd6

Please sign in to comment.