valyala/fasthttp

It is not safe to read all stream body to memory without a max size limit.

Open

#1,765 创建于 2024年4月23日

在 GitHub 查看
 (8 评论) (0 反应) (0 负责人)Go (1,755 fork)batch import
help wanted

仓库指标

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

描述

https://github.com/valyala/fasthttp/blob/57b9352ad1cc93a0aaaa72b2130e03ace8a5b118/http.go#L427 I think it would be safe to stop reading the request body into memory and return an error when it exceeds the maximum request body size. Otherwise, it may lead to an out-of-memory (OOM) error when the request body is too large.

贡献者指南