Fixes #7881. Setting contentType to false will prevent the Content-Type header from being sent. Unit test added.
This commit is contained in:
parent
98c6c4b2b0
commit
69497c3fd7
3 changed files with 40 additions and 8 deletions
|
@ -559,7 +559,7 @@ jQuery.extend({
|
|||
}
|
||||
|
||||
// Set the correct header, if data is being sent
|
||||
if ( ( s.data && s.hasContent ) || options.contentType ) {
|
||||
if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
|
||||
requestHeaders[ "content-type" ] = s.contentType;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue