Skip to content

support openresty 1.29.2#231

Open
leafo wants to merge 1 commit intofffonion:masterfrom
leafo:master
Open

support openresty 1.29.2#231
leafo wants to merge 1 commit intofffonion:masterfrom
leafo:master

Conversation

@leafo
Copy link
Copy Markdown

@leafo leafo commented Apr 22, 2026

structs appear to be the same, only need to bump the constraints

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Nginx and Lua Nginx module version checks to support newer releases, specifically adding support for Nginx versions 1.27.1 and 1.29.2, and extending the Lua module version range to 1.00.30. Feedback suggests adding a safety check for ngx_lua_version to prevent a potential runtime error when the version is nil.

ngx.config.ngx_lua_version

if ngx_lua_version >= 10019 and ngx_lua_version <= 10028 then
if ngx_lua_version >= 10019 and ngx_lua_version <= 10030 then
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

If ngx_lua_version is nil (which can happen if ngx.config.ngx_lua_version is missing), this comparison will throw a runtime error: attempt to compare number with nil. Although this is existing logic, since you are modifying this line, it's a good opportunity to add a safety check to ensure ngx_lua_version is truthy before performing the comparison. This ensures the code gracefully falls through to the else block which handles the nil case with a descriptive error message.

  if ngx_lua_version and ngx_lua_version >= 10019 and ngx_lua_version <= 10030 then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant