aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax.js
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2011-02-07 16:35:32 +0100
committerjaubourg <j@ubourg.net>2011-02-07 16:35:32 +0100
commita2dbdc1f5438a857c2a9898bd36e4b2de685742e (patch)
treec90de9e616fd53ee38987955893df510b1d587d2 /src/ajax.js
parent0c21c83e9691a08151f23a2c594568b07009f063 (diff)
downloadjquery-a2dbdc1f5438a857c2a9898bd36e4b2de685742e.tar.gz
jquery-a2dbdc1f5438a857c2a9898bd36e4b2de685742e.zip
Fixes a bug that prevented headers from being set in an ajaxSend callback. Unit test modified.
Diffstat (limited to 'src/ajax.js')
-rw-r--r--src/ajax.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ajax.js b/src/ajax.js
index 4830e3df8..2b6b80f90 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -684,8 +684,7 @@ jQuery.extend({
if ( !transport ) {
done( -1, "No Transport" );
} else {
- // Set state as sending
- state = jqXHR.readyState = 1;
+ jqXHR.readyState = 1;
// Send global event
if ( fireGlobals ) {
globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
@@ -698,6 +697,7 @@ jQuery.extend({
}
try {
+ state = 1;
transport.send( requestHeaders, done );
} catch (e) {
// Propagate exception as error if not done