Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Makes prefilters and transport inspection more robust and uses better ↵ | jaubourg | 2011-01-24 | 1 | -19/+23 |
| | | | | variable names for readability. | ||||
* | Revised internal implementation of ajaxPrefilter() and ajaxTransport(). ↵ | jaubourg | 2011-01-23 | 1 | -103/+80 |
| | | | | Everything is shorter and more efficient now. Also fixes a couple spacing issues that remained. | ||||
* | More code style fixes. | jaubourg | 2011-01-23 | 1 | -7/+7 |
| | |||||
* | Apply JQuery Core Style Guidelines to ajax.js and ajax/*.js, | jaubourg | 2011-01-23 | 1 | -121/+117 |
| | |||||
* | Re-organizes ajax.js: prefilters and transports are no longer stored in ↵ | jaubourg | 2011-01-22 | 1 | -314/+261 |
| | | | | ajaxSettings (their structure is not handled correctly by extend() and was causing some overhead when constructing the final options map in ajax()); base function for ajaxPrefilter and ajaxTransport has been renamed and split in two (one for inspection, one for addition); response/dataType determination and data conversion logics have been externalized from the ajax() internal callback; data conversion no longer sets responseXXX fields; some minor re-formatting and simplifications. | ||||
* | Replaces "text in-between" technique with a full-fledged one-level ↵ | jaubourg | 2011-01-21 | 1 | -40/+65 |
| | | | | 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. | ||||
* | Moves determineResponse logic into main ajax callback. Puts responseXXX ↵ | jaubourg | 2011-01-20 | 1 | -76/+72 |
| | | | | fields definitions into ajaxSettings. | ||||
* | Renames Deferred's fire and fireReject methods as resolveWith and rejectWith ↵ | jaubourg | 2011-01-20 | 1 | -3/+3 |
| | | | | respectively. | ||||
* | Renames determineDataType as determineResponse. Makes it more generic as a ↵ | jaubourg | 2011-01-20 | 1 | -16/+15 |
| | | | | first step into integrating the logic into the main ajax done callback. Also fixes some comments in ajax/xhr.js. | ||||
* | Revises the way arguments are handled in ajax. | jaubourg | 2011-01-20 | 1 | -7/+6 |
| | |||||
* | Makes sure statusCode callbacks are ordered in the same way success and ↵ | jaubourg | 2011-01-20 | 1 | -4/+4 |
| | | | | error callbacks are. Unit tests added. | ||||
* | Cleans up and simplifies code shared by ajaxPrefilter and ajaxTransport. ↵ | jaubourg | 2011-01-20 | 1 | -110/+91 |
| | | | | Removes chainability of ajaxSetup, ajaxPrefilter and ajaxTransport. Also makes sure context is handled properly by ajaxSetup (unit test added). | ||||
* | Moves things around to make jsLint happier. | jaubourg | 2011-01-19 | 1 | -2/+2 |
| | |||||
* | Fixes crossDomain test so that it assumes port to be 80 for http and 443 for ↵ | jaubourg | 2011-01-19 | 1 | -2/+4 |
| | | | | https when it is not provided. | ||||
* | Moves determineDataType into ajaxSettings so that it is accessible to ↵ | jaubourg | 2011-01-19 | 1 | -48/+50 |
| | | | | transports without the need for a second argument and so that we can now pass the original options to the transport instead. Also ensures the original options are actually propagated to prefilters (they were not). | ||||
* | Re-adds hastily removed variable and simplifies statusCode based callbacks ↵ | jaubourg | 2011-01-19 | 1 | -15/+16 |
| | | | | handling. | ||||
* | Use undefined instead of 0 to deference transport for clarity. | jaubourg | 2011-01-19 | 1 | -1/+1 |
| | |||||
* | Removes unnecessary test and ensures getResponseHeader returns null if the ↵ | jaubourg | 2011-01-19 | 1 | -12/+7 |
| | | | | header does not exist. | ||||
* | Revised how context is determined and removed unnecessary "parameter as ↵ | jaubourg | 2011-01-19 | 1 | -12/+10 |
| | | | | variable" trick. | ||||
* | Moved ajaxSettings.xhr definition together with support.ajax and ↵ | jaubourg | 2011-01-19 | 1 | -32/+0 |
| | | | | support.cors determination into ajax/xhr.js. | ||||
* | Makes it so a prefilter can change the type of a request. | jaubourg | 2011-01-16 | 1 | -7/+7 |
| | |||||
* | Removed internal dataTypes option and added headers & crossDomain options ↵ | jaubourg | 2011-01-16 | 1 | -1/+2 |
| | | | | into commented out options of ajaxSettings. | ||||
* | Fixes #2994. Not finding a transport now fires the error callbacks and ↵ | jaubourg | 2011-01-16 | 1 | -65/+77 |
| | | | | 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. | ||||
* | Moved jQuery.ajax.prefilter and jQuery.ajax.transport to ↵ | jaubourg | 2011-01-13 | 1 | -6/+7 |
| | | | | jQuery.ajaxPrefilter and jQuery.ajaxTransport so that proxying the ajax method doesn't turn into a nightmare. Thanks go to scott_gonzalez and DaveMethvin for pointing out the issue. Also made ajaxSetup return "this" to enable chainable definitions -- jQuery.ajaxSetup(...).ajaxPrefilter(...).ajaxTransport(...). | ||||
* | Fixes #4964. Adds a statusCode object together with a new statusCode method ↵ | jaubourg | 2011-01-13 | 1 | -0/+27 |
| | | | | 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. | ||||
* | Cleans up statusText handling and simplifies 304 notmodified logic. | jaubourg | 2011-01-13 | 1 | -13/+17 |
| | |||||
* | Removes unnecessary variables and adds much needed comments into the data ↵ | jaubourg | 2011-01-13 | 1 | -6/+28 |
| | | | | conversion logic in ajax. | ||||
* | Fixes a regression by calling dataFilter with the second argument set as the ↵ | jaubourg | 2011-01-13 | 1 | -1/+1 |
| | | | | dataType. | ||||
* | Gets rid of a var statement by moving variable declarations up. | jaubourg | 2011-01-13 | 1 | -3/+4 |
| | |||||
* | AjaxSetup now uses deep extend internally to accomodate map structured options. | jaubourg | 2011-01-12 | 1 | -1/+1 |
| | |||||
* | Fixes 4825. jQuery.fn.load: use the jXHR's Promise interface to get the ↵ | jaubourg | 2011-01-11 | 1 | -5/+13 |
| | | | | actual response in case ajaxSettings contains a dataFilter. Unit test added. | ||||
* | Change embedded regexp to a variable (for #6876). | Dave Methvin | 2011-01-09 | 1 | -2/+3 |
| | |||||
* | Make it so prefilters get access to the original settings. | jaubourg | 2011-01-09 | 1 | -1/+1 |
| | |||||
* | Fixes #5955. Option crossDomain now forces ajax to consider a request as ↵ | jaubourg | 2011-01-09 | 1 | -6/+9 |
| | | | | cross-domain even when it is not. Useful for when servers issue redirects to cross-domain urls. Unit test added. | ||||
* | Make sure prefilters have been called and transport has been selected before ↵ | jaubourg | 2011-01-09 | 1 | -3/+3 |
| | | | | sending any global event (in case the "global" option has been changed). | ||||
* | Fixes #7465. Reworked the regexp and associated test for cross-domain ↵ | jaubourg | 2011-01-09 | 1 | -2/+7 |
| | | | | detection so that it now includes ports. Added cross-domain detection tests for protocol, hostname and port. | ||||
* | Fixes #7868. ResponseText is now properly propagated for error callbacks. | jaubourg | 2011-01-09 | 1 | -0/+5 |
| | |||||
* | Fixes #7881. Setting contentType to false will prevent the Content-Type ↵ | jaubourg | 2011-01-09 | 1 | -1/+1 |
| | | | | header from being sent. Unit test added. | ||||
* | Renamed "complete" to "done" in order to avoid conflicts with jXHR.complete. | jaubourg | 2011-01-06 | 1 | -2/+2 |
| | |||||
* | Cleaning up trailing whitespace again. | Colin Snover | 2011-01-05 | 1 | -122/+122 |
| | |||||
* | "then" renamed "complete" and new "then" method defined using "complete" and ↵ | jaubourg | 2011-01-05 | 1 | -2/+2 |
| | | | | "fail" internally. The API is still symetrical (complete/fail), still promotes AOP but is also now Promise/A compliant. Changed unit tests and ajax module accordingly. | ||||
* | When serializing text, encode all line breaks as CRLF pairs per the ↵ | Dave Methvin | 2010-12-31 | 1 | -2/+2 |
| | | | | application/x-www-form-urlencoded specification. Fixes #6876. | ||||
* | Revised conversion logic to handle converter equal to true properly. | jaubourg | 2010-12-31 | 1 | -14/+19 |
| | |||||
* | Introduced a new promise method on deferreds that returns an immutable ↵ | jaubourg | 2010-12-31 | 1 | -3/+4 |
| | | | | object (exposing then, fail, isResolved, isRejected and promise itself only). Remove $.isDeferred and moved logic directly into $.when. Made sure $.when returns a promise by using promise(). Used promise() in ajax code too. | ||||
* | Renamed several ajaxSettings options. Removed cors test, fixed failing cors ↵ | jaubourg | 2010-12-31 | 1 | -11/+11 |
| | | | | test. | ||||
* | Revised logic in data conversion to account for when dataFilter modifies the ↵ | jaubourg | 2010-12-31 | 1 | -2/+2 |
| | | | | dataTypes list. | ||||
* | Removed re-usability from jXHR object (no more open, send & ↵ | jaubourg | 2010-12-31 | 1 | -10/+576 |
| | | | | 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. | ||||
* | Removed dataCheckers, added true as possible value for dataConverters ↵ | jaubourg | 2010-12-31 | 1 | -27/+2 |
| | | | | indicating dataType equivalence (ie. no conversion has to be performed). | ||||
* | Changed dataConverters key format. | unknown | 2010-12-31 | 1 | -20/+5 |
| | |||||
* | Rewrote the data conversion logic in ajax. Should be cleaner and faster. | jaubourg | 2010-12-31 | 1 | -2/+2 |
| |