Commit Graph

119 Commits

Author SHA1 Message Date
jaubourg
d2384ad03a Removed errorThrown test for 404 responses seeing as Safari 3.x XHR sets the statusText as "OK" rather than "Not Found". 2011-01-31 11:14:38 +01:00
jaubourg
945ac0d0b1 Simplifies the unit test for #8082. 2011-01-29 03:08:18 +01:00
jaubourg
85a195c6d5 Fixes #8082. Text to script converter now returns text. Unit test added. 2011-01-29 01:39:22 +01:00
jaubourg
0e5b341cc0 Fixes #5856. Adds document protocol at the beginning of URLs without protocol (thanks go to skrings for the initial pull request). Simplifies cross-domain detection regexp and logic as a consequence. Also took the opportunity to remove an unused variable. Unit test added. 2011-01-26 01:36:05 +01:00
jaubourg
325dcdc2ab Fixes #8054 by reverting feature enhancement 5812 (4920). Regexps no longer searches for %3F in url or data to find jsonp callback placeholders. 2011-01-26 00:55:39 +01:00
jaubourg
5ca8f0617f Reworks how values of parameters passed to error callbacks are determined. Fixes #8050. 2011-01-25 16:08:19 +01:00
jaubourg
dc2e7317a9 Replaces "text in-between" technique with a full-fledged one-level transitive search for converters (unit tests added). Also cleans up auto dataType determination and adds converter checks in order to guess the best dataType possible. 2011-01-21 03:58:28 +01:00
jaubourg
9ab00a712f Makes sure statusCode callbacks are ordered in the same way success and error callbacks are. Unit tests added. 2011-01-20 15:39:30 +01:00
jaubourg
64e1cdbb95 Cleans up and simplifies code shared by ajaxPrefilter and ajaxTransport. Removes chainability of ajaxSetup, ajaxPrefilter and ajaxTransport. Also makes sure context is handled properly by ajaxSetup (unit test added). 2011-01-20 04:12:15 +01:00
jaubourg
96b00a4935 Moves active counter test after all other ajax tests where it should be. 2011-01-19 18:44:21 +01:00
Colin Snover
e78d3a7e2d Merge in data_nocollide branch. Fixes #6968, improves unit testing framework checks for leaky stuff. 2011-01-17 15:31:43 -06:00
jaubourg
cfca6d3836 Fixed the ajax test regarding the jsonp option set to false and added a test to control the prefilter actually does not tamper with the url. 2011-01-16 05:36:20 +01:00
jaubourg
0e93b2e24c Revised jsonp unit tests and added a test for when the jsonp option is set to false. 2011-01-16 05:27:16 +01:00
jaubourg
8ab23aec2c Fixes #2994. Not finding a transport now fires the error callbacks and doesn't make ajax return false. Had to revise how jsonp and script prefilters & transports work (better separation of concerns). Also took the opportunity to revise jXHR getRequestHeader and abort methods and enabled early transport garbage collection when the request completes. 2011-01-16 02:57:39 +01:00
jaubourg
44fc87f66c Fixes #4964. Adds a statusCode object together with a new statusCode method on the jXHR object (deferred behaviour). They accept a map of statusCode/callback(s). Callbacks are fired when the status code of the response correponds to the key (as a success or an error callback depending on how the request completed). Unit tests added. 2011-01-13 17:01:25 +01:00
jaubourg
0c51e9d55f Fixes #4897. Added ?? as a context-insensitive placeholder for the callback name of a JSONP request. Unit tests provided. 2011-01-12 18:36:00 +01:00
jaubourg
f83cdc3c4c Yet another missing semicolon! 2011-01-11 23:43:02 +01:00
jaubourg
6504d4f700 Fixes #6230. Added a unit test to control that, since the ajax rewrite, setting the Accept header actually replaced the previous value and didn't append to it (tested in Safari 4.0.4 for which the problem was specifically reported). 2011-01-11 23:01:18 +01:00
jaubourg
5a721cf31b Fixes 4825. jQuery.fn.load: use the jXHR's Promise interface to get the actual response in case ajaxSettings contains a dataFilter. Unit test added. 2011-01-11 20:02:33 +01:00
jaubourg
84319aa4a3 Fixes a race condition in JSONP Local test. 2011-01-10 00:52:20 +01:00
Colin Snover
e2941d5a98 Update unit tests with a leak detection mechanism for the various jQuery globals and fix all leaks in the tests. 2011-01-09 15:58:47 -06:00
jaubourg
8c8bd3bf6a Fixes #5812. =? will be detected even when it has been escaped during data serialization. 2011-01-09 21:48:52 +01:00
jaubourg
7bc5386230 Simplified cross-domain detection tests. 2011-01-09 17:27:29 +01:00
jaubourg
5a5f67800b Fixes #5955. Option crossDomain now forces ajax to consider a request as cross-domain even when it is not. Useful for when servers issue redirects to cross-domain urls. Unit test added. 2011-01-09 16:50:13 +01:00
jaubourg
63487505c6 Added a test for retrying a request on error using jQuery.ajax(this). Works as intended. Fixes #7461. 2011-01-09 06:19:27 +01:00
jaubourg
afefb4f3d2 Fixes #7465. Reworked the regexp and associated test for cross-domain detection so that it now includes ports. Added cross-domain detection tests for protocol, hostname and port. 2011-01-09 06:01:00 +01:00
jaubourg
d515068ee8 Fixes #7868. ResponseText is now properly propagated for error callbacks. 2011-01-09 04:53:29 +01:00
jaubourg
69497c3fd7 Fixes #7881. Setting contentType to false will prevent the Content-Type header from being sent. Unit test added. 2011-01-09 04:28:42 +01:00
jaubourg
368f2441f6 Added missing commas. 2011-01-07 15:52:58 +01:00
Colin Snover
e56de77df9 Cleaning up trailing whitespace again. 2011-01-05 15:44:07 -06:00
Dave Methvin
eed3803c98 When serializing text, encode all line breaks as CRLF pairs per the application/x-www-form-urlencoded specification. Fixes #6876. 2010-12-31 13:56:51 -06:00
jaubourg
6165cc45b7 Renamed several ajaxSettings options. Removed cors test, fixed failing cors test. 2010-12-31 04:15:09 +01:00
jaubourg
981d1e08eb Removed re-usability from jXHR object (no more open, send & onreadystatechange support). Streamlined the implementation and put it back into ajax.js (removed xhr.js in the process). Went back to a more simple & direct approach to options handling (keeping much room to further minification-related optimizations). Code is cleaner, smaller & faster. Removed & edited unit tests accordingly. All build files have had xhr.js removed. 2010-12-31 04:13:40 +01:00
unknown
22e28b01e6 Changed dataConverters key format. 2010-12-31 04:05:52 +01:00
Colin Snover
3e0cc81504 Clean trailing whitespace from all files. 2010-12-30 00:34:48 -06:00
jaubourg
974637d639 Simplified headers tests: removed multiline headers (support is far too servers & browsers dependant) and made all the tests in a single request. 2010-12-11 02:41:39 +01:00
jaubourg
0b0889ceaa Tweaked the headers test to be apache independent and actually work. 2010-12-11 02:21:54 +01:00
jaubourg
9fa9a57076 Changed document.location to window.location per Ben Alman advice. 2010-12-10 07:00:06 +01:00
jaubourg
9b9d270e3d Removed non-standard (and not that useful) xhr emulation methods & reworked the headers test as a consequence. 2010-12-10 02:45:08 +01:00
jaubourg
ab3ba4a812 Rewrite of the Ajax module by Julian Aubourg. Some (dated) details can be found here: http://oksoclap.com/6Y26bm1ZsB more details are forthcoming. Fixes #7195. 2010-12-09 13:34:28 -05:00
John Resig
6c68124928 Merge branch 'bug7531' of https://github.com/csnover/jquery into csnover-bug7531 2010-12-06 17:22:02 -05:00
Anton M
a2c2d68d7f Add unit test for fix to #7578. 2010-11-24 23:35:26 +01:00
Colin Snover
2a0c7d702b Coerce s.url to string before calling replace, since replace is also a method of a Location object. Fixes #7531. 2010-11-17 00:59:24 -06:00
Colin Snover
e57b73a0ac Ensure that AJAX requests are actually aborted in all browsers. Fix #7422. 2010-11-06 13:52:30 -05:00
John Resig
de58db0cdf Backing out fix for #5803 from 3b50eaca2c. 2010-10-25 17:54:27 -07:00
dmethvin
09022e0b09 Allow DELETE requests to have a content body, and properly serialize data to the url for HEAD requests. Fixes #7285. 2010-10-25 13:06:02 -07:00
rwldrn
3b50eaca2c Fixes #7229 and #5803 2010-10-24 12:18:33 -04:00
jeresig
ec462a33af Fix broken Ajax test after recent revert to jQuery.ajax namespace. 2010-10-13 00:07:52 -04:00
jeresig
26db3f0933 Disable 304/Not Modified Ajax tests in Opera due to lack of suitable workaround. See: http://gist.github.com/599419 2010-10-10 18:46:32 -04:00
John Resig
57c046f91c Tweak broken serialize tests from commit 879799fe95. Thanks to @jaubourg for the catch. 2010-09-30 15:40:30 -07:00