<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi all,<br>
<br>
Here is the ticket for the "X-Requested-With" in AJAX calls:
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/openlayers/ticket/3491">http://trac.osgeo.org/openlayers/ticket/3491</a> which changes
OpenLayers/Request.js but in a different manner (see e.g.
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/openlayers/ticket/3491#comment:1">http://trac.osgeo.org/openlayers/ticket/3491#comment:1</a> or the code
comments for clarification on why). <br>
<br>
Thanks for your feedback so far.<br>
<br>
Best regards,<br>
Marc<br>
<br>
<br>
<br>
On 08.09.2011 06:24, Eric Lemoine wrote:
<blockquote
cite="mid:CAGZ3h-HLQwQNiOT8tSr2sB=K1Baa14iQLCG+zSNxEbYbLt6wYQ@mail.gmail.com"
type="cite"><br>
<br>
On Wednesday, September 7, 2011, Xavier Mamano (jorix) <<a
moz-do-not-send="true" 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 moz-do-not-send="true"
href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a><br>
<a moz-do-not-send="true" href="http://www.camptocamp.com">http://www.camptocamp.com</a><br>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Dev@lists.osgeo.org">Dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/openlayers-dev">http://lists.osgeo.org/mailman/listinfo/openlayers-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>