posted at: 10:34 pm on Sun 18th Mar 2007 , filed under: Apple, programming, browsers, 2.0, software

When using prototype javascript library and its Ajax routines, chances are that on Safari, you will get these errors:

Bad Request
Your browser sent a request that this server could not understand.
Request header field is missing ‘:’ separator.

After googling around a bit, I found this posting on the rico site. Applying the same patch fixed the Ajax problems!

In the prototype.js file, around line 915, find the following section of code:


for (var name in headers)
this.transport.setRequestHeader(name, headers[name]);

and change this to


for (var name in headers)
if(typeof headers[name] != ‘function’)
this.transport.setRequestHeader(name, headers[name]);

Welcome Safari users!

Technorati Tags: , , ,