There was an error while loading. Please reload this page.
1 parent 4ef0fa4 commit 16b474fCopy full SHA for 16b474f
src/js/XHRDefaults.ts
@@ -130,8 +130,15 @@ function setupXhrResponse(xhrResponse: XMLHttpRequest): XMLHttpRequest {
130
};
131
132
xhrResponse.getResponseHeader = (header: string) => {
133
-if ((<any>xhrResponse).headers && (<any>xhrResponse).headers[header]) {
134
-return (<any>xhrResponse).headers[header];
+if (header) {
+if ((<any>xhrResponse).headers) {
135
+if ((<any>xhrResponse).headers[header]) {
136
+return (<any>xhrResponse).headers[header];
137
+}
138
+if ((<any>xhrResponse).headers[header.toLocaleLowerCase()]) {
139
+return (<any>xhrResponse).headers[header.toLocaleLowerCase()];
140
141
142
}
143
return null;
144
0 commit comments