Document http.maxRequestBodySize (REST, MCP application endpoint, and operations API body limits)
维护者通常 4 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 88/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
调研方向
从 reference/configuration/options.md 开始,根据 issue 中描述的默认值和继承行为,记录 http.maxRequestBodySize 和 operationsApi.network.maxRequestBodySize。然后,将 MCP 请求体限制说明添加到 reference/mcp/overview.md,并查看现有速率限制说明的位置以确定放置位置。准确记录全部三个强制执行点以及所述版本注意事项后,即为完成。
由索引模型根据 Issue 内容生成。
描述
Re-verified on harper
maina7dae444c (2026-10-26). Correction to the version note below: MCP application-endpoint enforcement merged as harper#3398 on 2026-10-26 and ships in 5.4; the v5.3 cherry-pick (harper#3536) is still open, so say "5.4 (and 5.3.x once #3536 ships)" rather than 5.3.1. Re-checked against harper main a7dae444c: the three enforcement points are unchanged. Related: harper#3397 (bound the discard of a rejected body).
What is missing
http.maxRequestBodySize does not appear anywhere in the documentation tree (git grep -i maxrequestbody at origin/main 34b029d9 → 0 hits). reference/configuration/options.md:156 lists the operationsApi: block without network.maxRequestBodySize; reference/mcp/configuration.md and reference/mcp/overview.md say nothing about a request-body limit.
What the code does (harper main 0c94b150b)
One option, three enforcement points:
- REST / any
streamToBufferreader —server/serverHelpers/contentTypes.ts:618readshttp_maxRequestBodySize(default 10,000,000 bytes);:626-634answers 413Request body too large, maximum size is N bytes. - MCP application endpoint — since PR #3398 (
f0f4e5007, 5.3.1):components/mcp/adapters/harperHttp.ts:68,117-137refuses a declaredContent-Lengthover the limit before any byte arrives and a streamed body once the running count exceeds it, 413{"error":"payload_too_large","message":…}. - Operations API — Fastify
bodyLimitfromoperationsApi.network.maxRequestBodySize(server/operationsServer.ts:50,368, default 1 GiB), whichconfig/configUtils.ts:1228fills fromhttp.*whenever theoperationsApi.networkblock exists — and the shippedstatic/defaultConfig.yaml:62-69always ships that block. So settinghttp.maxRequestBodySizealso caps the operations API unlessoperationsApi.network.maxRequestBodySizeis set separately.
Measured (SQA-73/SQA-74): with http.maxRequestBodySize: 65536, a REST PUT, an MCP POST on the application port and an MCP POST on the operations port all refuse at 65,537 bytes; with it unset, the operations port accepts up to 1 GiB.
Suggested content
In reference/configuration/options.md, under http: maxRequestBodySize — bytes, default 10000000; applies to REST and custom resources, and to the MCP application endpoint (5.3.1+); exceeding it returns 413. Under operationsApi.network: maxRequestBodySize — default inherits http.maxRequestBodySize when set, otherwise 1 GiB. One line in reference/mcp/overview.md beside the existing note that global rate limiting does not apply to MCP, stating that the body limit does.
Existing work checked
HarperFast/documentation issues and PRs searched for maxRequestBodySize and body size: nothing (open docs PRs #745, #739, #734 are credential masking, full-text paging, MCP subscribe). harper 1,500 issues + 800 PRs and harper-pro 349 + 768 titles: PR #3398 (merged) and harper#3397 (open, discard bound) name the key only in code terms; #3398 cites components/mcp/DESIGN.md, not the docs repo.
What this does not prove
A docs change in flight on a branch other than origin/main as of 34b029d9 (fetched 2026-10-26T04:10Z); the operations-port fallback for a hand-edited config with no operationsApi.network block (source read only, not measured).
- 主要语言
- MDX
- 星标
- 9
- 派生
- 9
- 平均合并
- 5 天 5 小时
- 30 天内合并 PR
- 48
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
HarperFast/documentation 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
HarperFast/documentation#803 ·
维护者通常 4 天内回复
-
content
难度 2/5 1-3 小时 新手友好度 65/100
HarperFast/documentation#785 ·
维护者通常 4 天内回复
-
content
难度 2/5 半天 新手友好度 68/100
HarperFast/documentation#770 ·
维护者通常 4 天内回复
-
content
难度 2/5 1-3 小时 新手友好度 74/100
HarperFast/documentation#769 ·
维护者通常 4 天内回复
-
难度 1/5 1 小时以内 新手友好度 76/100
HarperFast/documentation#768 ·
维护者通常 4 天内回复
查看 HarperFast/documentation 的全部 Issue
相似的 Issue
-
[Sync EN] stream: document the errors of the stream_context_*() and stream filter functions (#6091)未关闭sync-en
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
Documentation: Resolve Doxygen section label collision, ref parsing, and parameter warnings可能已有人在做 @patelshivani2283-lab 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
external
难度 1/5 1 小时以内 新手友好度 82/100
langchain-ai/docs#7808 ·
维护者通常 1 天内回复
-
ACK_WAITING HELP_WANTED UPDATE_CS
难度 2/5 1-3 小时 新手友好度 76/100
OWASP/CheatSheetSeries#3000 ·
维护者通常 1 天内回复
-
needs triage 📥
难度 2/5 1-3 小时 新手友好度 72/100
ethereum/ethereum-org-website#19804 ·
维护者通常 1 天内回复