Skip to content

Commit

Permalink
http: headers(Distinct), trailers(Distinct) setters to be no-op
Browse files Browse the repository at this point in the history
  • Loading branch information
sonimadhuri committed Oct 29, 2022
1 parent 5d92ddc commit f731551
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions lib/_http_incoming.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,7 @@ ObjectDefineProperty(IncomingMessage.prototype, 'headers', {
}
return this[kHeaders];
},
set: function(val) {
this[kHeaders] = val;
}
set: function(val) {}
});

ObjectDefineProperty(IncomingMessage.prototype, 'headersDistinct', {
Expand All @@ -142,9 +140,7 @@ ObjectDefineProperty(IncomingMessage.prototype, 'headersDistinct', {
}
return this[kHeadersDistinct];
},
set: function(val) {
this[kHeadersDistinct] = val;
}
set: function(val) {}
});

ObjectDefineProperty(IncomingMessage.prototype, 'trailers', {
Expand All @@ -162,9 +158,7 @@ ObjectDefineProperty(IncomingMessage.prototype, 'trailers', {
}
return this[kTrailers];
},
set: function(val) {
this[kTrailers] = val;
}
set: function(val) {}
});

ObjectDefineProperty(IncomingMessage.prototype, 'trailersDistinct', {
Expand All @@ -182,9 +176,7 @@ ObjectDefineProperty(IncomingMessage.prototype, 'trailersDistinct', {
}
return this[kTrailersDistinct];
},
set: function(val) {
this[kTrailersDistinct] = val;
}
set: function(val) {}
});

IncomingMessage.prototype.setTimeout = function setTimeout(msecs, callback) {
Expand Down

0 comments on commit f731551

Please sign in to comment.