Node.js: ServerRequest.destroy() implemented.

This closes #871 issue on GitHub.
This commit is contained in:
Andrei Zeliankou
2023-09-26 12:49:39 +01:00
parent e0c2675774
commit 2d0e502d2a

View File

@@ -33,8 +33,17 @@ ServerResponse.prototype.statusMessage = undefined;
ServerResponse.prototype.headers_len = 0; ServerResponse.prototype.headers_len = 0;
ServerResponse.prototype.headers_count = 0; ServerResponse.prototype.headers_count = 0;
ServerResponse.prototype.headersSent = false; ServerResponse.prototype.headersSent = false;
ServerResponse.prototype.destroyed = false;
ServerResponse.prototype.finished = false; ServerResponse.prototype.finished = false;
ServerResponse.prototype.destroy = function destroy(error) {
if (!this.destroyed) {
this.destroyed = true;
}
return this;
};
ServerResponse.prototype._finish = function _finish() { ServerResponse.prototype._finish = function _finish() {
this.headers = {}; this.headers = {};
this.headers_len = 0; this.headers_len = 0;