diff options
author | jaubourg <j@ubourg.net> | 2011-01-09 04:28:42 +0100 |
---|---|---|
committer | jaubourg <j@ubourg.net> | 2011-01-09 04:28:42 +0100 |
commit | 69497c3fd7ff560be0e47b4c65076915cca756bc (patch) | |
tree | db0b9a32600b201098d09c7ec5579cd5b7469235 /src/ajax.js | |
parent | 98c6c4b2b0afb2754883fc39c5626da3219e81e0 (diff) | |
download | jquery-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.js | 2 |
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; } |