aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax.js
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2011-01-09 04:28:42 +0100
committerjaubourg <j@ubourg.net>2011-01-09 04:28:42 +0100
commit69497c3fd7ff560be0e47b4c65076915cca756bc (patch)
treedb0b9a32600b201098d09c7ec5579cd5b7469235 /src/ajax.js
parent98c6c4b2b0afb2754883fc39c5626da3219e81e0 (diff)
downloadjquery-69497c3fd7ff560be0e47b4c65076915cca756bc.tar.gz
jquery-69497c3fd7ff560be0e47b4c65076915cca756bc.zip
Fixes #7881. Setting contentType to false will prevent the Content-Type header from being sent. Unit test added.
Diffstat (limited to 'src/ajax.js')
-rw-r--r--src/ajax.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ajax.js b/src/ajax.js
index 7988ab1ef..a814d80be 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -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;
}