Skip to content

Commit db3a7e8

Browse files
yorkiecjihrig
authored andcommitted
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 3d1a064 commit db3a7e8

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

‎lib/_http_outgoing.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,9 @@ OutgoingMessage.prototype._renderHeaders = function(){
413413
returnheaders;
414414
};
415415

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

417420
Object.defineProperty(OutgoingMessage.prototype,'headersSent',{
418421
configurable: true,
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
'use strict';
2+
require('../common');
3+
constassert=require('assert');
4+
5+
consthttp=require('http');
6+
constOutgoingMessage=http.OutgoingMessage;
7+
constClientRequest=http.ClientRequest;
8+
constServerResponse=http.ServerResponse;
9+
10+
assert.throws(OutgoingMessage.prototype._implicitHeader);
11+
assert.strictEqual(
12+
typeofClientRequest.prototype._implicitHeader,'function');
13+
assert.strictEqual(
14+
typeofServerResponse.prototype._implicitHeader,'function');

0 commit comments

Comments
(0)