mirror of
https://github.com/jquery/jquery.git
synced 2026-02-05 18:45:19 -05:00
Fixes #7881. Setting contentType to false will prevent the Content-Type header from being sent. Unit test added.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user