Correct repeated Transfer-Encoding and Content-Length response framing
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 52/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- rust
- 领域
- networking
调研方向
从 src/http_proxy.rs 开始,阅读 header_field、content_length、is_transfer_encoding_chunked 和 response_body,然后跟踪由 #23 引入的 response pump。为重复和格式错误的 Transfer-Encoding 与 Content-Length 情况添加响应侧覆盖,包括每种情况后面都跟随一个 keep-alive response。完成标准是 framing、拒绝行为和 response 对应关系符合每一项验收标准。
由索引模型根据 Issue 内容生成。
描述
Follow-up from the post-merge review of #23.
Problem
The new HTTP/1 response pump uses header_field, which returns only the first field with a given name. Response framing therefore does not correctly handle repeated Transfer-Encoding or Content-Length fields.
Examples:
Transfer-Encoding: gzipfollowed byTransfer-Encoding: chunkedis validly terminated by chunked framing, but the proxy sees only the first field and treats the response as read-to-close.- Conflicting Content-Length fields are not rejected.
- A malformed first Content-Length becomes indistinguishable from no framing and is treated as read-to-close.
On keep-alive connections this can consume subsequent responses as part of the preceding body, break request/response correspondence, or stall until the upstream closes.
Location
src/http_proxy.rs:header_field,content_length,is_transfer_encoding_chunked, andresponse_body- Response pump introduced by #23.
Acceptance criteria
- Combine all Transfer-Encoding field values in wire order and frame as chunked only when the final coding is
chunked. - Validate every Content-Length occurrence, including comma-list normalization where supported; reject conflicting or malformed values.
- Define and test behavior when Transfer-Encoding and Content-Length coexist in a response.
- Add response-side tests for:
- repeated TE ending in chunked;
- repeated TE not ending in chunked;
- identical repeated CL;
- conflicting CL;
- malformed CL;
- each case followed by another keep-alive response to verify correspondence.
- 主要语言
- Rust
- 星标
- 1
- 派生
- 0
- 平均合并
- 19 小时 12 分钟
- 30 天内合并 PR
- 13
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
HarperFast/symphony 的其他 Issue
-
Don't route to a restarted upstream until it serves, not just accepts可能已有人在做 @kriszyp 于 5 天前认领。 未关闭
HarperFast/symphony#84 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Forward to a peer when the local upstream connect fails on a TLS-terminating failover route可能已有人在做 @kriszyp 于 5 天前认领。 未关闭
HarperFast/symphony#83 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
HarperFast/symphony#80 ·
维护者通常 1 天内回复
-
Forward a connection to a peer when its local upstream connect fails可能已有人在做 @kriszyp 于 5 天前认领。 未关闭
HarperFast/symphony#79 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
HarperFast/symphony#77 ·
维护者通常 1 天内回复
查看 HarperFast/symphony 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 73/100
quarto-dev/q2#1155 ·
维护者通常 1 天内回复
-
backlog priority: low ui
难度 2/5 1-3 小时 新手友好度 65/100
storytold/vectorcraft#6445 · 1 条评论 ·
维护者通常 1 天内回复
-
area: cli kind:docs priority: P3
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
tursodatabase/libsql#2312 ·
维护者通常 11 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
paritytech/trie#251 ·
维护者通常 1 天内回复