diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index d9decf22a018a9..4357647690beb8 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -909,9 +909,8 @@ function(err, event) { this.destroy(err); }; -OutgoingMessage.validateHeaderName = validateHeaderName; -OutgoingMessage.validateHeaderValue = validateHeaderValue; - module.exports = { + validateHeaderName, + validateHeaderValue, OutgoingMessage }; diff --git a/lib/http.js b/lib/http.js index 2b01e1edf5ea19..4bbe42e652c24e 100644 --- a/lib/http.js +++ b/lib/http.js @@ -29,8 +29,11 @@ const httpAgent = require('_http_agent'); const { ClientRequest } = require('_http_client'); const { methods } = require('_http_common'); const { IncomingMessage } = require('_http_incoming'); -const { OutgoingMessage } = require('_http_outgoing'); -const { validateHeaderName, validateHeaderValue } = OutgoingMessage; +const { + validateHeaderName, + validateHeaderValue, + OutgoingMessage +} = require('_http_outgoing'); const { _connectionListener, STATUS_CODES,