@@ -38,7 +38,6 @@ const { getDefaultHighWaterMark } = require('internal/streams/state');
38
38
const assert = require ( 'internal/assert' ) ;
39
39
const EE = require ( 'events' ) ;
40
40
const Stream = require ( 'stream' ) ;
41
- const internalUtil = require ( 'internal/util' ) ;
42
41
const { kOutHeaders, utcDate, kNeedDrain } = require ( 'internal/http' ) ;
43
42
const { Buffer } = require ( 'buffer' ) ;
44
43
const {
@@ -211,27 +210,6 @@ ObjectDefineProperty(OutgoingMessage.prototype, 'writableCorked', {
211
210
} ,
212
211
} ) ;
213
212
214
- ObjectDefineProperty ( OutgoingMessage . prototype , '_headers' , {
215
- __proto__ : null ,
216
- get : internalUtil . deprecate ( function ( ) {
217
- return this . getHeaders ( ) ;
218
- } , 'OutgoingMessage.prototype._headers is deprecated' , 'DEP0066' ) ,
219
- set : internalUtil . deprecate ( function ( val ) {
220
- if ( val == null ) {
221
- this [ kOutHeaders ] = null ;
222
- } else if ( typeof val === 'object' ) {
223
- const headers = this [ kOutHeaders ] = { __proto__ : null } ;
224
- const keys = ObjectKeys ( val ) ;
225
- // Retain for(;;) loop for performance reasons
226
- // Refs: https://github.com/nodejs/node/pull/30958
227
- for ( let i = 0 ; i < keys . length ; ++ i ) {
228
- const name = keys [ i ] ;
229
- headers [ name . toLowerCase ( ) ] = [ name , val [ name ] ] ;
230
- }
231
- }
232
- } , 'OutgoingMessage.prototype._headers is deprecated' , 'DEP0066' ) ,
233
- } ) ;
234
-
235
213
ObjectDefineProperty ( OutgoingMessage . prototype , 'connection' , {
236
214
__proto__ : null ,
237
215
get : function ( ) {
@@ -256,42 +234,6 @@ ObjectDefineProperty(OutgoingMessage.prototype, 'socket', {
256
234
} ,
257
235
} ) ;
258
236
259
- ObjectDefineProperty ( OutgoingMessage . prototype , '_headerNames' , {
260
- __proto__ : null ,
261
- get : internalUtil . deprecate ( function ( ) {
262
- const headers = this [ kOutHeaders ] ;
263
- if ( headers !== null ) {
264
- const out = { __proto__ : null } ;
265
- const keys = ObjectKeys ( headers ) ;
266
- // Retain for(;;) loop for performance reasons
267
- // Refs: https://github.com/nodejs/node/pull/30958
268
- for ( let i = 0 ; i < keys . length ; ++ i ) {
269
- const key = keys [ i ] ;
270
- const val = headers [ key ] [ 0 ] ;
271
- out [ key ] = val ;
272
- }
273
- return out ;
274
- }
275
- return null ;
276
- } , 'OutgoingMessage.prototype._headerNames is deprecated' , 'DEP0066' ) ,
277
- set : internalUtil . deprecate ( function ( val ) {
278
- if ( typeof val === 'object' && val !== null ) {
279
- const headers = this [ kOutHeaders ] ;
280
- if ( ! headers )
281
- return ;
282
- const keys = ObjectKeys ( val ) ;
283
- // Retain for(;;) loop for performance reasons
284
- // Refs: https://github.com/nodejs/node/pull/30958
285
- for ( let i = 0 ; i < keys . length ; ++ i ) {
286
- const header = headers [ keys [ i ] ] ;
287
- if ( header )
288
- header [ 0 ] = val [ keys [ i ] ] ;
289
- }
290
- }
291
- } , 'OutgoingMessage.prototype._headerNames is deprecated' , 'DEP0066' ) ,
292
- } ) ;
293
-
294
-
295
237
OutgoingMessage . prototype . _renderHeaders = function _renderHeaders ( ) {
296
238
if ( this . _header ) {
297
239
throw new ERR_HTTP_HEADERS_SENT ( 'render' ) ;
0 commit comments