File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ var // Document location
7
7
rheaders = / ^ ( .* ?) : [ \t ] * ( [ ^ \r \n ] * ) \r ? $ / mg, // IE leaves an \r character at EOL
8
8
// #7653, #8125, #8152: local protocol detection
9
9
rlocalProtocol = / ^ (?: a b o u t | a p p | a p p \- s t o r a g e | .+ \- e x t e n s i o n | f i l e | r e s | w i d g e t ) : $ / ,
10
- rnoContent = / ^ (?: G E T | H E A D ) $ / ,
10
+ rnoContent = / ^ (?: G E T | H E A D | D E L E T E ) $ / ,
11
11
rprotocol = / ^ \/ \/ / ,
12
12
rquery = / \? / ,
13
13
rscript = / < s c r i p t \b [ ^ < ] * (?: (? ! < \/ s c r i p t > ) < [ ^ < ] * ) * < \/ s c r i p t > / gi,
Original file line number Diff line number Diff line change @@ -840,6 +840,21 @@ test("jQuery.ajax - HEAD requests", function() {
840
840
841
841
} ) ;
842
842
843
+
844
+ test ( "jQuery.ajax - DELETE requests" , function ( ) {
845
+ expect ( 1 ) ;
846
+
847
+ jQuery . ajax ( {
848
+ url : "devo.html" ,
849
+ type : "DELETE" ,
850
+ data : { "whip" : "it" , "qty" : "good" } ,
851
+ beforeSend : function ( _ , s ) {
852
+ equal ( s . url , "devo.html?whip=it&qty=good" , "Delete requests encode data in URL" ) ;
853
+ return false ;
854
+ }
855
+ } ) ;
856
+ } ) ;
857
+
843
858
test ( "jQuery.ajax - beforeSend" , function ( ) {
844
859
expect ( 1 ) ;
845
860
stop ( ) ;
You can’t perform that action at this time.
0 commit comments