diff --git a/lib/OpenLayers/Request.js b/lib/OpenLayers/Request.js index 227af6d82f..3a5865bc0a 100644 --- a/lib/OpenLayers/Request.js +++ b/lib/OpenLayers/Request.js @@ -129,7 +129,8 @@ OpenLayers.Request = { // header through the user we cannot use applyDefaults, but have to // check manually whether we were called with a "X-Requested-With" // header. - var customRequestedWithHeader = false; + var customRequestedWithHeader = false, + headerKey; for(headerKey in config.headers) { if (config.headers.hasOwnProperty( headerKey )) { if (headerKey.toLowerCase() === 'x-requested-with') {