From 413a7e1deabaf5f0daa633df6e594f8cc1503a12 Mon Sep 17 00:00:00 2001 From: Anto Aravinth Date: Tue, 21 Aug 2018 19:50:04 +0530 Subject: [PATCH] http: adding doc and debug for calling empty string on write function PR-URL: https://github.com/nodejs/node/pull/22118 Reviewed-By: Rich Trott Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Matteo Collina --- doc/api/http.md | 3 +++ lib/_http_outgoing.js | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/api/http.md b/doc/api/http.md index 49a98d5f1734cb..e781d63ac44b57 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -750,6 +750,9 @@ Returns `true` if the entire data was flushed successfully to the kernel buffer. Returns `false` if all or part of the data was queued in user memory. `'drain'` will be emitted when the buffer is free again. +When `write` function is called with empty string or buffer, it does +nothing and waits for more input. + ## Class: http.Server