http: Adding doc and debug for calling empty string on write function
Addresses the issue : https://github.com/nodejs/node/issues/22066
Removing the empty check would be a breaking change, however I'm not sure why such check is in first place. May be need input from the community.
In the meantime, I thought its worth to add documentation and at the same time to add debug
log, so that when users feel write
with empty string or buffer hangs, they can run in debug mode to find out the reason.
If the content fits for the documentation, I guess we need to add the same to http2
as well.
Open to feedbacks and thoughts.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
documentation is changed or added -
commit message follows commit guidelines