valyala/fasthttp

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

クローズ

#1,078 opened on 2021/08/21

 (1 件のコメント) (1 件のリアクション) (0 人の担当者)Go (1,755 件のフォーク)batch import
help wanted

Repository metrics

Stars
 (21,741 個のスター)
PR merge metrics
 (平均マージ 3d) (30d で 44 merged PRs)

説明

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.

コントリビューターガイド