Skip to content

Commit 99296ee

Browse files
committed
http: specify _implicitHeader in OutgoingMessage
PR-URL: #7949 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 88e862b commit 99296ee

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

lib/_http_outgoing.js

+3
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,9 @@ OutgoingMessage.prototype._renderHeaders = function() {
413413
return headers;
414414
};
415415

416+
OutgoingMessage.prototype._implicitHeader = function() {
417+
throw new Error('_implicitHeader() method is not implemented');
418+
};
416419

417420
Object.defineProperty(OutgoingMessage.prototype, 'headersSent', {
418421
configurable: true,
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
'use strict';
2+
require('../common');
3+
const assert = require('assert');
4+
5+
const http = require('http');
6+
const OutgoingMessage = http.OutgoingMessage;
7+
const ClientRequest = http.ClientRequest;
8+
const ServerResponse = http.ServerResponse;
9+
10+
assert.throws(OutgoingMessage.prototype._implicitHeader);
11+
assert.strictEqual(
12+
typeof ClientRequest.prototype._implicitHeader, 'function');
13+
assert.strictEqual(
14+
typeof ServerResponse.prototype._implicitHeader, 'function');

0 commit comments

Comments
 (0)