-
Notifications
You must be signed in to change notification settings - Fork 2.1k
update set_by_lua* #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update set_by_lua* #115
Conversation
2, now symbol $ can be used in the lua code which set by directive set_by_lua
I don't really want to branch code just to make set_by_lua* usable when NDK is missing, because it makes testing harder (I have to test the two cases when there is NDK and there is no NDK) :) Eliminating dependencies isn't so important when we already have bundles like ngx_openresty: http://openresty.org. Disabling nginx variable interpolation in set_by_lua is reasonable and I'll merge your tests (and your related code). thanks :) |
恩,这样的话,测试确实麻烦一些了,那直接不用条件编译了,将set_by_lua*指令的使用ndk代码都去掉可以吗?这样的好处是其他地方使用lua模块,不用编译ndk也可以使用Lua模块的完整功能了。 |
2012/5/21 jinglong
有些用户并不想使用 set_by_lua* 和 ndk.*,但同时又不想包含 NDK. 正是基于此需求,我才加上 NDK 相关的条件编译指令的 :) Regards, |
如果他不想用的话,就别在配置里面写这个指令就好了吧? 但是如果依赖NDK,对那些想要set_by_lua* ,又不想包含NDK的用户,就没有什么办法了 |
NDK相关的接口按照计划应该拆出去吧,set_by_lua*接口没有和NDK绑定的必要,当初用NDK也不过是图方便而已。 |
On Mon, May 21, 2012 at 7:36 PM, Wang, Xiaozhe
NDK 的 set_var 模块使用进来还是很便利的,包括 ngx_lua, ngx_set_misc, ngx_array_var, Regards, |
…tion and there was no easy way to use the dollar sign characters in the literal Lua source. the set_by_lua_file directive still supports nginx variable interpoloation in its lua file path argument. thanks Vittly for reporting this in github issue openresty#111 and jinglong for the test in github pull openresty#115.
1, now set_by_lua* do not depond on ndk any longer
2, now symbol $ can be used in the lua code which set by directive set_by_lua
3, add a test case for set_by_lua (symbol $ in lua code) in file 001-set.t