Skip to content

Commit

Permalink
X-Requested-With
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.mochikit.com/mochikit/trunk@1291 14cb8549-11fe-0310-83a5-45f3e82da484
  • Loading branch information
etrepum committed May 15, 2007
1 parent f46c2ed commit a097c5f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions MochiKit/Async.js
Expand Up @@ -385,6 +385,7 @@ MochiKit.Base.update(MochiKit.Async, {
if (req.overrideMimeType && opts.mimeType) {
req.overrideMimeType(opts.mimeType);
}
req.setRequestHeader("X-Requested-With", "XMLHttpRequest");
if (opts.headers) {
var headers = opts.headers;
if (!m.isArrayLike(headers)) {
Expand Down
2 changes: 2 additions & 0 deletions doc/html/MochiKit/VersionHistory.html
Expand Up @@ -17,6 +17,8 @@
<div class="document">
<p>2006-XX-XX v1.4</p>
<ul class="simple">
<li>MochiKit.Async now sets the &quot;X-Requested-With: XMLHttpRequest&quot; header,
a de facto standard (Prototype, jQuery, Mootools).</li>
<li>MochiKit.Signal custom handlers no longer cause callbacks to get re-bound to
the source if they were previously bound.</li>
<li>Fixed MochiKit.Signal.signal re-entrancy bug that could cause recently
Expand Down
2 changes: 2 additions & 0 deletions doc/html/MochiKit/index.html
Expand Up @@ -71,6 +71,8 @@ <h1><a id="see-also" name="see-also">See Also</a></h1>
<h1><a id="version-history" name="version-history">Version History</a></h1>
<p>2006-XX-XX v1.4</p>
<ul class="simple">
<li>MochiKit.Async now sets the &quot;X-Requested-With: XMLHttpRequest&quot; header,
a de facto standard (Prototype, jQuery, Mootools).</li>
<li>MochiKit.Signal custom handlers no longer cause callbacks to get re-bound to
the source if they were previously bound.</li>
<li>Fixed MochiKit.Signal.signal re-entrancy bug that could cause recently
Expand Down
2 changes: 2 additions & 0 deletions doc/rst/MochiKit/VersionHistory.rst
@@ -1,5 +1,7 @@
2006-XX-XX v1.4

- MochiKit.Async now sets the "X-Requested-With: XMLHttpRequest" header,
a de facto standard (Prototype, jQuery, Mootools).
- MochiKit.Signal custom handlers no longer cause callbacks to get re-bound to
the source if they were previously bound.
- Fixed MochiKit.Signal.signal re-entrancy bug that could cause recently
Expand Down
1 change: 1 addition & 0 deletions packed/MochiKit/MochiKit.js
Expand Up @@ -2464,6 +2464,7 @@ req.open(opts.method,url,true);
if(req.overrideMimeType&&opts.mimeType){
req.overrideMimeType(opts.mimeType);
}
req.setRequestHeader("X-Requested-With","XMLHttpRequest");
if(opts.headers){
var _2a9=opts.headers;
if(!m.isArrayLike(_2a9)){
Expand Down

0 comments on commit a097c5f

Please sign in to comment.