On Wednesday, September 7, 2011, Xavier Mamano (jorix) <
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
http://www.camptocamp.com
_______________________________________________
Dev mailing list
d...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-dev

Reply via email to