From b924e3a03dc267321eefdc270e91c3efacfb6ca1 Mon Sep 17 00:00:00 2001 From: ralf Date: Fri, 26 Jan 2024 12:53:22 +0200 Subject: [PATCH] * REST API: also log requests with Content-Type 'application/json' not just 'text/*' --- api/src/CalDAV.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/CalDAV.php b/api/src/CalDAV.php index d230725795..319d116a8c 100644 --- a/api/src/CalDAV.php +++ b/api/src/CalDAV.php @@ -2351,7 +2351,8 @@ class CalDAV extends HTTP_WebDAV_Server // do NOT log non-text attachments $this->store_request = $_SERVER['REQUEST_METHOD'] != 'POST' || !self::isFileUpload() || - substr($_SERVER['CONTENT_TYPE'], 0, 5) == 'text/'; + substr($_SERVER['CONTENT_TYPE'], 0, 5) == 'text/' || + str_starts_with($_SERVER['CONTENT_TYPE'], 'application/json'); } // unconditionally start output-buffering to fix problems with huge multiget reports from TB110 AB ob_start();