diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2023-11-17 17:27:31 +0000 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2023-11-17 17:27:31 +0000 |
commit | 1443d623d4b5d59e4463e025b4125be9a5aa3436 (patch) | |
tree | 72207d13dd32510cb40f6586b840921d0bc14bf8 /src/nodejs/unit-http/http_server.js | |
parent | 919cae7ff95a3ce5878731a8d23f34c75489d3b4 (diff) | |
download | unit-1443d623d4b5d59e4463e025b4125be9a5aa3436.tar.gz unit-1443d623d4b5d59e4463e025b4125be9a5aa3436.tar.bz2 |
Node.js: ServerResponse.flushHeaders() implemented.
This closes #1006 issue on GitHub.
Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to '')
-rw-r--r-- | src/nodejs/unit-http/http_server.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nodejs/unit-http/http_server.js b/src/nodejs/unit-http/http_server.js index 0f00b47f..8eb13d7f 100644 --- a/src/nodejs/unit-http/http_server.js +++ b/src/nodejs/unit-http/http_server.js @@ -138,6 +138,10 @@ ServerResponse.prototype.removeHeader = function removeHeader(name) { } }; +ServerResponse.prototype.flushHeaders = function flushHeaders() { + this._sendHeaders(); +}; + ServerResponse.prototype._removeHeader = function _removeHeader(lc_name) { let entry = this.headers[lc_name]; let name_len = Buffer.byteLength(entry[0] + "", 'latin1'); |