[ https://issues.apache.org/jira/browse/TS-3674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14578377#comment-14578377 ]
ASF subversion and git services commented on TS-3674: ----------------------------------------------------- Commit 3b097aff412db20c2ccd46db9f891a41a3396a72 in trafficserver's branch refs/heads/master from [~kichan] [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=3b097af ] TS-3674: bug fix for ts_lua plugin for adding package path > bug in ts_lua plugin for adding package path > ---------------------------------------------- > > Key: TS-3674 > URL: https://issues.apache.org/jira/browse/TS-3674 > Project: Traffic Server > Issue Type: Bug > Components: Lua, Plugins > Reporter: Kit Chan > Assignee: Kit Chan > Fix For: 6.0.0 > > > Specifically the following situation will make the server fail to restart > -- /tmp/global_lua.lua , used in plugin.config > ts.add_package_path('/tmp/lib/?.lua') > local g_config = require "g_config" > function send_response() > ts.client_response.header['g_Rhost'] = ts.ctx['rhost'] > ts.client_response.header['g_config'] = g_config.name > return 0 > end > function do_global_read_request() > local req_host = ts.client_request.header.Host > ts.ctx['rhost'] = string.reverse(req_host) > ts.hook(TS_LUA_HOOK_SEND_RESPONSE_HDR, send_response) > return 0 > end > -- /tmp/lib/g_config.lua > local g_config = {} > g_config.name = 'xxx' > return g_config > -- /tmp/remap_lua.lua , used in remap.config > ts.add_package_path('/tmp/lib/?.lua') > local r_config = require "r_config" > function send_response() > ts.client_response.header['r_Rhost'] = ts.ctx['rhost'] > ts.client_response.header['r_config'] = r_config.name > return 0 > end > function do_remap() > local req_host = ts.client_request.header.Host > ts.ctx['rhost'] = string.reverse(req_host) > ts.hook(TS_LUA_HOOK_SEND_RESPONSE_HDR, send_response) > return 0 > end > -- /tmp/lib/r_config.lua > local r_config = {} > r_config.name = 'yyy' > return r_config > That's because of a bug in the code for adding package path. Providing a fix > soon. -- This message was sent by Atlassian JIRA (v6.3.4#6332)