From 9c607b80aeacb6c0e266aed20a1ba70ebec45081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yrj=C3=A4n=C3=A4=20Rankka?= Date: Fri, 6 Sep 2019 18:41:41 +0200 Subject: [PATCH] Don't attempt to parse body when content-type is NIL --- v1-compat/src/core/request.lisp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v1-compat/src/core/request.lisp b/v1-compat/src/core/request.lisp index 550f773b..193677f6 100644 --- a/v1-compat/src/core/request.lisp +++ b/v1-compat/src/core/request.lisp @@ -181,7 +181,8 @@ on an original raw-body." (setf (getf env :raw-body) (slot-value req 'raw-body)) ;; POST parameters - (unless (slot-boundp req 'body-parameters) + (unless (or (null (content-type req)) + (slot-boundp req 'body-parameters)) (setf (slot-value req 'body-parameters) (parse (content-type req) (content-length req) (raw-body req))) (file-position (raw-body req) 0)