jquery/jquery — pull request #1164 by jaubourg (2013-02-08 15:50:03+00:00)
Title: Fix for #13388 that incidently fixes #11151

To fix [#13388](http://bugs.jquery.com/ticket/13388), I had to move the setting of the `responseXXX` fields into the conversion loop.

However, given we have to set the `responseText` field for errors, the cost in bytes proved quite prohibitive (even after I saved quite a bunch by refactoring around a bit). Then came the idea of calling the conversion logic even for errors. That way, the `responseText` field would be set for errors for a cost of 0 bytes. Also, as an added bonus, this would set all `responseXXX` fields which the error body could/should be converted to.

I remembered [#11151](http://bugs.jquery.com/ticket/11151) and the fact that having ajax convert the error body is something I'm asked about/for at every single conference. So I added a `responseJSON` field and I made sure the `dataFilter` is never called in that situation (would have been a major backward incompatibility). Now, whenever you have an error body with a content-type corresponding to one or our dataType, the corresponding `responseXXX` field will be set (see [this unit test](https://github.com/jquery/jquery/blob/c0c38adc1e4a1e5567312132fec8dbf4b0f63e03/test/unit/ajax.js#L1425)).

In the end, this fixes a bug and adds a feature while staying backward compatible all this for a mere 16 bytes.

Awaiting @gibson042's look to see if we can save more (it's the setting of `isSuccess` outside of the if condition that makes most of the size increase for reasons I don't really get :/).