Skip to content
This repository has been archived by the owner on Aug 1, 2019. It is now read-only.

Commit

Permalink
Fix: fixed Headers object parsing under edge and IE
Browse files Browse the repository at this point in the history
The object was handled incorrectly and it has been fixed to parse headers properly.
  • Loading branch information
jarrodek committed Oct 2, 2017
1 parent 53844ca commit 44bff59
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions headers-parser-behavior.html
Expand Up @@ -173,11 +173,11 @@
return result;
}
var _tmp = {};
Array.from(headers).forEach(function(item) {
if (_tmp[item[0]]) {
_tmp[item[0]] += ', ' + item[1];
headers.forEach(function(value, name) {
if (_tmp[name]) {
_tmp[name] += ', ' + value;
} else {
_tmp[item[0]] = item[1];
_tmp[name] = value;
}
});
return Object.keys(_tmp).map(function(key) {
Expand Down

0 comments on commit 44bff59

Please sign in to comment.