valyala/fasthttp

Chunked response with trailer result in "cannot find crlf at the end of chunk" error

已关闭

#1,078 创建于 2021年8月21日

 (1 条评论) (1 个反应) (0 位负责人)Go (1,755 个派生)batch import
help wanted

仓库指标

星标
 (21,741 个星标)
PR 合并指标
 (平均合并 3天) (30 天内合并 44 个 PR)

描述

Hello,

While using fasthttp.Client to talk to a server that produce chunked response with trailer headers I see "cannot find crlf at the end of chunk" error. I suspects that this happens because fasthttp's implementation does not expect to see trailer headers after the last chunk, which is not according to chunked transfer coding spec.

This can ideally be fixed by adding https://github.com/valyala/fasthttp/issues/210. Otherwise readBodyChunked need to be mindful of trailers.

Let me know if I should produce an example.

Regards.

贡献者指南