Files
ps5-webkit-autoloader/include/http_server.h
T
najdek 653d3f359d feat: detect and repair corrupted WebKit cache with clear-and-retry flow
When AppCache download fails due to corrupted on-disk WebKit data, the
installer page detects the failure and presents a prompt offering to wipe the
current user's webkit data (/user/home/<userid>/webkit/shell/) and retry.

- Add webkit_cleaner module to safely wipe webkit/shell for the foreground user
- Add /clear-webkit-data and /exit HTTP server routes and lifecycle handling
- Pass uid parameter to the installer page to display the exact target path
- Support one-shot retry (?retry=1) with persistent error reporting and clean exit
- Add corruption simulation build modes (SIMULATE=1|2) and helper script for testing
2026-08-16 02:37:51 +02:00

20 lines
781 B
C

#pragma once
#include <microhttpd.h>
#include <stdatomic.h>
/* Shared flag — set to 0 by a successful /install or /exit, read by the main loop. */
extern atomic_int http_keep_running;
/* Set to 1 only when /install succeeds so shutdown knows to notify success. */
extern atomic_int install_completed;
/* Set to 1 by /clear-webkit-data, read by main loop to re-launch browser. */
extern atomic_int webkit_data_cleared;
/* MHD request handler callback — dispatches all routes. */
enum MHD_Result http_on_request(void *cls, struct MHD_Connection *conn,
const char *url, const char *method,
const char *version, const char *upload_data,
size_t *upload_data_size, void **con_cls);