请教下,在macos m1环境中,无法设置响应头,而在其他环境正常运行.

  • 执行命令
    ngx.header["xxx"]=xxx

  • luajit
    LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2022 Mike Pall. https://luajit.org/

  • error.log
    2022/09/15 16:15:21 [error] 18514#747164: *1 lua entry thread aborted: runtime error: /opt/homebrew/opt/openresty/lualib/resty/core/response.lua:102: NYI: cannot call this C function (yet)
    stack traceback:
    coroutine 0:
    [C]: in function 'ngx_http_lua_ffi_set_resp_header'
    /opt/homebrew/opt/openresty/lualib/resty/core/response.lua:102: in function '__newindex'
    ...rew/Cellar/openresty/1.21.4.1_1/nginx/lua/fs/fcreate.lua:47: in main chunk, client: 192.168.1.12, server: 192.168.1.12, request: "POST /fs HTTP/1.1", host: "192.168.1.12:82"

    14 days later

    我也遇到了同样的问题

      19 days later

      是自己编译的版本吗?
      我记得最新的master分支是解决了。你们可以自己编译试试看

        a month later
        2 years later

        1.21.4.1_2也存在同样的问题。

          升级:brew upgrade openresty/brew/openresty
          1.27.1.1_2版本是正常的。

            Write a Reply...