From 543d68030f825b369e907fe68380b6b5597f84e3 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 29 Sep 2017 22:41:29 +0200 Subject: [PATCH] Correctly inspect POST content type --- www/micropub.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/micropub.php b/www/micropub.php index b76d997..eff6ea7 100644 --- a/www/micropub.php +++ b/www/micropub.php @@ -165,7 +165,8 @@ if ($_SERVER['REQUEST_METHOD'] == 'GET') { 'Content-Type header missing.' ); } - $ctype = $_SERVER['CONTENT_TYPE']; + list($ctype) = explode(';', $_SERVER['CONTENT_TYPE'], 2); + $ctype = trim($ctype); if ($ctype == 'application/x-www-form-urlencoded') { if (!isset($_POST['action'])) { $_POST['action'] = 'create'; -- 2.30.2