forked from svrjs/svrjs
Be case insensitive in header name exclusion in shimmed HTTP/1.x res.writeHead method
This commit is contained in:
parent
70444f3b48
commit
4a24b9d892
1 changed files with 5 additions and 7 deletions
12
svr.js
12
svr.js
|
@ -2927,13 +2927,11 @@ if (!cluster.isPrimary) {
|
||||||
if (typeof (b) == "object") table = b;
|
if (typeof (b) == "object") table = b;
|
||||||
if (table == undefined) table = this.tHeaders;
|
if (table == undefined) table = this.tHeaders;
|
||||||
table = JSON.parse(JSON.stringify(table));
|
table = JSON.parse(JSON.stringify(table));
|
||||||
if (table["content-type"] != undefined && table["Content-Type"] != undefined) {
|
var tableKeysT = Object.keys(table);
|
||||||
delete table["content-type"];
|
tableKeysT.forEach(function (key) {
|
||||||
}
|
var al = key.toLowerCase();
|
||||||
delete table["transfer-encoding"];
|
if (al == "transfer-encoding" && al == "connection" && al == "keep-alive" && al == "upgrade") delete table[key];
|
||||||
delete table["connection"];
|
});
|
||||||
delete table["keep-alive"];
|
|
||||||
delete table["upgrade"];
|
|
||||||
if (res.stream && res.stream.destroyed) {
|
if (res.stream && res.stream.destroyed) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
|
Reference in a new issue