Use accept headers

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3845 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2006-03-12 06:04:03 +00:00
parent 7af12d04ce
commit 3a90c31a56
1 changed files with 2 additions and 1 deletions

View File

@ -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',