Skip to content

Commit f089027

Browse files
committed
grab pod count from the POST vars instead of headers
1 parent 8f4c6fe commit f089027

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

‎lib/Routes/SolidStorageProvider.php‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ public static function respondToPodCount()
4040
header("HTTP/1.1 404 Not found");
4141
exit();
4242
}
43-
if (!isset($_SERVER['HTTP_POD_COUNT_KEY'])) {
44-
header("HTTP/1.1 404 Not found");
45-
exit();
46-
}
47-
if ($_SERVER['HTTP_POD_COUNT_KEY'] !== POD_COUNT_KEY) {
48-
header("HTTP/1.1 400 Bad Request");
49-
exit();
50-
}
51-
43+
$podCountKey = $_POST['POD_COUNT_KEY'] ?? null;
44+
if (!isset($podCountKey)) {
45+
header("HTTP/1.1 404 Not found");
46+
exit();
47+
}
48+
if ($podCountKey !== POD_COUNT_KEY) {
49+
header("HTTP/1.1 400 Bad Request");
50+
exit();
51+
}
5252
$podCount = StorageServer::getPodCount();
5353
$responseData = array(
5454
"count" => $podCount

0 commit comments

Comments
 (0)