Skip to content
Snippets Groups Projects
Commit b41d1226 authored by echicken's avatar echicken :chicken:
Browse files

Keep original header name alongside normalized for now. We should probably...

Keep original header name alongside normalized for now. We should probably switch to using a method to read these values and do normalization there.
parent 03a90dba
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -169,10 +169,13 @@ HTTPRequest.prototype.ReadHeaders=function() { ...@@ -169,10 +169,13 @@ HTTPRequest.prototype.ReadHeaders=function() {
this.contentlength=parseInt(m[1]); this.contentlength=parseInt(m[1]);
m = header.match(/^(.*?):\s*(.*?)\s*$/); m = header.match(/^(.*?):\s*(.*?)\s*$/);
if (m) { if (m) {
var key = m[1].toLowerCase(); if (this.response_headers_parsed[m[1]] == undefined)
if (this.response_headers_parsed[key] == undefined) this.response_headers_parsed[m[1]] = [];
this.response_headers_parsed[key] = []; this.response_headers_parsed[m[1]].push(m[2]);
this.response_headers_parsed[key].push(m[2]); var lc = m[1].toLowerCase();
if (this.response_headers_parsed[lc] == undefined)
this.response_headers_parsed[lc] = [];
this.response_headers_parsed[lc].push(m[2]);
} }
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment