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:
parent
88e862ba82
commit
99296eedbe
@ -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
test/parallel/test-http-outgoing-proto.js
Normal file
14
test/parallel/test-http-outgoing-proto.js
Normal 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');
|
Loading…
x
Reference in New Issue
Block a user