body_filter_by_lua breaks APIs in other contexts in anything greater then 1.19
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- lua, nginx
- 领域
- api, backend, networking
调研方向
首先,使用 OpenResty 1.19 及更高版本的 Docker 镜像运行链接的复现仓库。比较同时定义 body_filter_by_lua 和 content_by_lua_block 时的行为,重点关注缓冲请求和 ngx.flush(true);完成标准是确定 lua-resty-http 是否涉及其中,并通过可复现的结果记录或修复该问题。
由索引模型根据 Issue 内容生成。
描述
I've logged this as a bug over in the lua-nginx-module repo but incase it's a bug in this code base instead thought I would log it here as well.
https://github.com/openresty/lua-nginx-module/issues/2372
We've been attempting to upgrade some legacy code to a newer version of openresty and hit a road block getting to anything greater then 1.19
We've found an issue that exists in any version greater then openresty 1.19 when using body_filter_by_lua and content_by_lua_block blocks.
I've created a reproduction case here - https://github.com/cdloh/body_filter_by_lua-bug-openresty
I've used lua-resty-http to make making the request easier.
When using both body_filter_by_lua and content_by_lua_block it's impossible to use APIs like ngx.flush(true) if there is any buffering going on. Eventually even if the flush code is only within content_by_lua blocks openresty complains about that API being disabled in body_filter_by_lua phases.
Note that you don't have to be actually doing anything in the body_filter_by_lua block at all. Simply having it defined causes the bug to occur.
You can run the some reproduction repo against 1.19 docker iamges and it work fine, however anything greater and it breaks.
- 主要语言
- Lua
- 星标
- 2.1k
- 派生
- 630
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ledgetech/lua-resty-http 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 75/100
ledgetech/lua-resty-http#337 ·
-
难度 4/5 3-5 天 新手友好度 35/100
ledgetech/lua-resty-http#334 · 1 条评论 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 35/100
ledgetech/lua-resty-http#330 ·
-
难度 4/5 3-5 天 新手友好度 15/100
ledgetech/lua-resty-http#325 ·
-
难度 4/5 3-5 天 新手友好度 25/100
ledgetech/lua-resty-http#323 ·
查看 ledgetech/lua-resty-http 的全部 Issue
相似的 Issue
-
import-issue
难度 2/5 1-3 小时 新手友好度 64/100
public-transport/transitous#2553 ·
维护者通常 1 天内回复
-
Bug Forever Module - Map / Minimap Needs testing/reproduction
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
2个显示的问题未关闭
难度 2/5 1-3 小时 新手友好度 62/100
coolsnowwolf/lede#14209 ·
-
LaTeX in answers未关闭
难度 2/5 1-3 小时 新手友好度 82/100
numbats/moodlequiz#38 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复