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!












Did you submit the patch?
Joannou
The patch was not mine to submit but I did alert the guys over there. Not sure if they have accepted it or not. Since then, I saw much traffic on that issue and resolution and trust that it has been taken care of.
For clarity, the for…in statement enumerates the properties (including methods) of the object. However, core methods of core objects (like Array) are not enumerated. This means that enumerating an unextended core object is fine, but enumerating an extended core object requires extra checks to ignore methods that extend the core object.
In this particular case, I ran into this issue because I was using the json.js provided by json.org, which ended up extending the request headers. Not using the redundant json.js solved the issue for me.
Cheers, Joannou.