[OpenLayers-Trac] Re: [OpenLayers] #3491: Automatically add the "X-Requested-With" header to XHR-requests

OpenLayers trac-20090302 at openlayers.org
Thu Sep 8 04:00:30 EDT 2011


#3491: Automatically add the "X-Requested-With" header to XHR-requests
------------------------+---------------------------------------------------
 Reporter:  marcjansen  |       Owner:  tschaub     
     Type:  feature     |      Status:  new         
 Priority:  minor       |   Milestone:  2.12 Release
Component:  Request     |     Version:  SVN         
 Keywords:              |       State:              
------------------------+---------------------------------------------------

Comment(by marcjansen):

 The attached patch (attachment:3491.001.x-requested-with.patch) adds the
 suggested header to our requests.

 I did not use `OpenLayers.Util.applyDefaults` to make sure that the `X
 -Requested-With` header can be overridden by the user and to not send
 headers like this (note the case of the header-key).

 {{{
   x-requested-with: humpty         // from the user
   X-Requested-With: XMLHttpRequest // autoadded
 }}}

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3491#comment:1>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list