Use accept headers
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3845 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
7af12d04ce
commit
3a90c31a56
|
@ -703,7 +703,8 @@ Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
|
|||
setRequestHeaders: function() {
|
||||
var requestHeaders =
|
||||
['X-Requested-With', 'XMLHttpRequest',
|
||||
'X-Prototype-Version', Prototype.Version];
|
||||
'X-Prototype-Version', Prototype.Version,
|
||||
'Accept', 'text/javascript; text/html; text/xml; */*' ];
|
||||
|
||||
if (this.options.method == 'post') {
|
||||
requestHeaders.push('Content-type',
|
||||
|
|
Loading…
Reference in New Issue