From 1af87b9140e19eb346a79fafc182d8e3b147df2e Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 11 May 2020 08:03:02 +0200 Subject: [PATCH] :bug: Fix bug on body decoding (backend). --- backend/src/uxbox/http/middleware.clj | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/src/uxbox/http/middleware.clj b/backend/src/uxbox/http/middleware.clj index 877568f8c..9e57283fd 100644 --- a/backend/src/uxbox/http/middleware.clj +++ b/backend/src/uxbox/http/middleware.clj @@ -21,9 +21,10 @@ (defn- wrap-parse-request-body [handler] - (fn [{:keys [headers body] :as request}] + (fn [{:keys [headers body method] :as request}] (let [mtype (get headers "content-type")] - (if (= "application/transit+json" mtype) + (if (and (= "application/transit+json" mtype) + (not= method :get)) (try (let [params (t/decode (t/buffer->bytes body))] (handler (assoc request :body-params params)))