From a86a190c4906a0322bab7f91f1ccf29914a873eb Mon Sep 17 00:00:00 2001 From: James Atherton Date: Fri, 26 Feb 2016 15:02:57 -0600 Subject: [PATCH] getResponseHeader should work for non-lowercased response headers --- lib/XMLHttpRequest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/XMLHttpRequest.js b/lib/XMLHttpRequest.js index 4893913..48d829f 100644 --- a/lib/XMLHttpRequest.js +++ b/lib/XMLHttpRequest.js @@ -216,10 +216,10 @@ exports.XMLHttpRequest = function() { && this.readyState > this.OPENED && response && response.headers - && response.headers[header.toLowerCase()] + && (response.headers[header.toLowerCase()] || response.headers[header]) && !errorFlag ) { - return response.headers[header.toLowerCase()]; + return (response.headers[header.toLowerCase()] || response.headers[header]); } return null;