[GH-ISSUE #20] set_by_lua_block $wocao {} not support #9

Closed
opened 2026-02-28 01:20:29 +03:00 by kerem · 2 comments
Owner

Originally created by @ermazi on GitHub (Jun 20, 2023).
Original GitHub issue: https://github.com/tufanbarisyildirim/gonginx/issues/20

Originally assigned to: @tufanbarisyildirim on GitHub.

panic now

Originally created by @ermazi on GitHub (Jun 20, 2023). Original GitHub issue: https://github.com/tufanbarisyildirim/gonginx/issues/20 Originally assigned to: @tufanbarisyildirim on GitHub. panic now
kerem 2026-02-28 01:20:29 +03:00
  • closed this issue
  • added the
    v2
    label
Author
Owner

@tufanbarisyildirim commented on GitHub (Jun 26, 2023):

Hi @ermazi thaks for reporting, can you please provide more details? or just share the conf you have issue with

<!-- gh-comment-id:1606809725 --> @tufanbarisyildirim commented on GitHub (Jun 26, 2023): Hi @ermazi thaks for reporting, can you please provide more details? or just share the conf you have issue with
Author
Owner

@FeiYing9 commented on GitHub (Oct 18, 2023):

if i have a block like this:

         set_by_lua_block $file_name {
                local t = ngx.var.uri
                local query = string.find(t, "?", 1)
                if query ~= nil then
                   t = string.sub(t, 1, query-1)
                end
                return t;
            }

then the code gonginx.DumpBlock(conf.Block, gonginx.IndentStyle) will dump this result:

   set_by_lua_block {


                            local t = ngx.var.uri local query = string.find(t, "?" , 1) if query ~= nil then t = string.sub(t, 1, query-1) end return t;


            }

it's worse when dump it several times @tufanbarisyildirim

<!-- gh-comment-id:1767876836 --> @FeiYing9 commented on GitHub (Oct 18, 2023): if i have a block like this: ```nginx set_by_lua_block $file_name { local t = ngx.var.uri local query = string.find(t, "?", 1) if query ~= nil then t = string.sub(t, 1, query-1) end return t; } ``` then the code `gonginx.DumpBlock(conf.Block, gonginx.IndentStyle)` will dump this result: ```nginx set_by_lua_block { local t = ngx.var.uri local query = string.find(t, "?" , 1) if query ~= nil then t = string.sub(t, 1, query-1) end return t; } ``` it's worse when dump it several times @tufanbarisyildirim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/gonginx#9
No description provided.