96b0c3f1fa
Before this change, int() on a non-numeric Content-Length raised an unhandled ValueError, crashing the request handler. There was also no upper bound on how much memory a POST body could consume. After this change: - Non-numeric or missing Content-Length returns HTTP 400. - Negative Content-Length returns HTTP 400. - Bodies declared larger than 1 MiB (_MAX_BODY_BYTES) return HTTP 413, matching the cap already in supervise_server.py. Closes #138