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 http://dev.rubyonrails.org/ticket/7087 for full
reference. The test case is the next:

/app/controllers/problem_controller.rb

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

/app/controllers/problem_helper.rb

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

<%= javascript_include_tag :defaults %>

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))

this.evalResponse();

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

Many thanks for helpping :frowning: