mirror of
https://github.com/itsPLK/ps5-payload-manager.git
synced 2026-10-19 02:19:53 -05:00
- repository.c: switch item parsing to heap allocation to avoid stack overflow with large icon/JSON fields; properly free on all error paths - repository.c: heap-allocate icon and json_buf in write_payload_details_json to avoid ~57KB stack frame; free on all early-return paths - sources.c: heap-allocate icon_e buffer per payload iteration; fix sizeof misuse on pointer (was always 8); add source URL to repository list JSON output - http_server.c: switch small-response routes to alloc_response_buffer_small to reduce per-request heap usage; fix MHD_RESPMEM_PERSISTENT misuse on stack buf - main.c: break instead of returning failure when SIGKILL fails (continue cleanup) - frontend/mock-server.js: sync mock responses with updated JSON schema (url field) - details/: add payload detail markdown files for repository entries - test_repo.json, serve.py: add local test repository for development
12 lines
361 B
Python
12 lines
361 B
Python
import http.server
|
|
import socketserver
|
|
|
|
class CORSHTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
|
|
def end_headers(self):
|
|
self.send_header('Access-Control-Allow-Origin', '*')
|
|
super().end_headers()
|
|
|
|
with socketserver.TCPServer(("", 8000), CORSHTTPRequestHandler) as httpd:
|
|
print("Serving at port 8000")
|
|
httpd.serve_forever()
|