1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-14 04:49:43 +01:00

Fix getResponseHeader to correctly return values for case-insensitive headers

This commit is contained in:
Dominik Schmidt 2016-04-13 13:59:35 +02:00
parent 931562fbe5
commit ec88cf27f3

View File

@ -415,7 +415,12 @@ var doRequest = function(options) {
return this.responseHeaders;
};
xhr.getResponseHeader = function (header) {
return this.responseHeaders[header];
for(key in xhr.responseHeaders) {
if(key.toLowerCase() === header.toLowerCase()) {
return xhr.responseHeaders[key];
}
}
return null;
};
return xhr;