1
0
mirror of git://f0xx.org/ac/ac-ms-graphs synced 2026-07-29 03:19:13 +03:00

fix(graphs): accept gzip session uploads from mobile client

Use read_crash_upload_body() so graph_upload matches CrashUploadClient Content-Encoding: gzip.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyeu
2026-07-10 22:12:02 +02:00
parent edd77dc3f0
commit 1279159fd4

View File

@@ -2,10 +2,13 @@
declare(strict_types=1);
require_once __DIR__ . '/../../src/bootstrap.php';
$raw = file_get_contents('php://input');
if ($raw === false || $raw === '') {
$raw = read_crash_upload_body();
if ($raw === null) {
json_out(['ok' => false, 'error' => 'empty body'], 400);
}
if ($raw === false) {
json_out(['ok' => false, 'error' => 'invalid gzip body'], 400);
}
$data = json_decode($raw, true);
if (!is_array($data)) {
json_out(['ok' => false, 'error' => 'invalid json'], 400);