Skip to content

Commit 8243ca0

Browse files
committed
http: reuse existing StorageObject
PR-URL: #10941 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
1 parent b377034 commit 8243ca0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

‎lib/_http_outgoing.js‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ var RE_FIELDS = new RegExp('^(?:Connection|Transfer-Encoding|Content-Length|' +
2020
varRE_CONN_VALUES=/(?:^|\W)close|upgrade(?:$|\W)/ig;
2121
varRE_TE_CHUNKED=common.chunkExpression;
2222

23-
// Used to store headers returned by getHeaders()
24-
functionOutgoingHeaders(){}
25-
OutgoingHeaders.prototype=Object.create(null);
26-
2723
vardateCache;
2824
functionutcDate(){
2925
if(!dateCache){
@@ -510,7 +506,7 @@ OutgoingMessage.prototype.getHeaderNames = function getHeaderNames(){
510506
// Returns a shallow copy of the current outgoing headers.
511507
OutgoingMessage.prototype.getHeaders=functiongetHeaders(){
512508
constheaders=this[outHeadersKey];
513-
constret=newOutgoingHeaders();
509+
constret=newStorageObject();
514510
if(headers){
515511
constkeys=Object.keys(headers);
516512
for(vari=0;i<keys.length;++i){

0 commit comments

Comments
(0)