Feature Request: Support Http trailers in chunked transfer
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- ruby
- 领域
- networking
调研方向
阅读 RFC 7230 的第 4.1 节,然后检查 lib/net/http/generic_request.rb,尤其是 Chunker 和 GenericRequest#send_request_with_body_stream。定义调用方如何提供 trailers,并验证 chunked 编码的 body 会在 last-chunk 和最终 CRLF 之后发出 trailer-part。
由索引模型根据 Issue 内容生成。
描述
Trailers in chunked transfer are described by rfc3230-section 4.1. Net/http does not support setting trailers nor is there a way for users to implement chunked trailers on top of net/http. The grammar is (combining section 4.1 and 4.1.2):
chunked-body = *chunk
last-chunk
trailer-part
CRLF
chunk = chunk-size [ chunk-ext ] CRLF
chunk-data CRLF
chunk-size = 1*HEXDIG
last-chunk = 1*("0") [ chunk-ext ] CRLF
chunk-data = 1*OCTET ; a sequence of chunk-size octets
trailer-part = *( header-field CRLF )
When a body_stream is set and the transfer-encoding is chunked, GenericRequest#send_request_with_body_stream creates a Chunker . The Chunker correctly follows the rfc in writing out the chunks and writing the last-chunk as "0\r\n\r\n". However, there are no hooks or support for writing the trailer-part.
- 主要语言
- Ruby
- 星标
- 148
- 派生
- 95
- 平均合并
- 10 小时 54 分钟
- 30 天内合并 PR
- 4
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ruby/net-http 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 83/100
-
难度 5/5 一周以上 新手友好度 38/100
-
难度 4/5 3-5 天 新手友好度 55/100
-
难度 4/5 3-5 天 新手友好度 55/100
相似的 Issue
-
user-reported
难度 2/5 1-3 小时 新手友好度 85/100
Kong/developer.konghq.com#7316 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
TheOdinProject/curriculum#31408 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 74/100
bensheldon/good_job#1816 · 5 条评论 ·
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
notch8/utk_knapsack#148 ·