Hi guys.. I've been trying to chase down a problem in Firefox.. basically ajax requests aren't working.
As far as I can tell this problem is in 1.5.0 ( I've just downloaded a fresh copy and checked.. ) The problem is that for some reason setRequestHeaders ( part of the ajax request routines ) tries to add the header "toJSONString" which is a function!! ... along with "X-Request-With", "X-Prototype-Version" and "Accept".. ... now, I can't find how/why this is getting included into the headers object so in my haste I've just patched it up. I'm also frankly not sure whether this is a bug everyone else sees or I'm just going a little loopy!. .. Anyhow.. my patch is this: in function setRequestHeaders ( about line 900 in pt.1.5.0 ), the last line reads: this.transport.setRequestHeader(name, headers[name]); ... simply prepend the line with: ( typeof headers[name] != 'function' ) && ... to read: ( typeof headers[name] != 'function' ) && this.transport.setRequestHeader(name, headers[name]); ... and voila.. :-) ... a hack I know, but it seems to work ... I've also done a diff against ajax.js if thats of more use to someone: http://logan.mediaisotope.com/patches/prototype_ajax_bug_setRequestHeaders.patch ... cheerio. Jimbo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
