]> source.dussan.org Git - jquery.git/commit
Ajax: Overwrite s.contentType with content-type header value, if any
authorChristian Wenz <christian@wenz.org>
Mon, 6 Apr 2020 19:15:55 +0000 (21:15 +0200)
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Mon, 6 Apr 2020 19:19:25 +0000 (21:19 +0200)
commit065143c2e93512eb0c82d1b344b71d06eb7cf01c
tree37d258ea3c8092219ddd870608db70a2054d6ded
parent1a4f10ddc37c34c6dc3a451ee451b5c6cf367399
Ajax: Overwrite s.contentType with content-type header value, if any

This fixes the issue of "%20" in POST data being replaced with "+"
even for requests with content-type different from
"application/x-www-form-urlencoded", e.g. for "application/json".

Fixes gh-4119
Closes gh-4650

(cherry picked from 7fb90a6beaeffe16699800f73746748f6a5cc2de)

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
Co-authored-by: Michał Gołębiowski-Owczarek <m.goleb@gmail.com>
src/ajax.js
test/unit/ajax.js