mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-13 20:39:57 +01:00
Fix getResponseHeader to correctly return values for case-insensitive headers
This commit is contained in:
parent
931562fbe5
commit
ec88cf27f3
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user