1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
Index: /Users/jan/webdev/moodev/mootools/trunk/Remote/XHR.js
===================================================================
@@ -63,7 +63,7 @@
this.setTransport();
this.setOptions(params.options);
this.options.isSuccess = this.options.isSuccess || this.isSuccess;
- this.headers = $merge(this.options.headers);
+ this.headers = $merge({'X-Requested-With': 'XMLHttpRequest'}, this.options.headers);
if (this.options.urlEncoded && this.options.method != 'get'){
var encoding = (this.options.encoding) ? '; charset=' + this.options.encoding : '';
this.setHeader('Content-type', 'application/x-www-form-urlencoded' + encoding);
Index: /Users/jan/webdev/moodev/mootools/trunk/Remote/Ajax.js
===================================================================
@@ -46,7 +46,6 @@
this._method = '_method=' + this.options.method;
this.options.method = 'post';
}
- this.setHeader('X-Requested-With', 'XMLHttpRequest');
this.setHeader('Accept', 'text/javascript, text/html, application/xml, text/xml, */*');
},
Index: /Users/jan/webdev/moodev/mootools/trunk/Remote/Json.Remote.js
===================================================================
@@ -32,6 +32,7 @@
this.parent(url, options);
this.addEvent('onSuccess', this.onComplete, true);
this.setHeader('X-Request', 'JSON');
+ this.setHeader('Accept', 'text/javascript');
},
send: function(obj){
|