HTTP3 数据帧 不携带 Content-Lenght 头,导致无法使用 ngx.req.read_body() 模块

38 views
Skip to first unread message

jet li

unread,
Jun 18, 2024, 11:24:38 PMJun 18
to openresty
升级NGINX支持HTTP3版本即1.25.3.1 ,调用 read_body() 模块,想获取 POST 请求数据,以便对请求的数据进行安全规则过滤,即用lua实现软waf功能,遇到了错误,如下:

http3 requests are not supported without content-length header

lua_need_request_body on; 如果这么设置,也会报异常,会影响 http2 stream process
[warn] 44671#44671: *16 disable lua_need_request_body, since http2 read_body may break http2 stream process

我了解到,HTTP2/3 默认不会携带 Content-Lenght header,但是我还想获取POST 参数,进行过滤,各位大佬,我应该如何解决呢?


417132187

unread,
Jun 18, 2024, 11:24:52 PMJun 18
to jet li

Junlong li

unread,
Jun 18, 2024, 11:35:46 PMJun 18
to openresty
这个限制在 lua-nginx-module 的master分支去掉了。

On Wednesday, June 19, 2024 at 11:24:52 AM UTC+8 4171...@qq.com wrote:

jet li

unread,
Jun 18, 2024, 11:55:15 PMJun 18
to openresty
多谢大佬,那我用 lua-nginx-module 的master分支 重新编译openresty
Reply all
Reply to author
Forward
0 new messages