mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-09 13:21:42 +00:00
fix(feishu): set client_max_size on the webhook Application
Follow-up to the salvaged #54938: the bounded reader gives a proper 413 + anomaly telemetry for oversized chunked bodies; client_max_size makes aiohttp enforce the same 1 MiB cap on every other read path (#58536/#58902/#59180 pattern). Test fixture's fake Application now accepts kwargs.
This commit is contained in:
parent
a26680eb2d
commit
2bcb893d87
2 changed files with 5 additions and 2 deletions
|
|
@ -4747,7 +4747,10 @@ class FeishuAdapter(BasePlatformAdapter):
|
|||
if self._event_handler is None:
|
||||
raise RuntimeError("failed to build Feishu event handler")
|
||||
await self._hydrate_bot_identity()
|
||||
app = web.Application()
|
||||
# client_max_size backstops the bounded reader in
|
||||
# _handle_webhook_request; aiohttp then enforces the same cap on
|
||||
# every read path (#58536/#58902/#59180 pattern).
|
||||
app = web.Application(client_max_size=_FEISHU_WEBHOOK_MAX_BODY_BYTES)
|
||||
app.router.add_post(self._webhook_path, self._handle_webhook_request)
|
||||
self._webhook_runner = web.AppRunner(app)
|
||||
await self._webhook_runner.setup()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue