http: specify _implicitHeader in OutgoingMessage

PR-URL: https://github.com/nodejs/node/pull/7949
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
yorkie authored and cjihrig committed 2016-08-10 12:46:53 -04:00
1 parent 3d1a06451a
commit db3a7e83eb
2 files changed
+17

No files matched your search

+3
View File
@@ -413,6 +413,9 @@ OutgoingMessage.prototype._renderHeaders = function() {
return headers;
};
OutgoingMessage.prototype._implicitHeader = function() {
throw new Error('_implicitHeader() method is not implemented');
};
Object.defineProperty(OutgoingMessage.prototype, 'headersSent', {
configurable: true,
+14
View File
@@ -0,0 +1,14 @@
'use strict';
require('../common');
const assert = require('assert');
const http = require('http');
const OutgoingMessage = http.OutgoingMessage;
const ClientRequest = http.ClientRequest;
const ServerResponse = http.ServerResponse;
assert.throws(OutgoingMessage.prototype._implicitHeader);
assert.strictEqual(
typeof ClientRequest.prototype._implicitHeader, 'function');
assert.strictEqual(
typeof ServerResponse.prototype._implicitHeader, 'function');