Allow DELETE requests to have a content body, and properly serialize data to the url for HEAD requests. Fixes #7285.
This commit is contained in:
parent
974b5aeab7
commit
09022e0b09
2 changed files with 30 additions and 4 deletions
|
@ -289,6 +289,32 @@ test("jQuery.ajax - xml: non-namespace elements inside namespaced elements", fun
|
|||
});
|
||||
});
|
||||
|
||||
test("jQuery.ajax - HEAD requests", function() {
|
||||
expect(2);
|
||||
|
||||
stop();
|
||||
jQuery.ajax({
|
||||
url: url("data/name.html"),
|
||||
type: "HEAD",
|
||||
success: function(data, status, xhr){
|
||||
var h = xhr.getAllResponseHeaders();
|
||||
ok( /Date/i.test(h), 'No Date in HEAD response' );
|
||||
|
||||
jQuery.ajax({
|
||||
url: url("data/name.html"),
|
||||
data: { whip_it: "good" },
|
||||
type: "HEAD",
|
||||
success: function(data, status, xhr){
|
||||
var h = xhr.getAllResponseHeaders();
|
||||
ok( /Date/i.test(h), 'No Date in HEAD response with data' );
|
||||
start();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
test("jQuery.ajax - beforeSend", function() {
|
||||
expect(1);
|
||||
stop();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue