This patch started from the one I posted on #5022. I gradually fixed stuff more and polished the classes around the edges and eventually found out it closes many previous issues.
Summary
The Ajax mega-patch supersedes the following tickets:
- #5022, by adding a new option: 'encoding' (defaults to 'UTF-8');
- #5741, by decreasing the counter for failed requests;
- #4825, by allowing users to specify the HTTP method in either case, it is uppercased prior to making the actual request;
- #5987, by allowing users to enter the parameters as a query string or a hash object;
- #3945 (hopefully) because of the changes to the Updater;
- #4672, by allowing PUT requests to have bodies;
- #4128, by allowing multiple receivers for the Updater passed in as an array of IDs/elements;
- #3959, by correcting the MIME-type regexp to match all recommended types for JavaScript.
Backwards compatibility
It is preserved, except for the one small detail. String.toQueryParams() is changed in a way that an empty string no longer becomes a hash with an empty string property {"":undefined} - rather an empty hash. So, empty query string now becomes an empty hash. Logical, isn't it?
Unresolved Ajax issues
I plan to work on the patch more to resolve the following:
- #6352: removeHeaders option;
- #5592: Ajax.Request should work around latency problems.