Skip to content

Commit

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

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

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

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

Expand Down Expand Up @@ -439,6 +439,8 @@ function onError(self, error, cb) {
}
}

function noop() {}

module.exports = {
IncomingMessage,
readStart,
Expand Down

0 comments on commit 1f2f493

Please sign in to comment.