From: Christian Weiske Date: Fri, 29 Sep 2017 20:41:29 +0000 (+0200) Subject: Correctly inspect POST content type X-Git-Tag: v1.0.0~11 X-Git-Url: https://git.cweiske.de/anoweco.git/commitdiff_plain/543d68030f825b369e907fe68380b6b5597f84e3 Correctly inspect POST content type --- 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';