Safari doesn't pass the headers.

When I try to update content through ajax It doesn't work on Safari. I've opened a ticket for full reference. The test case is the next:


class ProblemController < ApplicationController def index       render :action => 'index' end def myrequest render(:update) {|page| page.updateContent(params[:content])} end end


module ProblemHelper   def updateContent(content)     page.replace_html 'content', content   end end /app/views/problem/index.rhtml

<html> <head> <%= javascript_include_tag :defaults %> <script language="javascript" type="text/javascript"> var Site = { loader: function(){ new Ajax.Request('/problem/myrequest',{             postBody:'content=this is a test',       method:'post',       asynchronous:true,       evalScripts:true,       onFailure: function(transport) {             $('content').innerHTML=transport.responseText;         },       onComplete: function(transport){       alert(transport.responseText);       }       }); } } Event.observe(window,'load', function(){Site.loader()}); </script> </head> <body> <div id="content"></div> </body> </html>

I'm pretty sure that this works but only in gecko engines and IE. I was debugging the prototype.js and I realized using response.getAllResponseHeaders() function that Safari and Swift are not passing the headers therefore since the line 766 in prototype.js It's not executed:

if ((this.header('Content-type') ).match(/text\/javascript/i))


By the way, for other example of this problem take a look at, It's my site and has the same problem!

Many thanks for helpping :frowning: