Skip to content

Merge in shdict CAS PR #1

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

Closed
wants to merge 49 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
a1df068
ngx.shared.DICT.incr optional expire argument
splitice Apr 5, 2014
a315d79
tabs fixed, replaced with spaces
splitice Apr 5, 2014
8b5d786
Merge branch 'upstream/master'
splitice Mar 31, 2015
c11df99
Update code to meet nginx coding standards
splitice Apr 1, 2015
b4c12d6
Documentation updated to include incr's exptime parameter
splitice Apr 1, 2015
7626688
Fixed stray tab
splitice Apr 2, 2015
3caef80
nil handling
splitice Apr 2, 2015
c84f1c9
Merge branch 'openresty/master'
splitice Apr 8, 2015
248afcf
Merge branch 'openresty/master'
splitice May 8, 2015
aaf49e6
Merge remote-tracking branch 'openresty/master'
splitice Sep 13, 2015
e4f79de
fix commited conflict
splitice Sep 13, 2015
8ecf938
Merge remote-tracking branch 'refs/remotes/openresty/master'
splitice Nov 21, 2015
ba156b9
Merge remote-tracking branch 'refs/remotes/openresty/master'
splitice Dec 17, 2015
0fea525
add exptime argument to ffi method with the same semantics as :incr i…
splitice Dec 28, 2015
16427d0
Merge remote-tracking branch 'refs/remotes/openresty/master'
splitice Dec 28, 2015
4e618cf
add tp local variable was undefined
splitice Dec 28, 2015
2a53bb4
doc: add balancer_by_lua*, ssl_certificate_by_lua* to the context of
doujiang24 Feb 3, 2016
3bb11aa
Merge pull request #665 from doujiang24/doc
agentzh Feb 3, 2016
c16e1e4
doc: log_by_lua runs after nginx access log
bjoe2k4 Feb 3, 2016
da30ad6
Merge pull request #667 from bjoe2k4/master
agentzh Feb 3, 2016
d9393be
Merge remote-tracking branch 'refs/remotes/openresty/master'
splitice Feb 4, 2016
0dabb56
doc: updated the copyright year to 2016.
agentzh Feb 5, 2016
e920600
doc: mentions ngx_stream_lua_module.
agentzh Feb 5, 2016
43ec784
renamed util/build2.sh to util/build.sh.
agentzh Feb 5, 2016
fcec974
made the tests more robust.
agentzh Feb 7, 2016
8d7549f
feature: added new API, ngx.config.subsystem, which always takes the …
agentzh Feb 7, 2016
740552f
doc: updated the doc for ngx.req.discard_body() to reflect recent cha…
agentzh Feb 9, 2016
d7d4547
bugfix: avoided a potential memory issue when the request handler is …
agentzh Feb 9, 2016
b98a7f7
bugfix: stream-typed cosockets: we did not set the "error" field of t…
agentzh Feb 9, 2016
4d77cae
Small documentation fix to sample code
typhonius Feb 10, 2016
b6f5877
Merge pull request #671 from typhonius/docos-error-fix
agentzh Feb 10, 2016
db206ab
doc: a follow-up fix for commit 4d77caeb8.
agentzh Feb 10, 2016
320641a
optimize: use lua_pushliteral for string-literal.
cubicdaiya Feb 9, 2016
b28eefa
tests: made two test cases less agreesive in allocations.
agentzh Feb 10, 2016
64866bc
bugfix: fixed compilation errors with nginx 1.9.11+. thanks Charles R…
agentzh Feb 11, 2016
5abc7b6
bugfix: fixed compatibility issues with other nginx modules loaded as…
agentzh Feb 11, 2016
5adcbef
config: refactoring.
agentzh Feb 11, 2016
91c6590
config: more adjustments.
agentzh Feb 11, 2016
4f29543
feature: this module can now be built as a "dynamic module" with NGIN…
agentzh Feb 11, 2016
01727a3
feature: added HTTP 2.0 support to ngx.req.http_version().
r--w Feb 11, 2016
7410339
doc: typo fix from Prayag Verma in #675.
agentzh Feb 13, 2016
3b46731
doc: updated the docs of get_phase() for the "ssl_cert" context.
thibaultcha Feb 14, 2016
b1a326e
bugfix: fixed compilation errors with LibreSSL by disabling ssl_certi…
agentzh Feb 17, 2016
20f2e88
tests: increased the waiting time of a test case.
agentzh Feb 17, 2016
d2cedd8
doc: updated the TODO list to reflect recent changes.
agentzh Feb 17, 2016
5231d5f
doc: updated the markdown version accordingly.
agentzh Feb 17, 2016
2aa42d5
tests: added passing tests for using ngx.worker.count() in the contex…
agentzh Feb 18, 2016
c6c905d
tests: added a (passing) test case proposed by Mathew Heard in #681.
agentzh Feb 18, 2016
96eaf4a
Merge remote-tracking branch 'refs/remotes/openresty/master'
splitice Feb 18, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 88 additions & 69 deletions README.markdown

Large diffs are not rendered by default.

249 changes: 133 additions & 116 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,17 @@ END
fi
fi

ngx_module_incs=
ngx_module_libs=

if [ $ngx_found = yes ]; then
# this is a hack to persuade nginx's build system to favor
# the paths set by our user environments:
CFLAGS="$ngx_lua_opt_I $CFLAGS"
NGX_LD_OPT="$ngx_lua_opt_L $NGX_LD_OPT"

CORE_INCS="$CORE_INCS $ngx_feature_path"
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
ngx_module_incs="$ngx_module_incs $ngx_feature_path"
ngx_module_libs="$ngx_module_libs $ngx_feature_libs"
else
cat << END
$0: error: ngx_http_lua_module requires the Lua library.
Expand All @@ -300,119 +303,118 @@ END
fi

ngx_addon_name=ngx_http_lua_module
HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_lua_module"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS \
$ngx_addon_dir/src/ngx_http_lua_script.c \
$ngx_addon_dir/src/ngx_http_lua_log.c \
$ngx_addon_dir/src/ngx_http_lua_subrequest.c \
$ngx_addon_dir/src/ngx_http_lua_ndk.c \
$ngx_addon_dir/src/ngx_http_lua_control.c \
$ngx_addon_dir/src/ngx_http_lua_time.c \
$ngx_addon_dir/src/ngx_http_lua_misc.c \
$ngx_addon_dir/src/ngx_http_lua_variable.c \
$ngx_addon_dir/src/ngx_http_lua_string.c \
$ngx_addon_dir/src/ngx_http_lua_output.c \
$ngx_addon_dir/src/ngx_http_lua_headers.c \
$ngx_addon_dir/src/ngx_http_lua_req_body.c \
$ngx_addon_dir/src/ngx_http_lua_uri.c \
$ngx_addon_dir/src/ngx_http_lua_args.c \
$ngx_addon_dir/src/ngx_http_lua_ctx.c \
$ngx_addon_dir/src/ngx_http_lua_regex.c \
$ngx_addon_dir/src/ngx_http_lua_module.c \
$ngx_addon_dir/src/ngx_http_lua_headers_out.c \
$ngx_addon_dir/src/ngx_http_lua_headers_in.c \
$ngx_addon_dir/src/ngx_http_lua_directive.c \
$ngx_addon_dir/src/ngx_http_lua_consts.c \
$ngx_addon_dir/src/ngx_http_lua_exception.c \
$ngx_addon_dir/src/ngx_http_lua_util.c \
$ngx_addon_dir/src/ngx_http_lua_cache.c \
$ngx_addon_dir/src/ngx_http_lua_contentby.c \
$ngx_addon_dir/src/ngx_http_lua_rewriteby.c \
$ngx_addon_dir/src/ngx_http_lua_accessby.c \
$ngx_addon_dir/src/ngx_http_lua_setby.c \
$ngx_addon_dir/src/ngx_http_lua_capturefilter.c \
$ngx_addon_dir/src/ngx_http_lua_clfactory.c \
$ngx_addon_dir/src/ngx_http_lua_pcrefix.c \
$ngx_addon_dir/src/ngx_http_lua_headerfilterby.c \
$ngx_addon_dir/src/ngx_http_lua_shdict.c \
$ngx_addon_dir/src/ngx_http_lua_socket_tcp.c \
$ngx_addon_dir/src/ngx_http_lua_api.c \
$ngx_addon_dir/src/ngx_http_lua_logby.c \
$ngx_addon_dir/src/ngx_http_lua_sleep.c \
$ngx_addon_dir/src/ngx_http_lua_semaphore.c\
$ngx_addon_dir/src/ngx_http_lua_coroutine.c \
$ngx_addon_dir/src/ngx_http_lua_bodyfilterby.c \
$ngx_addon_dir/src/ngx_http_lua_initby.c \
$ngx_addon_dir/src/ngx_http_lua_initworkerby.c \
$ngx_addon_dir/src/ngx_http_lua_socket_udp.c \
$ngx_addon_dir/src/ngx_http_lua_req_method.c \
$ngx_addon_dir/src/ngx_http_lua_phase.c \
$ngx_addon_dir/src/ngx_http_lua_uthread.c \
$ngx_addon_dir/src/ngx_http_lua_timer.c \
$ngx_addon_dir/src/ngx_http_lua_config.c \
$ngx_addon_dir/src/ngx_http_lua_worker.c \
$ngx_addon_dir/src/ngx_http_lua_ssl_certby.c \
$ngx_addon_dir/src/ngx_http_lua_ssl_ocsp.c \
$ngx_addon_dir/src/ngx_http_lua_lex.c \
$ngx_addon_dir/src/ngx_http_lua_balancer.c \
"

NGX_ADDON_DEPS="$NGX_ADDON_DEPS \
$ngx_addon_dir/src/ddebug.h \
$ngx_addon_dir/src/ngx_http_lua_script.h \
$ngx_addon_dir/src/ngx_http_lua_log.h \
$ngx_addon_dir/src/ngx_http_lua_subrequest.h \
$ngx_addon_dir/src/ngx_http_lua_ndk.h \
$ngx_addon_dir/src/ngx_http_lua_control.h \
$ngx_addon_dir/src/ngx_http_lua_time.h \
$ngx_addon_dir/src/ngx_http_lua_string.h \
$ngx_addon_dir/src/ngx_http_lua_misc.h \
$ngx_addon_dir/src/ngx_http_lua_variable.h \
$ngx_addon_dir/src/ngx_http_lua_output.h \
$ngx_addon_dir/src/ngx_http_lua_headers.h \
$ngx_addon_dir/src/ngx_http_lua_uri.h \
$ngx_addon_dir/src/ngx_http_lua_req_body.h \
$ngx_addon_dir/src/ngx_http_lua_args.h \
$ngx_addon_dir/src/ngx_http_lua_ctx.h \
$ngx_addon_dir/src/ngx_http_lua_regex.h \
$ngx_addon_dir/src/ngx_http_lua_common.h \
$ngx_addon_dir/src/ngx_http_lua_directive.h \
$ngx_addon_dir/src/ngx_http_lua_headers_out.h \
$ngx_addon_dir/src/ngx_http_lua_headers_in.h \
$ngx_addon_dir/src/ngx_http_lua_consts.h \
$ngx_addon_dir/src/ngx_http_lua_exception.h \
$ngx_addon_dir/src/ngx_http_lua_util.h \
$ngx_addon_dir/src/ngx_http_lua_cache.h \
$ngx_addon_dir/src/ngx_http_lua_contentby.h \
$ngx_addon_dir/src/ngx_http_lua_rewriteby.h \
$ngx_addon_dir/src/ngx_http_lua_accessby.h \
$ngx_addon_dir/src/ngx_http_lua_setby.h \
$ngx_addon_dir/src/ngx_http_lua_capturefilter.h \
$ngx_addon_dir/src/ngx_http_lua_clfactory.h \
$ngx_addon_dir/src/ngx_http_lua_pcrefix.h \
$ngx_addon_dir/src/ngx_http_lua_headerfilterby.h \
$ngx_addon_dir/src/ngx_http_lua_shdict.h \
$ngx_addon_dir/src/ngx_http_lua_socket_tcp.h \
$ngx_addon_dir/src/api/ngx_http_lua_api.h \
$ngx_addon_dir/src/ngx_http_lua_logby.h \
$ngx_addon_dir/src/ngx_http_lua_sleep.h \
$ngx_addon_dir/src/ngx_http_lua_semaphore.h\
$ngx_addon_dir/src/ngx_http_lua_coroutine.h \
$ngx_addon_dir/src/ngx_http_lua_bodyfilterby.h \
$ngx_addon_dir/src/ngx_http_lua_initby.h \
$ngx_addon_dir/src/ngx_http_lua_initworkerby.h \
$ngx_addon_dir/src/ngx_http_lua_socket_udp.h \
$ngx_addon_dir/src/ngx_http_lua_req_method.h \
$ngx_addon_dir/src/ngx_http_lua_phase.h \
$ngx_addon_dir/src/ngx_http_lua_probe.h \
$ngx_addon_dir/src/ngx_http_lua_uthread.h \
$ngx_addon_dir/src/ngx_http_lua_timer.h \
$ngx_addon_dir/src/ngx_http_lua_config.h \
$ngx_addon_dir/src/ngx_http_lua_worker.h \
$ngx_addon_dir/src/ngx_http_lua_ssl_certby.h \
$ngx_addon_dir/src/ngx_http_lua_lex.h \
$ngx_addon_dir/src/ngx_http_lua_balancer.h \
"
HTTP_LUA_SRCS=" \
$ngx_addon_dir/src/ngx_http_lua_script.c \
$ngx_addon_dir/src/ngx_http_lua_log.c \
$ngx_addon_dir/src/ngx_http_lua_subrequest.c \
$ngx_addon_dir/src/ngx_http_lua_ndk.c \
$ngx_addon_dir/src/ngx_http_lua_control.c \
$ngx_addon_dir/src/ngx_http_lua_time.c \
$ngx_addon_dir/src/ngx_http_lua_misc.c \
$ngx_addon_dir/src/ngx_http_lua_variable.c \
$ngx_addon_dir/src/ngx_http_lua_string.c \
$ngx_addon_dir/src/ngx_http_lua_output.c \
$ngx_addon_dir/src/ngx_http_lua_headers.c \
$ngx_addon_dir/src/ngx_http_lua_req_body.c \
$ngx_addon_dir/src/ngx_http_lua_uri.c \
$ngx_addon_dir/src/ngx_http_lua_args.c \
$ngx_addon_dir/src/ngx_http_lua_ctx.c \
$ngx_addon_dir/src/ngx_http_lua_regex.c \
$ngx_addon_dir/src/ngx_http_lua_module.c \
$ngx_addon_dir/src/ngx_http_lua_headers_out.c \
$ngx_addon_dir/src/ngx_http_lua_headers_in.c \
$ngx_addon_dir/src/ngx_http_lua_directive.c \
$ngx_addon_dir/src/ngx_http_lua_consts.c \
$ngx_addon_dir/src/ngx_http_lua_exception.c \
$ngx_addon_dir/src/ngx_http_lua_util.c \
$ngx_addon_dir/src/ngx_http_lua_cache.c \
$ngx_addon_dir/src/ngx_http_lua_contentby.c \
$ngx_addon_dir/src/ngx_http_lua_rewriteby.c \
$ngx_addon_dir/src/ngx_http_lua_accessby.c \
$ngx_addon_dir/src/ngx_http_lua_setby.c \
$ngx_addon_dir/src/ngx_http_lua_capturefilter.c \
$ngx_addon_dir/src/ngx_http_lua_clfactory.c \
$ngx_addon_dir/src/ngx_http_lua_pcrefix.c \
$ngx_addon_dir/src/ngx_http_lua_headerfilterby.c \
$ngx_addon_dir/src/ngx_http_lua_shdict.c \
$ngx_addon_dir/src/ngx_http_lua_socket_tcp.c \
$ngx_addon_dir/src/ngx_http_lua_api.c \
$ngx_addon_dir/src/ngx_http_lua_logby.c \
$ngx_addon_dir/src/ngx_http_lua_sleep.c \
$ngx_addon_dir/src/ngx_http_lua_semaphore.c\
$ngx_addon_dir/src/ngx_http_lua_coroutine.c \
$ngx_addon_dir/src/ngx_http_lua_bodyfilterby.c \
$ngx_addon_dir/src/ngx_http_lua_initby.c \
$ngx_addon_dir/src/ngx_http_lua_initworkerby.c \
$ngx_addon_dir/src/ngx_http_lua_socket_udp.c \
$ngx_addon_dir/src/ngx_http_lua_req_method.c \
$ngx_addon_dir/src/ngx_http_lua_phase.c \
$ngx_addon_dir/src/ngx_http_lua_uthread.c \
$ngx_addon_dir/src/ngx_http_lua_timer.c \
$ngx_addon_dir/src/ngx_http_lua_config.c \
$ngx_addon_dir/src/ngx_http_lua_worker.c \
$ngx_addon_dir/src/ngx_http_lua_ssl_certby.c \
$ngx_addon_dir/src/ngx_http_lua_ssl_ocsp.c \
$ngx_addon_dir/src/ngx_http_lua_lex.c \
$ngx_addon_dir/src/ngx_http_lua_balancer.c \
"

HTTP_LUA_DEPS=" \
$ngx_addon_dir/src/ddebug.h \
$ngx_addon_dir/src/ngx_http_lua_script.h \
$ngx_addon_dir/src/ngx_http_lua_log.h \
$ngx_addon_dir/src/ngx_http_lua_subrequest.h \
$ngx_addon_dir/src/ngx_http_lua_ndk.h \
$ngx_addon_dir/src/ngx_http_lua_control.h \
$ngx_addon_dir/src/ngx_http_lua_time.h \
$ngx_addon_dir/src/ngx_http_lua_string.h \
$ngx_addon_dir/src/ngx_http_lua_misc.h \
$ngx_addon_dir/src/ngx_http_lua_variable.h \
$ngx_addon_dir/src/ngx_http_lua_output.h \
$ngx_addon_dir/src/ngx_http_lua_headers.h \
$ngx_addon_dir/src/ngx_http_lua_uri.h \
$ngx_addon_dir/src/ngx_http_lua_req_body.h \
$ngx_addon_dir/src/ngx_http_lua_args.h \
$ngx_addon_dir/src/ngx_http_lua_ctx.h \
$ngx_addon_dir/src/ngx_http_lua_regex.h \
$ngx_addon_dir/src/ngx_http_lua_common.h \
$ngx_addon_dir/src/ngx_http_lua_directive.h \
$ngx_addon_dir/src/ngx_http_lua_headers_out.h \
$ngx_addon_dir/src/ngx_http_lua_headers_in.h \
$ngx_addon_dir/src/ngx_http_lua_consts.h \
$ngx_addon_dir/src/ngx_http_lua_exception.h \
$ngx_addon_dir/src/ngx_http_lua_util.h \
$ngx_addon_dir/src/ngx_http_lua_cache.h \
$ngx_addon_dir/src/ngx_http_lua_contentby.h \
$ngx_addon_dir/src/ngx_http_lua_rewriteby.h \
$ngx_addon_dir/src/ngx_http_lua_accessby.h \
$ngx_addon_dir/src/ngx_http_lua_setby.h \
$ngx_addon_dir/src/ngx_http_lua_capturefilter.h \
$ngx_addon_dir/src/ngx_http_lua_clfactory.h \
$ngx_addon_dir/src/ngx_http_lua_pcrefix.h \
$ngx_addon_dir/src/ngx_http_lua_headerfilterby.h \
$ngx_addon_dir/src/ngx_http_lua_shdict.h \
$ngx_addon_dir/src/ngx_http_lua_socket_tcp.h \
$ngx_addon_dir/src/api/ngx_http_lua_api.h \
$ngx_addon_dir/src/ngx_http_lua_logby.h \
$ngx_addon_dir/src/ngx_http_lua_sleep.h \
$ngx_addon_dir/src/ngx_http_lua_semaphore.h\
$ngx_addon_dir/src/ngx_http_lua_coroutine.h \
$ngx_addon_dir/src/ngx_http_lua_bodyfilterby.h \
$ngx_addon_dir/src/ngx_http_lua_initby.h \
$ngx_addon_dir/src/ngx_http_lua_initworkerby.h \
$ngx_addon_dir/src/ngx_http_lua_socket_udp.h \
$ngx_addon_dir/src/ngx_http_lua_req_method.h \
$ngx_addon_dir/src/ngx_http_lua_phase.h \
$ngx_addon_dir/src/ngx_http_lua_probe.h \
$ngx_addon_dir/src/ngx_http_lua_uthread.h \
$ngx_addon_dir/src/ngx_http_lua_timer.h \
$ngx_addon_dir/src/ngx_http_lua_config.h \
$ngx_addon_dir/src/ngx_http_lua_worker.h \
$ngx_addon_dir/src/ngx_http_lua_ssl_certby.h \
$ngx_addon_dir/src/ngx_http_lua_lex.h \
$ngx_addon_dir/src/ngx_http_lua_balancer.h \
"

CFLAGS="$CFLAGS -DNDK_SET_VAR"

Expand Down Expand Up @@ -464,6 +466,21 @@ ngx_feature_test='setsockopt(1, SOL_SOCKET, SO_PASSCRED, NULL, 0);'

. auto/feature

if test -n "$ngx_module_link"; then
ngx_module_type=HTTP_AUX_FILTER
ngx_module_name=$ngx_addon_name
ngx_module_deps="$HTTP_LUA_DEPS"
ngx_module_srcs="$HTTP_LUA_SRCS"

. auto/module
else
HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES $ngx_addon_name"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $HTTP_LUA_SRCS"
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $HTTP_LUA_DEPS"

CORE_INCS="$CORE_INCS $ngx_module_incs"
CORE_LIBS="$CORE_LIBS $ngx_module_libs"
fi

#CFLAGS=$"$CFLAGS -DLUA_DEFAULT_PATH='\"/usr/local/openresty/lualib/?.lua\"'"
#CFLAGS=$"$CFLAGS -DLUA_DEFAULT_CPATH='\"/usr/local/openresty/lualib/?.so\"'"

Loading