Fixes a bug that prevented headers from being set in an ajaxSend callback. Unit test modified.
This commit is contained in:
parent
0c21c83e96
commit
a2dbdc1f54
2 changed files with 14 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue