Hi all, Here is the ticket for the "X-Requested-With" in AJAX calls: http://trac.osgeo.org/openlayers/ticket/3491 which changes OpenLayers/Request.js but in a different manner (see e.g. http://trac.osgeo.org/openlayers/ticket/3491#comment:1 or the code comments for clarification on why).
Thanks for your feedback so far. Best regards, Marc On 08.09.2011 06:24, Eric Lemoine wrote: > > > On Wednesday, September 7, 2011, Xavier Mamano (jorix) > <xavier.mam...@gmail.com <mailto:xavier.mam...@gmail.com>> wrote: > > Hi, > > > > Great! > > > > But "Request.XMLHttpRequest" is not written by OpenLayers Team (see > license > > in XMLHttpRequest.js) and is fully wrapped by "Request", so I think best > > make the following change: > > > > Index: lib/OpenLayers/Request.js > > =================================================================== > > --- lib/OpenLayers/Request.js (revision 12340) > > +++ lib/OpenLayers/Request.js (working copy) > > @@ -122,6 +122,10 @@ > > {proxy: OpenLayers.ProxyHost} > > ); > > config = OpenLayers.Util.applyDefaults(config, defaultConfig); > > + config.headers = OpenLayers.Util.applyDefaults( > > + config.headers, > > + {"X-Requested-With": "XMLHttpRequest"} > > + ); > > > > // create request, open, and set headers > > var request = new OpenLayers.Request.XMLHttpRequest(); > > > > This has the same effect as your proposal. > > > Indeed. Good catch. > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemo...@camptocamp.com <mailto:eric.lemo...@camptocamp.com> > http://www.camptocamp.com > > > _______________________________________________ > Dev mailing list > d...@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-dev
_______________________________________________ Dev mailing list d...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-dev