summaryrefslogtreecommitdiff
path: root/lib/_http_outgoing.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_http_outgoing.js')
-rw-r--r--lib/_http_outgoing.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js
index 7248e5a135..8455b91603 100644
--- a/lib/_http_outgoing.js
+++ b/lib/_http_outgoing.js
@@ -402,7 +402,10 @@ OutgoingMessage.prototype.write = function(chunk, encoding) {
throw new TypeError('first argument must be a string or Buffer');
}
- if (chunk.length === 0) return false;
+
+ // If we get an empty string or buffer, then just do nothing, and
+ // signal the user to keep writing.
+ if (chunk.length === 0) return true;
var len, ret;
if (this.chunkedEncoding) {