From 7b839bf5da772d4bf61a3be95fbdbb6d4591ba63 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Wed, 3 Apr 2019 18:40:47 +0300 Subject: Backed out changeset f74d4dd9c3db. This closes #240 issue on GitHub. --- src/nodejs/unit-http/http_server.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/nodejs/unit-http/http_server.js b/src/nodejs/unit-http/http_server.js index 0ac5d649..ae8e204a 100755 --- a/src/nodejs/unit-http/http_server.js +++ b/src/nodejs/unit-http/http_server.js @@ -197,6 +197,14 @@ function writeHead(statusCode, reason, obj) { } }; +/* + * Some Node.js packages are known to be using this undocumented function, + * notably "compression" middleware. + */ +ServerResponse.prototype._implicitHeader = function _implicitHeader() { + this.writeHead(this.statusCode); +}; + ServerResponse.prototype._writeBody = function(chunk, encoding, callback) { var contentLength = 0; -- cgit