<br><br>On Wednesday, September 7, 2011, Xavier Mamano (jorix) <<a href="mailto:xavier.mamano@gmail.com">xavier.mamano@gmail.com</a>> wrote:<br>> Hi,<br>><br>> Great!<br>><br>> But "Request.XMLHttpRequest" is not written by OpenLayers Team (see license<br>
> in XMLHttpRequest.js) and is fully wrapped by "Request", so I think best<br>> make the following change:<br>><br>> Index: lib/OpenLayers/Request.js<br>> ===================================================================<br>
> --- lib/OpenLayers/Request.js (revision 12340)<br>> +++ lib/OpenLayers/Request.js (working copy)<br>> @@ -122,6 +122,10 @@<br>> {proxy: OpenLayers.ProxyHost}<br>> );<br>> config = OpenLayers.Util.applyDefaults(config, defaultConfig);<br>
> + config.headers = OpenLayers.Util.applyDefaults(<br>> + config.headers,<br>> + {"X-Requested-With": "XMLHttpRequest"}<br>> + );<br>><br>> // create request, open, and set headers<br>
> var request = new OpenLayers.Request.XMLHttpRequest();<br>><br>> This has the same effect as your proposal.<br><br><br>Indeed. Good catch.<br><br>-- <br>Eric Lemoine<br><br>Camptocamp France SAS<br>Savoie Technolac, BP 352<br>
73377 Le Bourget du Lac, Cedex<br><br>Tel : 00 33 4 79 44 44 96<br>Mail : <a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a><br><a href="http://www.camptocamp.com">http://www.camptocamp.com</a><br>
<br>