Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* Fixed: null data written to stream should be ignored

  • Loading branch information...
commit b2d0719c7a1de45b333c1cb37d4a708131dc9ede 1 parent 0a4646b
@joehewitt authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 cache.js
View
8 cache.js
@@ -43,12 +43,16 @@ module.exports = function(cache) {
function render() {
var write = res.write;
res.write = function(data, encoding) {
- body.push(new Buffer(data, encoding));
+ if (typeof data == 'number' || data) {
+ body.push(new Buffer(data, encoding));
+ }
}
var end = res.end;
res.end = function(data, encoding) {
- body.push(new Buffer(data, encoding));
+ if (typeof data == 'number' || data) {
+ body.push(new Buffer(data, encoding));
+ }
res.write = write;
res.end = end;
Please sign in to comment.
Something went wrong with that request. Please try again.