From c5b66dd22102bedc30eaa232454a6fe5ea51b895 Mon Sep 17 00:00:00 2001 From: Patrik Keller Date: Sun, 16 Jan 2022 20:26:09 +0100 Subject: [PATCH] fix content-type header for urlencoded form data This commit changes the content-type header for urlencoded form data (hx-post) as proposed in #74 and #717. --- src/htmx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/htmx.js b/src/htmx.js index f575cd27..c48e67e3 100644 --- a/src/htmx.js +++ b/src/htmx.js @@ -2311,7 +2311,7 @@ return (function () { var filteredParameters = filterValues(allParameters, elt); if (verb !== 'get' && getClosestAttributeValue(elt, "hx-encoding") == null) { - headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'; + headers['Content-Type'] = 'application/x-www-form-urlencoded'; } // behavior of anchors w/ empty href is to use the current URL