diff --git a/plugins/platforms/sms/adapter.py b/plugins/platforms/sms/adapter.py index 1646b1b5956..04bf8e2a864 100644 --- a/plugins/platforms/sms/adapter.py +++ b/plugins/platforms/sms/adapter.py @@ -119,7 +119,10 @@ class SmsAdapter(BasePlatformAdapter): self._webhook_port, ) - app = web.Application() + # client_max_size bounds every read path — including chunked bodies + # with no Content-Length — before the handler's own 413 checks run + # (#58536/#58902/#59180 pattern). + app = web.Application(client_max_size=_TWILIO_WEBHOOK_MAX_BODY_BYTES) app.router.add_post("/webhooks/twilio", self._handle_webhook) app.router.add_get("/health", lambda _: web.Response(text="ok"))