On Mon, Nov 23, 2009 at 5:51 PM, kangax <kan...@gmail.com> wrote: > On Nov 19, 9:39 pm, Arjen Nienhuis <a.g.nienh...@gmail.com> wrote: >> Hi, >> >> Prototype adds a extra parameter &_= to every GET Ajax.Request done by >> any WebKit browser. This is done to fix a bug in an old version of >> Safari. >> >> I'd like to see this feature removed for these reasons: >> >> - That version is of Safari is not used any more. (which version was it >> anyway?) > > So you don't know which version it is, but you know that it's not used > any more? Sorry, I'm not following such logic. > > From what I remember, it was Safari 2.x that had problems with empty > POST bodies. We still support Safari 2.0.4 (but not any other lower > version of 2.x), so if 2.0.4 is affected by this bug, we can't just > drop it. >
You're right: it's POST not GET: if (params = Object.toQueryString(params)) { if (this.method == 'get') this.url += (this.url.include('?') ? '&' : '?') + params; else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) params += '&_='; } But it's not empty POST bodies as it's only added if params != "". I don't know which version of Safari it is because I cannot find any documentation about it and it's a real pain to install an old version of safari. The extra parameter is there to catch garbage that Safari would add to the end of a POST body. This way the garbage is in the extra parameter not in the important parameters. By accident I stored the extra parameter in the database of my webapp. I have 20000 of them in one table. None of them have a value other than the empty string(*). That's why I know that the workaround is no longer needed (or at least not that badly). Can we add a check for version 2.x of Safari for the workaround? Should this be documented? Groeten, Arjen Nienhuis (*) Well I loaded and stored the data multiple times and prototypes adds the underscore even when it's already there so I actually store things like {'foo': 2, 'bar': 5, '_': ["", "", "", "", ""]}. Yay! -- You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en