mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 06:36:55 +02:00
Fix getResponseHeader to correctly return values for case-insensitive headers
This commit is contained in:
@@ -415,7 +415,12 @@ var doRequest = function(options) {
|
|||||||
return this.responseHeaders;
|
return this.responseHeaders;
|
||||||
};
|
};
|
||||||
xhr.getResponseHeader = function (header) {
|
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;
|
return xhr;
|
||||||
|
Reference in New Issue
Block a user