diff options
Diffstat (limited to 'lib/_http_outgoing.js')
-rw-r--r-- | lib/_http_outgoing.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 60ed6779c4..d6e830e3f3 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -23,7 +23,6 @@ const assert = require('internal/assert'); const Stream = require('stream'); -const util = require('util'); const internalUtil = require('internal/util'); const { outHeadersKey, utcDate } = require('internal/http'); const { Buffer } = require('buffer'); @@ -109,10 +108,10 @@ Object.setPrototypeOf(OutgoingMessage, Stream); Object.defineProperty(OutgoingMessage.prototype, '_headers', { - get: util.deprecate(function() { + get: internalUtil.deprecate(function() { return this.getHeaders(); }, 'OutgoingMessage.prototype._headers is deprecated', 'DEP0066'), - set: util.deprecate(function(val) { + set: internalUtil.deprecate(function(val) { if (val == null) { this[outHeadersKey] = null; } else if (typeof val === 'object') { @@ -127,7 +126,7 @@ Object.defineProperty(OutgoingMessage.prototype, '_headers', { }); Object.defineProperty(OutgoingMessage.prototype, '_headerNames', { - get: util.deprecate(function() { + get: internalUtil.deprecate(function() { const headers = this[outHeadersKey]; if (headers !== null) { const out = Object.create(null); @@ -141,7 +140,7 @@ Object.defineProperty(OutgoingMessage.prototype, '_headerNames', { } return null; }, 'OutgoingMessage.prototype._headerNames is deprecated', 'DEP0066'), - set: util.deprecate(function(val) { + set: internalUtil.deprecate(function(val) { if (typeof val === 'object' && val !== null) { const headers = this[outHeadersKey]; if (!headers) |