fix JSON format
authorChristian Weiske <cweiske@cweiske.de>
Thu, 15 Sep 2016 16:06:21 +0000 (18:06 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 15 Sep 2016 16:06:21 +0000 (18:06 +0200)
www/micropub.php

index e028782695fa5ea686b464fa2f125763eb620984..b76d997f609285ed867188f220407692d66f2ae9 100644 (file)
@@ -211,8 +211,8 @@ if ($_SERVER['REQUEST_METHOD'] == 'GET') {
         $json = $base;
         $json->properties = (object) $data;
         handleCreate($json, $token);
-    } else if ($ctype == 'application/javascript') {
-        $input = file_get_contents('php://stdin');
+    } else if ($ctype == 'application/json') {
+        $input = file_get_contents('php://input');
         $json  = json_decode($input);
         if ($json === null) {
             mpError(