├── .gitignore ├── 3rd-party ├── ModSecurity │ ├── CHANGES │ ├── LICENSE │ ├── Makefile.am │ ├── NOTICE │ ├── README.TXT │ ├── README_WINDOWS.TXT │ ├── alp2 │ │ ├── Makefile.am │ │ ├── alp2.c │ │ ├── alp2.h │ │ ├── alp2_pp.c │ │ └── alp2_pp.h │ ├── apache2 │ │ ├── Makefile.am │ │ ├── Makefile.win │ │ ├── acmp.c │ │ ├── acmp.h │ │ ├── apache2.h │ │ ├── apache2_config.c │ │ ├── apache2_io.c │ │ ├── apache2_util.c │ │ ├── libinjection │ │ │ ├── COPYING.txt │ │ │ ├── libinjection.h │ │ │ ├── libinjection_html5.c │ │ │ ├── libinjection_html5.h │ │ │ ├── libinjection_sqli.c │ │ │ ├── libinjection_sqli.h │ │ │ ├── libinjection_sqli_data.h │ │ │ ├── libinjection_xss.c │ │ │ └── libinjection_xss.h │ │ ├── mod_security2.c │ │ ├── mod_security2_config.hw │ │ ├── modsecurity.c │ │ ├── modsecurity.h │ │ ├── modsecurity_config.h │ │ ├── modules.mk │ │ ├── msc_crypt.c │ │ ├── msc_crypt.h │ │ ├── msc_geo.c │ │ ├── msc_geo.h │ │ ├── msc_gsb.c │ │ ├── msc_gsb.h │ │ ├── msc_json.c │ │ ├── msc_json.h │ │ ├── msc_logging.c │ │ ├── msc_logging.h │ │ ├── msc_lua.c │ │ ├── msc_lua.h │ │ ├── msc_multipart.c │ │ ├── msc_multipart.h │ │ ├── msc_parsers.c │ │ ├── msc_parsers.h │ │ ├── msc_pcre.c │ │ ├── msc_pcre.h │ │ ├── msc_release.c │ │ ├── msc_release.h │ │ ├── msc_reqbody.c │ │ ├── msc_status_engine.c │ │ ├── msc_status_engine.h │ │ ├── msc_tree.c │ │ ├── msc_tree.h │ │ ├── msc_unicode.c │ │ ├── msc_unicode.h │ │ ├── msc_util.c │ │ ├── msc_util.h │ │ ├── msc_xml.c │ │ ├── msc_xml.h │ │ ├── persist_dbm.c │ │ ├── persist_dbm.h │ │ ├── re.c │ │ ├── re.h │ │ ├── re_actions.c │ │ ├── re_operators.c │ │ ├── re_tfns.c │ │ ├── re_variables.c │ │ └── utf8tables.h │ ├── authors.txt │ ├── autogen.sh │ ├── build │ │ ├── apxs-wrapper.in │ │ ├── compile │ │ ├── find_apr.m4 │ │ ├── find_apu.m4 │ │ ├── find_curl.m4 │ │ ├── find_lua.m4 │ │ ├── find_pcre.m4 │ │ ├── find_xml.m4 │ │ └── find_yajl.m4 │ ├── configure.ac │ ├── doc │ │ └── README.txt │ ├── ext │ │ ├── Makefile.am │ │ ├── README │ │ ├── mod_op_strstr.c │ │ ├── mod_reqbody_example.c │ │ ├── mod_tfn_reverse.c │ │ └── mod_var_remote_addr_port.c │ ├── iis │ │ ├── Makefile.win │ │ ├── ModSecurity.xml │ │ ├── ModSecurityIIS.sln │ │ ├── ModSecurityIIS.vcxproj │ │ ├── ModSecurityIIS.vcxproj.filters │ │ ├── build_dependencies.bat │ │ ├── build_modsecurity.bat │ │ ├── build_msi.bat │ │ ├── build_release.bat │ │ ├── dependencies │ │ │ ├── build_apache.bat │ │ │ ├── build_curl.bat │ │ │ ├── build_libxml2.bat │ │ │ ├── build_lua.bat │ │ │ ├── build_pcre.bat │ │ │ ├── build_yajl.bat │ │ │ ├── build_zlib.bat │ │ │ └── howto.txt │ │ ├── installer.wxs │ │ ├── main.cpp │ │ ├── moduleconfig.cpp │ │ ├── moduleconfig.h │ │ ├── mymodule.cpp │ │ ├── mymodule.def │ │ ├── mymodule.h │ │ ├── mymodulefactory.h │ │ └── wix │ │ │ ├── EULA.rtf │ │ │ ├── Microsoft_VC110_CRT_x64.msm │ │ │ ├── Microsoft_VC110_CRT_x86.msm │ │ │ ├── Microsoft_VC120_CRT_x64.msm │ │ │ ├── Microsoft_VC120_CRT_x86.msm │ │ │ ├── README.TXT │ │ │ ├── banner.jpg │ │ │ ├── dialog.jpg │ │ │ ├── list_dependencies.bat │ │ │ ├── modsecurity.conf │ │ │ └── modsecurity_iis.conf │ ├── mlogc │ │ ├── INSTALL │ │ ├── Makefile.am │ │ ├── Makefile.win │ │ ├── mlogc-batch-load.pl.in │ │ ├── mlogc-default.conf │ │ └── mlogc.c │ ├── modsecurity.conf-recommended │ ├── nginx │ │ ├── TODO │ │ └── modsecurity │ │ │ ├── apr_bucket_nginx.c │ │ │ ├── apr_bucket_nginx.h │ │ │ ├── config │ │ │ ├── config.in │ │ │ ├── ngx_http_modsecurity.c │ │ │ ├── ngx_pool_context.c │ │ │ └── ngx_pool_context.h │ ├── stamp-h1 │ ├── standalone │ │ ├── Makefile.am │ │ ├── api.c │ │ ├── api.h │ │ ├── buckets.c │ │ ├── config.c │ │ ├── filters.c │ │ ├── hooks.c │ │ ├── main.cpp │ │ ├── modules.mk │ │ ├── regex.c │ │ ├── server.c │ │ ├── standalone.sln │ │ ├── standalone.vcxproj │ │ ├── standalone.vcxproj.filters │ │ └── standalone.vcxproj.user │ ├── tests │ │ ├── Makefile.am │ │ ├── action │ │ │ └── .empty │ │ ├── csv_rx-pm.pl.in │ │ ├── gen_rx-pm.pl.in │ │ ├── msc_test.c │ │ ├── op │ │ │ ├── beginsWith.t │ │ │ ├── contains.t │ │ │ ├── containsWord.t │ │ │ ├── detectSQLi.t │ │ │ ├── detectXSS.t │ │ │ ├── endsWith.t │ │ │ ├── eq.t │ │ │ ├── ge.t │ │ │ ├── geoLookup.t │ │ │ ├── gt.t │ │ │ ├── inspectFile.t │ │ │ ├── le.t │ │ │ ├── lt.t │ │ │ ├── noMatch.t │ │ │ ├── pm.t │ │ │ ├── pmFromFile-01.dat │ │ │ ├── pmFromFile.t │ │ │ ├── rbl.t │ │ │ ├── rx.t │ │ │ ├── streq.t │ │ │ ├── strmatch.t │ │ │ ├── unconditionalMatch.t │ │ │ ├── validateByteRange.t │ │ │ ├── validateDTD.t │ │ │ ├── validateSchema.t │ │ │ ├── validateUrlEncoding.t │ │ │ ├── validateUtf8Encoding.t │ │ │ ├── verifyCC.t │ │ │ └── within.t │ │ ├── regression │ │ │ ├── action │ │ │ │ ├── 00-disruptive-actions.t │ │ │ │ ├── 00-meta.t │ │ │ │ ├── 00-misc.t │ │ │ │ ├── 00-transformations.t │ │ │ │ ├── 10-append-prepend.t │ │ │ │ ├── 10-ctl.t │ │ │ │ ├── 10-detectiononly-actions.t │ │ │ │ └── 10-logging.t │ │ │ ├── config │ │ │ │ ├── 00-load-modsec.t │ │ │ │ ├── 10-audit-directives.t │ │ │ │ ├── 10-debug-directives.t │ │ │ │ ├── 10-misc-directives.t │ │ │ │ ├── 10-request-directives.t │ │ │ │ ├── 10-response-directives.t │ │ │ │ └── 20-chroot.t │ │ │ ├── misc │ │ │ │ ├── 00-multipart-parser.t │ │ │ │ ├── 00-phases.t │ │ │ │ ├── 10-pcre.t │ │ │ │ ├── 10-tfn-cache.t │ │ │ │ ├── 20-status-engine.pl │ │ │ │ └── 25-libinjection.t │ │ │ ├── nginx │ │ │ │ └── conf │ │ │ │ │ ├── SoapEnvelope-bad.dtd │ │ │ │ │ ├── SoapEnvelope-bad.xsd │ │ │ │ │ ├── SoapEnvelope.dtd │ │ │ │ │ ├── SoapEnvelope.xsd │ │ │ │ │ ├── empty.conf │ │ │ │ │ ├── match.lua │ │ │ │ │ ├── nginx.conf.template │ │ │ │ │ └── test.lua │ │ │ ├── rule │ │ │ │ ├── 00-basics.t │ │ │ │ ├── 00-inheritance.t │ │ │ │ ├── 00-script.t │ │ │ │ ├── 10-xml.t │ │ │ │ ├── 15-json.t │ │ │ │ └── 20-exceptions.t │ │ │ ├── server_root │ │ │ │ ├── conf │ │ │ │ │ ├── SoapEnvelope-bad.dtd │ │ │ │ │ ├── SoapEnvelope-bad.xsd │ │ │ │ │ ├── SoapEnvelope.dtd │ │ │ │ │ ├── SoapEnvelope.xsd │ │ │ │ │ ├── httpd.conf.in │ │ │ │ │ ├── match.lua │ │ │ │ │ └── test.lua │ │ │ │ ├── data │ │ │ │ │ ├── .empty │ │ │ │ │ └── ip.dir │ │ │ │ ├── htdocs │ │ │ │ │ ├── 8k.txt │ │ │ │ │ ├── index.html │ │ │ │ │ ├── test.pdf │ │ │ │ │ ├── test.txt │ │ │ │ │ └── test2.txt │ │ │ │ ├── logs │ │ │ │ │ ├── audit │ │ │ │ │ │ └── .empty │ │ │ │ │ └── subdir │ │ │ │ │ │ └── .empty │ │ │ │ ├── tmp │ │ │ │ │ └── .empty │ │ │ │ └── upload │ │ │ │ │ └── .empty │ │ │ └── target │ │ │ │ └── 00-targets.t │ │ ├── run-regression-tests-nginx.pl │ │ ├── run-regression-tests.pl.in │ │ ├── run-unit-tests.pl.in │ │ └── tfn │ │ │ ├── base64Decode.t │ │ │ ├── base64Encode.t │ │ │ ├── compressWhitespace.t │ │ │ ├── cssDecode.t │ │ │ ├── escapeSeqDecode.t │ │ │ ├── hexDecode.t │ │ │ ├── hexEncode.t │ │ │ ├── htmlEntityDecode.t │ │ │ ├── jsDecode.t │ │ │ ├── length.t │ │ │ ├── lowercase.t │ │ │ ├── md5.t │ │ │ ├── normalisePath.t │ │ │ ├── normalisePathWin.t │ │ │ ├── parityEven7bit.t │ │ │ ├── parityOdd7bit.t │ │ │ ├── parityZero7bit.t │ │ │ ├── removeNulls.t │ │ │ ├── removeWhitespace.t │ │ │ ├── replaceComments.t │ │ │ ├── replaceNulls.t │ │ │ ├── sha1.t │ │ │ ├── trim.t │ │ │ ├── trimLeft.t │ │ │ ├── trimRight.t │ │ │ ├── urlDecode.t │ │ │ ├── urlDecodeUni.t │ │ │ ├── urlEncode.t │ │ │ └── utf8toUnicode.t │ ├── tools │ │ ├── Makefile.am │ │ ├── README │ │ ├── rules-updater-example.conf │ │ └── rules-updater.pl.in │ └── unicode.mapping ├── headers-more-nginx-module │ ├── .gitignore │ ├── README │ ├── README.markdown │ ├── config │ ├── doc │ │ └── HttpHeadersMoreModule.wiki │ ├── src │ │ ├── ddebug.h │ │ ├── ngx_http_headers_more_filter_module.c │ │ ├── ngx_http_headers_more_filter_module.h │ │ ├── ngx_http_headers_more_headers_in.c │ │ ├── ngx_http_headers_more_headers_in.h │ │ ├── ngx_http_headers_more_headers_out.c │ │ ├── ngx_http_headers_more_headers_out.h │ │ ├── ngx_http_headers_more_util.c │ │ └── ngx_http_headers_more_util.h │ ├── t │ │ ├── bug.t │ │ ├── builtin.t │ │ ├── eval.t │ │ ├── input.t │ │ ├── phase.t │ │ ├── sanity.t │ │ ├── subrequest.t │ │ └── vars.t │ ├── util │ │ └── build.sh │ └── valgrind.suppress ├── lua-nginx-module-0.10.7 │ ├── .gitattributes │ ├── .github │ │ ├── ISSUE_TEMPLATE.md │ │ └── PULL_REQUEST_TEMPLATE.md │ ├── .gitignore │ ├── .travis.yml │ ├── README.markdown │ ├── config │ ├── doc │ │ └── HttpLuaModule.wiki │ ├── dtrace │ │ └── ngx_lua_provider.d │ ├── misc │ │ └── recv-until-pm │ │ │ ├── lib │ │ │ └── RecvUntil.pm │ │ │ └── t │ │ │ └── sanity.t │ ├── src │ │ ├── api │ │ │ └── ngx_http_lua_api.h │ │ ├── ddebug.h │ │ ├── ngx_http_lua_accessby.c │ │ ├── ngx_http_lua_accessby.h │ │ ├── ngx_http_lua_api.c │ │ ├── ngx_http_lua_args.c │ │ ├── ngx_http_lua_args.h │ │ ├── ngx_http_lua_balancer.c │ │ ├── ngx_http_lua_balancer.h │ │ ├── ngx_http_lua_bodyfilterby.c │ │ ├── ngx_http_lua_bodyfilterby.h │ │ ├── ngx_http_lua_cache.c │ │ ├── ngx_http_lua_cache.h │ │ ├── ngx_http_lua_capturefilter.c │ │ ├── ngx_http_lua_capturefilter.h │ │ ├── ngx_http_lua_clfactory.c │ │ ├── ngx_http_lua_clfactory.h │ │ ├── ngx_http_lua_common.h │ │ ├── ngx_http_lua_config.c │ │ ├── ngx_http_lua_config.h │ │ ├── ngx_http_lua_consts.c │ │ ├── ngx_http_lua_consts.h │ │ ├── ngx_http_lua_contentby.c │ │ ├── ngx_http_lua_contentby.h │ │ ├── ngx_http_lua_control.c │ │ ├── ngx_http_lua_control.h │ │ ├── ngx_http_lua_coroutine.c │ │ ├── ngx_http_lua_coroutine.h │ │ ├── ngx_http_lua_ctx.c │ │ ├── ngx_http_lua_ctx.h │ │ ├── ngx_http_lua_directive.c │ │ ├── ngx_http_lua_directive.h │ │ ├── ngx_http_lua_exception.c │ │ ├── ngx_http_lua_exception.h │ │ ├── ngx_http_lua_headerfilterby.c │ │ ├── ngx_http_lua_headerfilterby.h │ │ ├── ngx_http_lua_headers.c │ │ ├── ngx_http_lua_headers.h │ │ ├── ngx_http_lua_headers_in.c │ │ ├── ngx_http_lua_headers_in.h │ │ ├── ngx_http_lua_headers_out.c │ │ ├── ngx_http_lua_headers_out.h │ │ ├── ngx_http_lua_initby.c │ │ ├── ngx_http_lua_initby.h │ │ ├── ngx_http_lua_initworkerby.c │ │ ├── ngx_http_lua_initworkerby.h │ │ ├── ngx_http_lua_lex.c │ │ ├── ngx_http_lua_lex.h │ │ ├── ngx_http_lua_log.c │ │ ├── ngx_http_lua_log.h │ │ ├── ngx_http_lua_logby.c │ │ ├── ngx_http_lua_logby.h │ │ ├── ngx_http_lua_misc.c │ │ ├── ngx_http_lua_misc.h │ │ ├── ngx_http_lua_module.c │ │ ├── ngx_http_lua_ndk.c │ │ ├── ngx_http_lua_ndk.h │ │ ├── ngx_http_lua_output.c │ │ ├── ngx_http_lua_output.h │ │ ├── ngx_http_lua_pcrefix.c │ │ ├── ngx_http_lua_pcrefix.h │ │ ├── ngx_http_lua_phase.c │ │ ├── ngx_http_lua_phase.h │ │ ├── ngx_http_lua_probe.h │ │ ├── ngx_http_lua_regex.c │ │ ├── ngx_http_lua_regex.h │ │ ├── ngx_http_lua_req_body.c │ │ ├── ngx_http_lua_req_body.h │ │ ├── ngx_http_lua_req_method.c │ │ ├── ngx_http_lua_req_method.h │ │ ├── ngx_http_lua_rewriteby.c │ │ ├── ngx_http_lua_rewriteby.h │ │ ├── ngx_http_lua_script.c │ │ ├── ngx_http_lua_script.h │ │ ├── ngx_http_lua_semaphore.c │ │ ├── ngx_http_lua_semaphore.h │ │ ├── ngx_http_lua_setby.c │ │ ├── ngx_http_lua_setby.h │ │ ├── ngx_http_lua_shdict.c │ │ ├── ngx_http_lua_shdict.h │ │ ├── ngx_http_lua_sleep.c │ │ ├── ngx_http_lua_sleep.h │ │ ├── ngx_http_lua_socket_tcp.c │ │ ├── ngx_http_lua_socket_tcp.h │ │ ├── ngx_http_lua_socket_udp.c │ │ ├── ngx_http_lua_socket_udp.h │ │ ├── ngx_http_lua_ssl.c │ │ ├── ngx_http_lua_ssl.h │ │ ├── ngx_http_lua_ssl_certby.c │ │ ├── ngx_http_lua_ssl_certby.h │ │ ├── ngx_http_lua_ssl_ocsp.c │ │ ├── ngx_http_lua_ssl_session_fetchby.c │ │ ├── ngx_http_lua_ssl_session_fetchby.h │ │ ├── ngx_http_lua_ssl_session_storeby.c │ │ ├── ngx_http_lua_ssl_session_storeby.h │ │ ├── ngx_http_lua_string.c │ │ ├── ngx_http_lua_string.h │ │ ├── ngx_http_lua_subrequest.c │ │ ├── ngx_http_lua_subrequest.h │ │ ├── ngx_http_lua_time.c │ │ ├── ngx_http_lua_time.h │ │ ├── ngx_http_lua_timer.c │ │ ├── ngx_http_lua_timer.h │ │ ├── ngx_http_lua_uri.c │ │ ├── ngx_http_lua_uri.h │ │ ├── ngx_http_lua_uthread.c │ │ ├── ngx_http_lua_uthread.h │ │ ├── ngx_http_lua_util.c │ │ ├── ngx_http_lua_util.h │ │ ├── ngx_http_lua_variable.c │ │ ├── ngx_http_lua_variable.h │ │ ├── ngx_http_lua_worker.c │ │ └── ngx_http_lua_worker.h │ ├── t │ │ ├── .gitignore │ │ ├── 000--init.t │ │ ├── 000-sanity.t │ │ ├── 001-set.t │ │ ├── 002-content.t │ │ ├── 003-errors.t │ │ ├── 004-require.t │ │ ├── 005-exit.t │ │ ├── 006-escape.t │ │ ├── 007-md5.t │ │ ├── 008-today.t │ │ ├── 009-log.t │ │ ├── 010-request_body.t │ │ ├── 011-md5_bin.t │ │ ├── 012-now.t │ │ ├── 013-base64.t │ │ ├── 014-bugs.t │ │ ├── 015-status.t │ │ ├── 016-resp-header.t │ │ ├── 017-exec.t │ │ ├── 018-ndk.t │ │ ├── 019-const.t │ │ ├── 020-subrequest.t │ │ ├── 021-cookie-time.t │ │ ├── 022-redirect.t │ │ ├── 023-rewrite │ │ │ ├── client-abort.t │ │ │ ├── exec.t │ │ │ ├── exit.t │ │ │ ├── mixed.t │ │ │ ├── multi-capture.t │ │ │ ├── on-abort.t │ │ │ ├── redirect.t │ │ │ ├── req-body.t │ │ │ ├── req-socket.t │ │ │ ├── request_body.t │ │ │ ├── sanity.t │ │ │ ├── sleep.t │ │ │ ├── socket-keepalive.t │ │ │ ├── subrequest.t │ │ │ ├── tcp-socket-timeout.t │ │ │ ├── tcp-socket.t │ │ │ ├── unix-socket.t │ │ │ ├── uthread-exec.t │ │ │ ├── uthread-exit.t │ │ │ ├── uthread-redirect.t │ │ │ └── uthread-spawn.t │ │ ├── 024-access │ │ │ ├── auth.t │ │ │ ├── client-abort.t │ │ │ ├── exec.t │ │ │ ├── exit.t │ │ │ ├── mixed.t │ │ │ ├── multi-capture.t │ │ │ ├── on-abort.t │ │ │ ├── redirect.t │ │ │ ├── req-body.t │ │ │ ├── request_body.t │ │ │ ├── sanity.t │ │ │ ├── satisfy.t │ │ │ ├── sleep.t │ │ │ ├── subrequest.t │ │ │ ├── uthread-exec.t │ │ │ ├── uthread-exit.t │ │ │ ├── uthread-redirect.t │ │ │ └── uthread-spawn.t │ │ ├── 025-codecache.t │ │ ├── 026-mysql.t │ │ ├── 027-multi-capture.t │ │ ├── 028-req-header.t │ │ ├── 029-http-time.t │ │ ├── 030-uri-args.t │ │ ├── 031-post-args.t │ │ ├── 032-iolist.t │ │ ├── 033-ctx.t │ │ ├── 034-match.t │ │ ├── 035-gmatch.t │ │ ├── 036-sub.t │ │ ├── 037-gsub.t │ │ ├── 038-match-o.t │ │ ├── 039-sub-o.t │ │ ├── 040-gsub-o.t │ │ ├── 041-header-filter.t │ │ ├── 042-crc32.t │ │ ├── 043-shdict.t │ │ ├── 044-req-body.t │ │ ├── 045-ngx-var.t │ │ ├── 046-hmac.t │ │ ├── 047-match-jit.t │ │ ├── 048-match-dfa.t │ │ ├── 049-gmatch-jit.t │ │ ├── 050-gmatch-dfa.t │ │ ├── 051-sub-jit.t │ │ ├── 052-sub-dfa.t │ │ ├── 053-gsub-jit.t │ │ ├── 054-gsub-dfa.t │ │ ├── 055-subreq-vars.t │ │ ├── 056-flush.t │ │ ├── 057-flush-timeout.t │ │ ├── 058-tcp-socket.t │ │ ├── 059-unix-socket.t │ │ ├── 060-lua-memcached.t │ │ ├── 061-lua-redis.t │ │ ├── 062-count.t │ │ ├── 063-abort.t │ │ ├── 064-pcall.t │ │ ├── 065-tcp-socket-timeout.t │ │ ├── 066-socket-receiveuntil.t │ │ ├── 067-req-socket.t │ │ ├── 068-socket-keepalive.t │ │ ├── 069-null.t │ │ ├── 070-sha1.t │ │ ├── 071-idle-socket.t │ │ ├── 072-conditional-get.t │ │ ├── 073-backtrace.t │ │ ├── 074-prefix-var.t │ │ ├── 075-logby.t │ │ ├── 076-no-postpone.t │ │ ├── 077-sleep.t │ │ ├── 078-hup-vars.t │ │ ├── 079-unused-directives.t │ │ ├── 080-hup-shdict.t │ │ ├── 081-bytecode.t │ │ ├── 082-body-filter.t │ │ ├── 083-bad-sock-self.t │ │ ├── 084-inclusive-receiveuntil.t │ │ ├── 085-if.t │ │ ├── 086-init-by.t │ │ ├── 087-udp-socket.t │ │ ├── 088-req-method.t │ │ ├── 089-phase.t │ │ ├── 090-log-socket-errors.t │ │ ├── 091-coroutine.t │ │ ├── 092-eof.t │ │ ├── 093-uthread-spawn.t │ │ ├── 094-uthread-exit.t │ │ ├── 095-uthread-exec.t │ │ ├── 096-uthread-redirect.t │ │ ├── 097-uthread-rewrite.t │ │ ├── 098-uthread-wait.t │ │ ├── 099-c-api.t │ │ ├── 100-client-abort.t │ │ ├── 101-on-abort.t │ │ ├── 102-req-start-time.t │ │ ├── 103-req-http-ver.t │ │ ├── 104-req-raw-header.t │ │ ├── 105-pressure.t │ │ ├── 106-timer.t │ │ ├── 107-timer-errors.t │ │ ├── 108-timer-safe.t │ │ ├── 109-timer-hup.t │ │ ├── 110-etag.t │ │ ├── 111-req-header-ua.t │ │ ├── 112-req-header-conn.t │ │ ├── 113-req-header-cookie.t │ │ ├── 114-config.t │ │ ├── 115-quote-sql-str.t │ │ ├── 116-raw-req-socket.t │ │ ├── 117-raw-req-socket-timeout.t │ │ ├── 118-use-default-type.t │ │ ├── 119-config-prefix.t │ │ ├── 120-re-find.t │ │ ├── 121-version.t │ │ ├── 122-worker.t │ │ ├── 123-lua-path.t │ │ ├── 124-init-worker.t │ │ ├── 125-configure-args.t │ │ ├── 126-shdict-frag.t │ │ ├── 127-uthread-kill.t │ │ ├── 128-duplex-tcp-socket.t │ │ ├── 129-ssl-socket.t │ │ ├── 130-internal-api.t │ │ ├── 131-duplex-req-socket.t │ │ ├── 132-lua-blocks.t │ │ ├── 133-worker-count.t │ │ ├── 134-worker-count-5.t │ │ ├── 135-worker-id.t │ │ ├── 136-timer-counts.t │ │ ├── 137-req-misc.t │ │ ├── 138-balancer.t │ │ ├── 139-ssl-cert-by.t │ │ ├── 140-ssl-c-api.t │ │ ├── 141-luajit.t │ │ ├── 142-ssl-session-store.t │ │ ├── 143-ssl-session-fetch.t │ │ ├── 144-shdict-incr-init.t │ │ ├── 145-shdict-list.t │ │ ├── 146-malloc-trim.t │ │ ├── 147-tcp-socket-timeouts.t │ │ ├── 148-fake-shm-zone.t │ │ ├── 149-hup-fake-shm-zone.t │ │ ├── StapThread.pm │ │ ├── cert │ │ │ ├── equifax.crt │ │ │ ├── startcom.crt │ │ │ ├── test.crl │ │ │ ├── test.crt │ │ │ ├── test.key │ │ │ ├── test2.crt │ │ │ ├── test2.key │ │ │ ├── test_ecdsa.crt │ │ │ └── test_ecdsa.key │ │ ├── data │ │ │ ├── fake-module │ │ │ │ ├── config │ │ │ │ └── ngx_http_fake_module.c │ │ │ └── fake-shm-module │ │ │ │ ├── config │ │ │ │ └── ngx_http_lua_fake_shm_module.c │ │ └── lib │ │ │ ├── CRC32.lua │ │ │ ├── Memcached.lua │ │ │ ├── Redis.lua │ │ │ └── ljson.lua │ ├── tapset │ │ └── ngx_lua.stp │ ├── util │ │ ├── build.sh │ │ ├── fix-comments │ │ ├── gdbinit │ │ ├── gen-lexer-c │ │ ├── ngx-links │ │ ├── retab │ │ ├── revim │ │ ├── run_test.sh │ │ └── update-readme.sh │ └── valgrind.suppress ├── memc-nginx-module-0.17 │ ├── .gitattributes │ ├── .gitignore │ ├── README.markdown │ ├── config │ ├── src │ │ ├── ddebug.h │ │ ├── memc_common.rl │ │ ├── memc_delete.rl │ │ ├── memc_flush_all.rl │ │ ├── memc_incr_decr.rl │ │ ├── memc_stats.rl │ │ ├── memc_storage.rl │ │ ├── memc_version.rl │ │ ├── ngx_http_memc_handler.c │ │ ├── ngx_http_memc_handler.h │ │ ├── ngx_http_memc_module.c │ │ ├── ngx_http_memc_module.h │ │ ├── ngx_http_memc_request.c │ │ ├── ngx_http_memc_request.h │ │ ├── ngx_http_memc_response.c │ │ ├── ngx_http_memc_response.h │ │ ├── ngx_http_memc_response.rl │ │ ├── ngx_http_memc_util.c │ │ └── ngx_http_memc_util.h │ ├── t │ │ ├── bugs.t │ │ ├── cmd.t │ │ ├── core-bugs.t │ │ ├── delete.t │ │ ├── errors.t │ │ ├── eval.t │ │ ├── exptime.t │ │ ├── flags.t │ │ ├── flush-all.t │ │ ├── if.t │ │ ├── incr-decr.t │ │ ├── keepalive.t │ │ ├── keepalive │ │ │ ├── incr-decr.t │ │ │ └── storage.t │ │ ├── stats.t │ │ ├── storage.t │ │ ├── upstream.t │ │ ├── used.t │ │ └── version.t │ ├── util │ │ ├── build.sh │ │ ├── fix-clang-warnings │ │ ├── update-readme.sh │ │ └── wiki2pod.pl │ └── valgrind.suppress ├── naxsi │ ├── README.md │ ├── naxsi_config │ │ └── naxsi_core.rules │ ├── naxsi_src │ │ ├── Makefile │ │ ├── config │ │ ├── naxsi.h │ │ ├── naxsi_config.c │ │ ├── naxsi_json.c │ │ ├── naxsi_runtime.c │ │ ├── naxsi_skeleton.c │ │ └── naxsi_utils.c │ ├── nx_util │ │ ├── nx_datas │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap.min.css │ │ │ ├── bootstrap.min.js │ │ │ ├── country2coords.txt │ │ │ ├── highcharts.js │ │ │ └── map.tpl │ │ ├── nx_lib │ │ │ ├── SQLWrapper.py │ │ │ ├── __init__.py │ │ │ ├── nx_imports.py │ │ │ ├── nx_report.py │ │ │ ├── nx_tools.py │ │ │ ├── nx_whitelists.py │ │ │ └── ordereddict.py │ │ ├── nx_util.1.gz │ │ ├── nx_util.conf │ │ ├── nx_util.py │ │ ├── setup.py │ │ └── unit_test │ │ │ ├── 01_UNPREDICTABLE_NOTHING │ │ │ ├── 01_UNPREDICTABLE_NOTHING.results │ │ │ ├── 02_UNPREDICTABLE_ID │ │ │ ├── 02_UNPREDICTABLE_ID.results │ │ │ ├── 03_UNPREDICTABLE_URL │ │ │ ├── 03_UNPREDICTABLE_URL.results │ │ │ ├── 04_UNPREDICTABLE_ARGNAME │ │ │ ├── 04_UNPREDICTABLE_ARGNAME.results │ │ │ ├── 05_NAME_TARGET │ │ │ ├── 05_NAME_TARGET.results │ │ │ ├── 06_NAME_UNPREDICTABLE │ │ │ ├── 06_NAME_UNPREDICTABLE.results │ │ │ ├── 07_INTERNAL_REQUEST2BIG │ │ │ ├── 07_INTERNAL_REQUEST2BIG.results │ │ │ ├── 08_WEIRD_REQUESTS │ │ │ ├── 08_WEIRD_REQUESTS.results │ │ │ ├── 09_FILE_EXT_NAMED_VAR │ │ │ ├── 09_FILE_EXT_NAMED_VAR.results │ │ │ ├── gen_ut.sh │ │ │ └── run_ut.sh │ └── t │ │ ├── 00naxsi_base.t │ │ ├── 01naxsi_whitelists.t │ │ ├── 02naxsi_bypass.t │ │ ├── 03naxsi_profile.t │ │ ├── 04naxsi_files.t │ │ ├── 05naxsi_advanced_whitelists.t │ │ ├── 06naxsi_weirds.t │ │ ├── 07naxsi_argnames.t │ │ ├── 08negative_whitelists.t │ │ ├── 09sqlmap_tamper.t │ │ ├── 10naxsi_modifiers.t │ │ ├── 11naxsi_newstyle_config.t │ │ ├── 12naxsi_argnames_extended.t │ │ ├── 13test.t │ │ ├── 14json.t │ │ ├── 15json_wl.t │ │ ├── 16rx_mz.t │ │ ├── 17case.t │ │ ├── 18ids.t │ │ └── 19targets.t ├── nginx-eval-module │ ├── Changelog │ ├── LICENCE │ ├── README │ ├── config │ └── ngx_http_eval_module.c ├── nginx-upstream-fair │ ├── .gdbinit │ ├── README │ ├── config │ └── ngx_http_upstream_fair_module.c ├── ngx_cache_purge-2.3 │ ├── CHANGES │ ├── LICENSE │ ├── README.md │ ├── TODO.md │ ├── config │ ├── ngx_cache_purge_module.c │ └── t │ │ ├── proxy1.t │ │ ├── proxy1_vars.t │ │ ├── proxy2.t │ │ └── proxy2_vars.t ├── ngx_devel_kit │ ├── .gitignore │ ├── README │ ├── README_AUTO_LIB │ ├── TODO │ ├── auto │ │ ├── actions │ │ │ ├── array │ │ │ └── palloc │ │ ├── build │ │ ├── data │ │ │ ├── action_replacements │ │ │ ├── action_types │ │ │ ├── conf_args │ │ │ ├── conf_locs │ │ │ ├── conf_macros │ │ │ ├── contexts │ │ │ ├── header_files │ │ │ ├── headers │ │ │ ├── module_dependencies │ │ │ ├── modules_optional │ │ │ └── prefixes │ │ ├── src │ │ │ ├── array.h │ │ │ ├── conf_cmd_basic.h │ │ │ ├── conf_merge.h │ │ │ └── palloc.h │ │ └── text │ │ │ └── autogen │ ├── config │ ├── docs │ │ ├── core │ │ │ ├── action_macros │ │ │ └── conf_cmds │ │ ├── modules │ │ │ └── set_var │ │ ├── patches │ │ │ └── more_logging_info │ │ └── upstream │ │ │ └── list │ ├── examples │ │ ├── README │ │ └── http │ │ │ └── set_var │ │ │ ├── config │ │ │ └── ngx_http_set_var_examples_module.c │ ├── ngx_auto_lib_core │ ├── notes │ │ ├── CHANGES │ │ └── LICENSE │ ├── objs │ │ ├── ndk_array.h │ │ ├── ndk_conf_cmd_basic.h │ │ ├── ndk_conf_cmd_extra.h │ │ ├── ndk_conf_merge.h │ │ ├── ndk_config.c │ │ ├── ndk_config.h │ │ ├── ndk_includes.h │ │ └── ndk_palloc.h │ ├── patches │ │ ├── auto_config │ │ ├── expose_rewrite_functions │ │ └── rewrite_phase_handler │ └── src │ │ ├── hash │ │ ├── md5.h │ │ ├── murmurhash2.c │ │ └── sha.h │ │ ├── ndk.c │ │ ├── ndk.h │ │ ├── ndk_buf.c │ │ ├── ndk_buf.h │ │ ├── ndk_complex_path.c │ │ ├── ndk_complex_path.h │ │ ├── ndk_complex_value.c │ │ ├── ndk_complex_value.h │ │ ├── ndk_conf_file.c │ │ ├── ndk_conf_file.h │ │ ├── ndk_debug.c │ │ ├── ndk_debug.h │ │ ├── ndk_encoding.c │ │ ├── ndk_encoding.h │ │ ├── ndk_hash.c │ │ ├── ndk_hash.h │ │ ├── ndk_http.c │ │ ├── ndk_http.h │ │ ├── ndk_http_headers.h │ │ ├── ndk_log.c │ │ ├── ndk_log.h │ │ ├── ndk_parse.h │ │ ├── ndk_path.c │ │ ├── ndk_path.h │ │ ├── ndk_process.c │ │ ├── ndk_process.h │ │ ├── ndk_regex.c │ │ ├── ndk_regex.h │ │ ├── ndk_rewrite.c │ │ ├── ndk_rewrite.h │ │ ├── ndk_set_var.c │ │ ├── ndk_set_var.h │ │ ├── ndk_string.c │ │ ├── ndk_string.h │ │ ├── ndk_string_util.h │ │ ├── ndk_upstream_list.c │ │ ├── ndk_upstream_list.h │ │ ├── ndk_uri.c │ │ └── ndk_uri.h ├── ngx_http_substitutions_filter_module │ ├── CHANGES │ ├── README │ ├── config │ ├── doc │ │ ├── README.google_code_home_page.wiki │ │ ├── README.html │ │ └── README.wiki │ ├── ngx_http_subs_filter_module.c │ ├── test │ │ ├── README │ │ ├── inc │ │ │ ├── Module │ │ │ │ ├── AutoInstall.pm │ │ │ │ ├── Install.pm │ │ │ │ └── Install │ │ │ │ │ ├── AutoInstall.pm │ │ │ │ │ ├── Base.pm │ │ │ │ │ ├── Can.pm │ │ │ │ │ ├── Fetch.pm │ │ │ │ │ ├── Include.pm │ │ │ │ │ ├── Makefile.pm │ │ │ │ │ ├── Metadata.pm │ │ │ │ │ ├── TestBase.pm │ │ │ │ │ ├── Win32.pm │ │ │ │ │ └── WriteAll.pm │ │ │ ├── Spiffy.pm │ │ │ └── Test │ │ │ │ ├── Base.pm │ │ │ │ ├── Base │ │ │ │ └── Filter.pm │ │ │ │ ├── Builder.pm │ │ │ │ ├── Builder │ │ │ │ └── Module.pm │ │ │ │ └── More.pm │ │ ├── lib │ │ │ └── Test │ │ │ │ ├── Nginx.pm │ │ │ │ └── Nginx │ │ │ │ ├── LWP.pm │ │ │ │ ├── Socket.pm │ │ │ │ └── Util.pm │ │ ├── t │ │ │ ├── subs.t │ │ │ ├── subs_capture.t │ │ │ ├── subs_fix_string.t │ │ │ ├── subs_regex.t │ │ │ └── subs_types.t │ │ └── test.sh │ └── util │ │ ├── update-readme.sh │ │ ├── wiki2google_code_homepage.pl │ │ └── wiki2pod.pl ├── ngx_http_upstream_check_module │ ├── config │ └── ngx_http_upstream_check_module.c └── srcache-nginx-module │ ├── Changes │ ├── README.markdown │ ├── config │ ├── doc │ └── HttpSRCacheModule.wiki │ ├── src │ ├── ddebug.h │ ├── ngx_http_srcache_fetch.c │ ├── ngx_http_srcache_fetch.h │ ├── ngx_http_srcache_filter_module.c │ ├── ngx_http_srcache_filter_module.h │ ├── ngx_http_srcache_headers.c │ ├── ngx_http_srcache_headers.h │ ├── ngx_http_srcache_store.c │ ├── ngx_http_srcache_store.h │ ├── ngx_http_srcache_util.c │ ├── ngx_http_srcache_util.h │ ├── ngx_http_srcache_var.c │ └── ngx_http_srcache_var.h │ ├── t │ ├── 000_init.t │ ├── access.t │ ├── bugs.t │ ├── conditional-get.t │ ├── content-length.t │ ├── content-type.t │ ├── disk.t │ ├── drizzle-main.t │ ├── drizzle-sub.t │ ├── empty-resp.t │ ├── err-page.t │ ├── etag.t │ ├── eval.t │ ├── expire-var.t │ ├── expires.t │ ├── fetch-header.t │ ├── fetch-skip.t │ ├── gzip.t │ ├── header-buf-size.t │ ├── main-req.t │ ├── max-age.t │ ├── methods.t │ ├── no-cache.t │ ├── no-store.t │ ├── postgres-main.t │ ├── private.t │ ├── proxy.t │ ├── ranges.t │ ├── redis.t │ ├── req-cache-control.t │ ├── satisfy.t │ ├── static.t │ ├── status.t │ ├── store-hide-headers.t │ ├── store-max-size.t │ ├── store-pass-headers.t │ ├── store-skip.t │ ├── sub-req.t │ ├── timeout.t │ └── unused.t │ ├── util │ └── build.sh │ └── valgrind.suppress ├── CHANGES ├── CHANGES.ru ├── CHANGES.senginx ├── LICENSE ├── README ├── README.md ├── auto ├── cc │ ├── acc │ ├── bcc │ ├── ccc │ ├── clang │ ├── conf │ ├── gcc │ ├── icc │ ├── msvc │ ├── name │ ├── owc │ └── sunc ├── configure ├── define ├── endianness ├── feature ├── have ├── have_headers ├── headers ├── include ├── init ├── install ├── lib │ ├── conf │ ├── geoip │ │ └── conf │ ├── google-perftools │ │ └── conf │ ├── libatomic │ │ ├── conf │ │ └── make │ ├── libgd │ │ └── conf │ ├── libxslt │ │ └── conf │ ├── make │ ├── md5 │ │ ├── conf │ │ ├── make │ │ ├── makefile.bcc │ │ ├── makefile.msvc │ │ └── makefile.owc │ ├── openssl │ │ ├── conf │ │ ├── make │ │ ├── makefile.bcc │ │ └── makefile.msvc │ ├── pcre │ │ ├── conf │ │ ├── make │ │ ├── makefile.bcc │ │ ├── makefile.msvc │ │ └── makefile.owc │ ├── perl │ │ ├── conf │ │ └── make │ ├── sha1 │ │ ├── conf │ │ ├── make │ │ ├── makefile.bcc │ │ ├── makefile.msvc │ │ └── makefile.owc │ ├── test │ └── zlib │ │ ├── conf │ │ ├── make │ │ ├── makefile.bcc │ │ ├── makefile.msvc │ │ └── makefile.owc ├── make ├── module ├── modules ├── nohave ├── options ├── os │ ├── conf │ ├── darwin │ ├── freebsd │ ├── linux │ ├── solaris │ └── win32 ├── sources ├── stubs ├── summary ├── threads ├── types │ ├── sizeof │ ├── typedef │ ├── uintptr_t │ └── value └── unix ├── conf ├── fastcgi.conf ├── fastcgi_params ├── koi-utf ├── koi-win ├── mime.types ├── nginx.conf ├── scgi_params ├── uwsgi_params └── win-utf ├── configure ├── contrib ├── README ├── geo2nginx.pl ├── spacekicker.pl ├── stylechecker.py ├── unicode2nginx │ ├── koi-utf │ ├── unicode-to-nginx.pl │ └── win-utf └── vim │ ├── ftdetect │ └── nginx.vim │ ├── indent │ └── nginx.vim │ └── syntax │ └── nginx.vim ├── docs ├── GNUmakefile ├── dtd │ ├── change_log_conf.dtd │ └── changes.dtd ├── html │ ├── 50x.html │ └── index.html ├── man │ └── nginx.8 ├── text │ ├── LICENSE │ └── README ├── xml │ ├── change_log_conf.xml │ └── nginx │ │ └── changes.xml ├── xsls │ └── changes.xsls └── xslt │ └── changes.xslt ├── etc └── senginx.init ├── html ├── 50x.html ├── demo.erb ├── demo.html ├── index.html ├── jquery-1.10.2.min.js └── senginx_logo.png ├── migrate.pl ├── neusoft ├── ngx_http_cache_extend │ ├── config │ └── patch ├── ngx_http_cookie_poisoning │ ├── config │ ├── ngx_http_cookie_poisoning.c │ └── ngx_http_cookie_poisoning.h ├── ngx_http_dynamic_resolve │ └── config ├── ngx_http_if_extend │ ├── README │ └── config ├── ngx_http_ip_behavior │ ├── config │ ├── ngx_http_ip_behavior.c │ └── ngx_http_ip_behavior.h ├── ngx_http_ip_blacklist │ ├── config │ ├── ngx_http_ip_blacklist.c │ └── ngx_http_ip_blacklist.h ├── ngx_http_neteye_security │ ├── config │ ├── ngx_http_neteye_security.c │ └── ngx_http_neteye_security.h ├── ngx_http_robot_mitigation │ ├── config │ ├── ngx_http_robot_mitigation.c │ ├── ngx_http_robot_mitigation.h │ └── tools │ │ └── gen-random-js-tpl.c ├── ngx_http_session │ ├── config │ ├── ngx_http_session.c │ └── ngx_http_session.h ├── ngx_http_statistics │ ├── config │ ├── ngx_http_statistics.c │ └── ngx_http_statistics.h ├── ngx_http_status_page │ ├── config │ ├── ngx_http_status_page.c │ └── ngx_http_status_page.h ├── ngx_http_upstream_fastest │ ├── config │ └── ngx_http_upstream_fastest.c ├── ngx_http_upstream_persistence │ ├── config │ ├── ngx_http_upstream_persistence.c │ └── ngx_http_upstream_persistence.h ├── ngx_http_web_defacement │ ├── config │ ├── kernel │ │ ├── Makefile │ │ ├── wdfp.h │ │ ├── wdfp_main.c │ │ ├── wdfp_proc.c │ │ ├── wdfp_start.pl │ │ └── wdfp_stop.pl │ ├── ngx_http_web_defacement.c │ └── ngx_http_web_defacement.h └── ngx_http_whitelist │ ├── config │ ├── ngx_http_whitelist.c │ └── ngx_http_whitelist.h ├── rpm └── senginx.spec ├── se-configure.sh ├── src ├── core │ ├── nginx.c │ ├── nginx.h │ ├── ngx_array.c │ ├── ngx_array.h │ ├── ngx_buf.c │ ├── ngx_buf.h │ ├── ngx_conf_file.c │ ├── ngx_conf_file.h │ ├── ngx_config.h │ ├── ngx_connection.c │ ├── ngx_connection.h │ ├── ngx_core.h │ ├── ngx_cpuinfo.c │ ├── ngx_crc.h │ ├── ngx_crc32.c │ ├── ngx_crc32.h │ ├── ngx_crypt.c │ ├── ngx_crypt.h │ ├── ngx_cycle.c │ ├── ngx_cycle.h │ ├── ngx_file.c │ ├── ngx_file.h │ ├── ngx_hash.c │ ├── ngx_hash.h │ ├── ngx_inet.c │ ├── ngx_inet.h │ ├── ngx_list.c │ ├── ngx_list.h │ ├── ngx_log.c │ ├── ngx_log.h │ ├── ngx_md5.c │ ├── ngx_md5.h │ ├── ngx_module.c │ ├── ngx_module.h │ ├── ngx_murmurhash.c │ ├── ngx_murmurhash.h │ ├── ngx_open_file_cache.c │ ├── ngx_open_file_cache.h │ ├── ngx_output_chain.c │ ├── ngx_palloc.c │ ├── ngx_palloc.h │ ├── ngx_parse.c │ ├── ngx_parse.h │ ├── ngx_parse_time.c │ ├── ngx_parse_time.h │ ├── ngx_proxy_protocol.c │ ├── ngx_proxy_protocol.h │ ├── ngx_queue.c │ ├── ngx_queue.h │ ├── ngx_radix_tree.c │ ├── ngx_radix_tree.h │ ├── ngx_rbtree.c │ ├── ngx_rbtree.h │ ├── ngx_regex.c │ ├── ngx_regex.h │ ├── ngx_resolver.c │ ├── ngx_resolver.h │ ├── ngx_rwlock.c │ ├── ngx_rwlock.h │ ├── ngx_sha1.h │ ├── ngx_shmtx.c │ ├── ngx_shmtx.h │ ├── ngx_slab.c │ ├── ngx_slab.h │ ├── ngx_spinlock.c │ ├── ngx_string.c │ ├── ngx_string.h │ ├── ngx_syslog.c │ ├── ngx_syslog.h │ ├── ngx_thread_pool.c │ ├── ngx_thread_pool.h │ ├── ngx_times.c │ └── ngx_times.h ├── event │ ├── modules │ │ ├── ngx_devpoll_module.c │ │ ├── ngx_epoll_module.c │ │ ├── ngx_eventport_module.c │ │ ├── ngx_iocp_module.c │ │ ├── ngx_iocp_module.h │ │ ├── ngx_kqueue_module.c │ │ ├── ngx_poll_module.c │ │ ├── ngx_select_module.c │ │ └── ngx_win32_select_module.c │ ├── ngx_event.c │ ├── ngx_event.h │ ├── ngx_event_accept.c │ ├── ngx_event_acceptex.c │ ├── ngx_event_connect.c │ ├── ngx_event_connect.h │ ├── ngx_event_connectex.c │ ├── ngx_event_openssl.c │ ├── ngx_event_openssl.h │ ├── ngx_event_openssl_stapling.c │ ├── ngx_event_pipe.c │ ├── ngx_event_pipe.h │ ├── ngx_event_posted.c │ ├── ngx_event_posted.h │ ├── ngx_event_timer.c │ └── ngx_event_timer.h ├── http │ ├── modules │ │ ├── ngx_http_access_module.c │ │ ├── ngx_http_addition_filter_module.c │ │ ├── ngx_http_auth_basic_module.c │ │ ├── ngx_http_auth_request_module.c │ │ ├── ngx_http_autoindex_module.c │ │ ├── ngx_http_browser_module.c │ │ ├── ngx_http_charset_filter_module.c │ │ ├── ngx_http_chunked_filter_module.c │ │ ├── ngx_http_dav_module.c │ │ ├── ngx_http_degradation_module.c │ │ ├── ngx_http_empty_gif_module.c │ │ ├── ngx_http_fastcgi_module.c │ │ ├── ngx_http_flv_module.c │ │ ├── ngx_http_geo_module.c │ │ ├── ngx_http_geoip_module.c │ │ ├── ngx_http_gunzip_filter_module.c │ │ ├── ngx_http_gzip_filter_module.c │ │ ├── ngx_http_gzip_static_module.c │ │ ├── ngx_http_headers_filter_module.c │ │ ├── ngx_http_image_filter_module.c │ │ ├── ngx_http_index_module.c │ │ ├── ngx_http_limit_conn_module.c │ │ ├── ngx_http_limit_req_module.c │ │ ├── ngx_http_log_module.c │ │ ├── ngx_http_map_module.c │ │ ├── ngx_http_memcached_module.c │ │ ├── ngx_http_mp4_module.c │ │ ├── ngx_http_not_modified_filter_module.c │ │ ├── ngx_http_proxy_module.c │ │ ├── ngx_http_random_index_module.c │ │ ├── ngx_http_range_filter_module.c │ │ ├── ngx_http_realip_module.c │ │ ├── ngx_http_referer_module.c │ │ ├── ngx_http_rewrite_module.c │ │ ├── ngx_http_scgi_module.c │ │ ├── ngx_http_secure_link_module.c │ │ ├── ngx_http_slice_filter_module.c │ │ ├── ngx_http_split_clients_module.c │ │ ├── ngx_http_ssi_filter_module.c │ │ ├── ngx_http_ssi_filter_module.h │ │ ├── ngx_http_ssl_module.c │ │ ├── ngx_http_ssl_module.h │ │ ├── ngx_http_static_module.c │ │ ├── ngx_http_stub_status_module.c │ │ ├── ngx_http_sub_filter_module.c │ │ ├── ngx_http_upstream_hash_module.c │ │ ├── ngx_http_upstream_ip_hash_module.c │ │ ├── ngx_http_upstream_keepalive_module.c │ │ ├── ngx_http_upstream_least_conn_module.c │ │ ├── ngx_http_upstream_zone_module.c │ │ ├── ngx_http_userid_filter_module.c │ │ ├── ngx_http_uwsgi_module.c │ │ ├── ngx_http_xslt_filter_module.c │ │ └── perl │ │ │ ├── Makefile.PL │ │ │ ├── nginx.pm │ │ │ ├── nginx.xs │ │ │ ├── ngx_http_perl_module.c │ │ │ ├── ngx_http_perl_module.h │ │ │ └── typemap │ ├── ngx_http.c │ ├── ngx_http.h │ ├── ngx_http_cache.h │ ├── ngx_http_config.h │ ├── ngx_http_copy_filter_module.c │ ├── ngx_http_core_module.c │ ├── ngx_http_core_module.h │ ├── ngx_http_file_cache.c │ ├── ngx_http_header_filter_module.c │ ├── ngx_http_parse.c │ ├── ngx_http_postpone_filter_module.c │ ├── ngx_http_request.c │ ├── ngx_http_request.h │ ├── ngx_http_request_body.c │ ├── ngx_http_script.c │ ├── ngx_http_script.h │ ├── ngx_http_special_response.c │ ├── ngx_http_upstream.c │ ├── ngx_http_upstream.h │ ├── ngx_http_upstream_round_robin.c │ ├── ngx_http_upstream_round_robin.h │ ├── ngx_http_variables.c │ ├── ngx_http_variables.h │ ├── ngx_http_write_filter_module.c │ └── v2 │ │ ├── ngx_http_v2.c │ │ ├── ngx_http_v2.h │ │ ├── ngx_http_v2_filter_module.c │ │ ├── ngx_http_v2_huff_decode.c │ │ ├── ngx_http_v2_huff_encode.c │ │ ├── ngx_http_v2_module.c │ │ ├── ngx_http_v2_module.h │ │ └── ngx_http_v2_table.c ├── mail │ ├── ngx_mail.c │ ├── ngx_mail.h │ ├── ngx_mail_auth_http_module.c │ ├── ngx_mail_core_module.c │ ├── ngx_mail_handler.c │ ├── ngx_mail_imap_handler.c │ ├── ngx_mail_imap_module.c │ ├── ngx_mail_imap_module.h │ ├── ngx_mail_parse.c │ ├── ngx_mail_pop3_handler.c │ ├── ngx_mail_pop3_module.c │ ├── ngx_mail_pop3_module.h │ ├── ngx_mail_proxy_module.c │ ├── ngx_mail_smtp_handler.c │ ├── ngx_mail_smtp_module.c │ ├── ngx_mail_smtp_module.h │ ├── ngx_mail_ssl_module.c │ └── ngx_mail_ssl_module.h ├── misc │ ├── ngx_cpp_test_module.cpp │ └── ngx_google_perftools_module.c ├── os │ └── unix │ │ ├── ngx_alloc.c │ │ ├── ngx_alloc.h │ │ ├── ngx_atomic.h │ │ ├── ngx_channel.c │ │ ├── ngx_channel.h │ │ ├── ngx_daemon.c │ │ ├── ngx_darwin.h │ │ ├── ngx_darwin_config.h │ │ ├── ngx_darwin_init.c │ │ ├── ngx_darwin_sendfile_chain.c │ │ ├── ngx_dlopen.c │ │ ├── ngx_dlopen.h │ │ ├── ngx_errno.c │ │ ├── ngx_errno.h │ │ ├── ngx_file_aio_read.c │ │ ├── ngx_files.c │ │ ├── ngx_files.h │ │ ├── ngx_freebsd.h │ │ ├── ngx_freebsd_config.h │ │ ├── ngx_freebsd_init.c │ │ ├── ngx_freebsd_sendfile_chain.c │ │ ├── ngx_gcc_atomic_amd64.h │ │ ├── ngx_gcc_atomic_ppc.h │ │ ├── ngx_gcc_atomic_sparc64.h │ │ ├── ngx_gcc_atomic_x86.h │ │ ├── ngx_linux.h │ │ ├── ngx_linux_aio_read.c │ │ ├── ngx_linux_config.h │ │ ├── ngx_linux_init.c │ │ ├── ngx_linux_sendfile_chain.c │ │ ├── ngx_os.h │ │ ├── ngx_posix_config.h │ │ ├── ngx_posix_init.c │ │ ├── ngx_process.c │ │ ├── ngx_process.h │ │ ├── ngx_process_cycle.c │ │ ├── ngx_process_cycle.h │ │ ├── ngx_readv_chain.c │ │ ├── ngx_recv.c │ │ ├── ngx_send.c │ │ ├── ngx_setaffinity.c │ │ ├── ngx_setaffinity.h │ │ ├── ngx_setproctitle.c │ │ ├── ngx_setproctitle.h │ │ ├── ngx_shmem.c │ │ ├── ngx_shmem.h │ │ ├── ngx_socket.c │ │ ├── ngx_socket.h │ │ ├── ngx_solaris.h │ │ ├── ngx_solaris_config.h │ │ ├── ngx_solaris_init.c │ │ ├── ngx_solaris_sendfilev_chain.c │ │ ├── ngx_sunpro_amd64.il │ │ ├── ngx_sunpro_atomic_sparc64.h │ │ ├── ngx_sunpro_sparc64.il │ │ ├── ngx_sunpro_x86.il │ │ ├── ngx_thread.h │ │ ├── ngx_thread_cond.c │ │ ├── ngx_thread_id.c │ │ ├── ngx_thread_mutex.c │ │ ├── ngx_time.c │ │ ├── ngx_time.h │ │ ├── ngx_udp_recv.c │ │ ├── ngx_udp_send.c │ │ ├── ngx_user.c │ │ ├── ngx_user.h │ │ └── ngx_writev_chain.c └── stream │ ├── ngx_stream.c │ ├── ngx_stream.h │ ├── ngx_stream_access_module.c │ ├── ngx_stream_core_module.c │ ├── ngx_stream_handler.c │ ├── ngx_stream_limit_conn_module.c │ ├── ngx_stream_proxy_module.c │ ├── ngx_stream_ssl_module.c │ ├── ngx_stream_ssl_module.h │ ├── ngx_stream_upstream.c │ ├── ngx_stream_upstream.h │ ├── ngx_stream_upstream_hash_module.c │ ├── ngx_stream_upstream_least_conn_module.c │ ├── ngx_stream_upstream_round_robin.c │ ├── ngx_stream_upstream_round_robin.h │ └── ngx_stream_upstream_zone_module.c ├── test ├── 3rd-party │ ├── cache_extend.t │ ├── certs │ │ ├── ca.crt │ │ ├── ca_fake.crt │ │ ├── client.crt │ │ ├── client.key │ │ ├── client_fake.crt │ │ ├── server.crt │ │ └── server.key │ ├── cookie_poisoning.t │ ├── fastest.t │ ├── if_extend.t │ ├── ip_behavior.t │ ├── ip_blacklist.t │ ├── naxsi_whitelist.t │ ├── persistenct.t │ ├── persistenct_least_conn.t │ ├── robot_mitigation.t │ ├── robot_mitigation_whitelist.t │ ├── robot_mitigation_whitelist2.t │ ├── session.t │ ├── staging │ │ ├── fair.t │ │ └── wdfp.t │ ├── stats.t │ ├── web_defacement.t │ └── whitelist.t ├── LICENSE ├── README ├── auth_basic.t ├── auto-test.sh ├── autoindex.t ├── dav.t ├── dynamic_resolve.t ├── fastcgi.t ├── fastcgi_cache.t ├── fastcgi_header_params.t ├── fastcgi_merge_params.t ├── fastcgi_merge_params2.t ├── geo.t ├── gunzip.t ├── gunzip_memcached.t ├── gunzip_perl.t ├── gunzip_ssi.t ├── gunzip_static.t ├── gzip.t ├── gzip_flush.t ├── http_disable_symlinks.t ├── http_error_page.t ├── http_expect_100_continue.t ├── http_host.t ├── http_location.t ├── http_server_name.t ├── http_try_files.t ├── http_variables.t ├── ip_hash.t ├── least_conn.t ├── lib │ ├── Net │ │ ├── DNS.pm │ │ └── DNS │ │ │ ├── Domain.pm │ │ │ ├── DomainName.pm │ │ │ ├── Header.pm │ │ │ ├── Nameserver.pm │ │ │ ├── Packet.pm │ │ │ ├── Parameters.pm │ │ │ ├── Question.pm │ │ │ ├── RR.pm │ │ │ ├── RR │ │ │ ├── A.pm │ │ │ └── PTR.pm │ │ │ ├── Resolver.pm │ │ │ ├── Resolver │ │ │ ├── Base.pm │ │ │ └── UNIX.pm │ │ │ └── Update.pm │ ├── Test │ │ ├── Nginx.pm │ │ └── Nginx │ │ │ ├── IMAP.pm │ │ │ ├── POP3.pm │ │ │ └── SMTP.pm │ └── Time │ │ ├── JulianDay.pm │ │ ├── Parse.pm │ │ ├── ParseDate.pm │ │ ├── Timezone.pm │ │ └── Zone.pm ├── limit_req.t ├── mail_imap.t ├── mail_pop3.t ├── mail_smtp.t ├── mail_smtp_greeting_delay.t ├── mail_smtp_xclient.t ├── map.t ├── memcached.t ├── memcached_fake.t ├── not_modified.t ├── perl.t ├── perl_gzip.t ├── proxy.t ├── proxy_cache.t ├── proxy_cache_lock.t ├── proxy_chunked.t ├── proxy_cookie.t ├── proxy_merge_headers.t ├── proxy_noclose.t ├── proxy_redirect.t ├── proxy_store.t ├── proxy_xar.t ├── random_index.t ├── range.t ├── range_flv.t ├── range_if_range.t ├── realip.t ├── rewrite.t ├── rewrite_unescape.t ├── round_robin.t ├── scgi.t ├── scgi_gzip.t ├── scgi_merge_params.t ├── secure_link.t ├── ssi.t ├── ssi_if.t ├── ssi_include_big.t ├── ssi_waited.t ├── uwsgi.t ├── xslt.t └── xslt_params.t └── web-defacement.pl /3rd-party/ModSecurity/NOTICE: -------------------------------------------------------------------------------- 1 | ModSecurity (www.modsecurity.org) 2 |     Copyright [2004-2013] Trustwave Holdings, Inc 3 | 4 |     This product includes software developed at 5 |     Trustwave Holdings, Inc (http://www.trustwave.com/). 6 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/alp2/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libalp2.la 2 | 3 | include_HEADERS = alp2.h \ 4 | alp2_pp.h 5 | 6 | libalp2_la_SOURCES = alp2.c \ 7 | alp2_pp.c 8 | 9 | libalp2_la_CFLAGS = @APR_CFLAGS@ \ 10 | @APU_CFLAGS@ 11 | 12 | libalp2_la_LDFLAGS = @APR_LDFLAGS@ \ 13 | @APU_LDFLAGS@ 14 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/apache2/libinjection/libinjection_xss.h: -------------------------------------------------------------------------------- 1 | #ifndef LIBINJECTION_XSS 2 | #define LIBINJECTION_XSS 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | /** 9 | * HEY THIS ISN'T DONE 10 | */ 11 | 12 | /* pull in size_t */ 13 | 14 | #include 15 | 16 | int libinjection_is_xss(const char* s, size_t len, int flags); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | #endif 22 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/apache2/mod_security2_config.hw: -------------------------------------------------------------------------------- 1 | /* This file is left empty for building on Windows. */ 2 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/apache2/modsecurity_config.h: -------------------------------------------------------------------------------- 1 | /* Some APR files define PACKAGE* constants, which may conflict 2 | * so this is here to prevent that by removing them. 3 | */ 4 | 5 | #ifndef WIN32 6 | 7 | /* Undefine all these so there are no conflicts */ 8 | #undef PACKAGE 9 | #undef PACKAGE_BUGREPORT 10 | #undef PACKAGE_NAME 11 | #undef PACKAGE_STRING 12 | #undef PACKAGE_TARNAME 13 | #undef PACKAGE_URL 14 | #undef PACKAGE_VERSION 15 | 16 | /* Include the real autoconf header */ 17 | #include "modsecurity_config_auto.h" 18 | 19 | /* Undefine all these (again) so there are no conflicts */ 20 | #undef PACKAGE 21 | #undef PACKAGE_BUGREPORT 22 | #undef PACKAGE_NAME 23 | #undef PACKAGE_STRING 24 | #undef PACKAGE_TARNAME 25 | #undef PACKAGE_URL 26 | #undef PACKAGE_VERSION 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/apache2/modules.mk: -------------------------------------------------------------------------------- 1 | MOD_SECURITY2 = mod_security2 apache2_config apache2_io apache2_util \ 2 | re re_operators re_actions re_tfns re_variables msc_json \ 3 | msc_logging msc_xml msc_multipart modsecurity msc_parsers msc_util msc_pcre \ 4 | persist_dbm msc_reqbody pdf_protect msc_geo msc_gsb msc_crypt msc_tree msc_unicode acmp msc_lua 5 | 6 | H = re.h modsecurity.h msc_logging.h msc_multipart.h msc_parsers.h msc_json.h \ 7 | msc_pcre.h msc_util.h msc_xml.h persist_dbm.h apache2.h pdf_protect.h \ 8 | msc_geo.h msc_gsb.h msc_crypt.h msc_tree.h msc_unicode.h acmp.h utf8tables.h msc_lua.h 9 | 10 | ${MOD_SECURITY2:=.slo}: ${H} 11 | ${MOD_SECURITY2:=.lo}: ${H} 12 | ${MOD_SECURITY2:=.o}: ${H} 13 | 14 | mod_security2.la: ${MOD_SECURITY2:=.slo} 15 | $(SH_LINK) -rpath $(libexecdir) -module -avoid-version ${MOD_SECURITY2:=.lo} 16 | 17 | DISTCLEAN_TARGETS = modules.mk 18 | 19 | shared = mod_security2.la 20 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/apache2/msc_gsb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ModSecurity for Apache 2.x, http://www.modsecurity.org/ 3 | * Copyright (c) 2004-2013 Trustwave Holdings, Inc. (http://www.trustwave.com/) 4 | * 5 | * You may not use this file except in compliance with 6 | * the License.  You may obtain a copy of the License at 7 | * 8 | *     http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * If any of the files related to licensing are missing or if you have any 11 | * other questions related to licensing please contact Trustwave Holdings, Inc. 12 | * directly using the email address security@modsecurity.org. 13 | */ 14 | 15 | #ifndef _MSC_GSB_H_ 16 | #define _MSC_GSB_H_ 17 | 18 | typedef struct gsb_db gsb_db; 19 | 20 | #include 21 | #include "modsecurity.h" 22 | #include "apr_hash.h" 23 | 24 | struct gsb_db { 25 | apr_file_t *db; 26 | const char *dbfn; 27 | apr_hash_t *gsb_table; 28 | }; 29 | 30 | int DSOLOCAL gsb_db_init(directory_config *dcfg, const char *dbfn, char **error_msg); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/apache2/msc_unicode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ModSecurity for Apache 2.x, http://www.modsecurity.org/ 3 | * Copyright (c) 2004-2013 Trustwave Holdings, Inc. (http://www.trustwave.com/) 4 | * 5 | * You may not use this file except in compliance with 6 | * the License.  You may obtain a copy of the License at 7 | * 8 | *     http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * If any of the files related to licensing are missing or if you have any 11 | * other questions related to licensing please contact Trustwave Holdings, Inc. 12 | * directly using the email address security@modsecurity.org. 13 | */ 14 | 15 | #ifndef _MSC_UNICODE_H_ 16 | #define _MSC_UNICODE_H_ 17 | 18 | typedef struct unicode_map unicode_map; 19 | 20 | #include 21 | #include "modsecurity.h" 22 | #include "apr_hash.h" 23 | 24 | struct unicode_map { 25 | apr_file_t *map; 26 | const char *mapfn; 27 | }; 28 | 29 | int DSOLOCAL unicode_map_init(directory_config *dcfg, const char *mapfn, char **error_msg); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/apache2/persist_dbm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ModSecurity for Apache 2.x, http://www.modsecurity.org/ 3 | * Copyright (c) 2004-2013 Trustwave Holdings, Inc. (http://www.trustwave.com/) 4 | * 5 | * You may not use this file except in compliance with 6 | * the License.  You may obtain a copy of the License at 7 | * 8 | *     http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * If any of the files related to licensing are missing or if you have any 11 | * other questions related to licensing please contact Trustwave Holdings, Inc. 12 | * directly using the email address security@modsecurity.org. 13 | */ 14 | 15 | #ifndef _PERSIST_DBM_H_ 16 | #define _PERSIST_DBM_H_ 17 | 18 | #include "apr_general.h" 19 | #include "modsecurity.h" 20 | 21 | apr_table_t DSOLOCAL *collection_retrieve(modsec_rec *msr, const char *col_name, 22 | const char *col_value, int col_value_length); 23 | 24 | int DSOLOCAL collection_store(modsec_rec *msr, apr_table_t *collection); 25 | 26 | int DSOLOCAL collections_remove_stale(modsec_rec *msr, const char *col_name); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/authors.txt: -------------------------------------------------------------------------------- 1 | b1v1r = Brian Rectanus 2 | brectanu = Brian Rectanus 3 | brectanus = Brian Rectanus 4 | ivanr = Ivan Ristić 5 | rbarnett = Ryan C. Barnett 6 | [anonymous] = Brian Rectanus 7 | (no author) = Brian Rectanus 8 | brenosilva = Breno Silva 9 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #rm -rf autom4te.cache 4 | #automake --add-missing --copy --foreign 5 | #autoreconf --install 6 | #autoheader 7 | 8 | rm -rf autom4te.cache 9 | rm -f aclocal.m4 10 | case `uname` in Darwin*) glibtoolize --force --copy ;; 11 | *) libtoolize --force --copy ;; esac 12 | autoreconf --install 13 | autoheader 14 | automake --add-missing --foreign --copy --force-missing 15 | autoconf --force 16 | rm -rf autom4te.cache 17 | 18 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/build/apxs-wrapper.in: -------------------------------------------------------------------------------- 1 | #!@SHELL@ 2 | 3 | WRAPPED_OPTS="" 4 | for opt in "$@"; do 5 | case "$opt" in 6 | # Fix for -R not working w/apxs 7 | -R*) WRAPPED_OPTS="$WRAPPED_OPTS -Wl,$opt" ;; 8 | # OSF1 compiler option 9 | -pthread) WRAPPED_OPTS="$WRAPPED_OPTS -Wc,$opt" ;; 10 | # Unwrapped 11 | *) WRAPPED_OPTS="$WRAPPED_OPTS $opt" ;; 12 | esac 13 | done 14 | 15 | exec @APXS@ $WRAPPED_OPTS 16 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/doc/README.txt: -------------------------------------------------------------------------------- 1 | Please access the ModSecurity Github space to access the below documentation. 2 | 3 | * ModSecurity 2 Data Formats 4 | * ModSecurity Frequently Asked Questions (FAQ) 5 | * ModSecurity Migration Matrix 6 | * ModSecurity Rules Language Porting Specification 7 | * ModSecurity Wiki 8 | * Reference Manual 9 | * RoadMap 10 | 11 | https://github.com/SpiderLabs/ModSecurity/wiki/ 12 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/iis/ModSecurity.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/iis/dependencies/build_libxml2.bat: -------------------------------------------------------------------------------- 1 | cd "%WORK_DIR%" 2 | 3 | @if NOT EXIST "%SOURCE_DIR%\%LIBXML2%" goto file_not_found_bin 4 | 5 | @7z.exe x "%SOURCE_DIR%\%LIBXML2%" -so | 7z.exe x -aoa -si -ttar 6 | 7 | set LIBXML2_DIR=%LIBXML2:~0,-7% 8 | 9 | move "%LIBXML2_DIR%" "libxml2" 10 | 11 | :: fart.exe -r -i -C "%WORK_DIR%\%LIBXML2_DIR%\win32\*.*" \x2Fopt:nowin98 " " 12 | cd "libxml2\win32" 13 | CSCRIPT configure.js iconv=no vcmanifest=yes zlib=yes 14 | @if NOT (%ERRORLEVEL%) == (0) goto build_failed 15 | NMAKE -f Makefile.msvc 16 | @if NOT (%ERRORLEVEL%) == (0) goto build_failed 17 | 18 | cd "%WORK%" 19 | 20 | copy /y "%WORK_DIR%\libxml2\win32\bin.msvc\libxml2.dll" "%OUTPUT_DIR%" 21 | copy /y "%WORK_DIR%\libxml2\win32\bin.msvc\libxml2.lib" "%OUTPUT_DIR%" 22 | 23 | @exit /B 0 24 | 25 | :file_not_found_bin 26 | @echo File not found: "%SOURCE_DIR%\%LIBXML2%" 27 | @goto failed 28 | 29 | :build_failed 30 | @echo Problems during the building phase 31 | @goto failed 32 | 33 | :failed 34 | @exit /B 1 35 | 36 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/iis/dependencies/build_pcre.bat: -------------------------------------------------------------------------------- 1 | cd "%WORK_DIR%" 2 | 3 | @if NOT EXIST "%SOURCE_DIR%\%APACHE_BIN%" goto file_not_found_bin 4 | 5 | 7z.exe x "%SOURCE_DIR%\%PCRE%" 6 | set PCRE_DIR=%PCRE:~0,-4% 7 | 8 | move "%PCRE_DIR%" "pcre" 9 | 10 | cd "pcre" 11 | CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=True 12 | @if NOT (%ERRORLEVEL%) == (0) goto build_failed 13 | NMAKE 14 | @if NOT (%ERRORLEVEL%) == (0) goto build_failed 15 | cd "%WORK%" 16 | 17 | copy /y "%WORK_DIR%\pcre\pcre.dll" "%OUTPUT_DIR%" 18 | copy /y "%WORK_DIR%\pcre\pcre.pdb" "%OUTPUT_DIR%" 19 | copy /y "%WORK_DIR%\pcre\pcre.lib" "%OUTPUT_DIR%" 20 | echo "a" 21 | @exit /B 0 22 | 23 | :file_not_found_bin 24 | @echo File not found: "%SOURCE_DIR%\%PCRE%" 25 | @goto failed 26 | 27 | :build_failed 28 | @echo Problems during the building phase 29 | @goto failed 30 | 31 | :failed 32 | @exit /B 1 33 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/iis/dependencies/build_zlib.bat: -------------------------------------------------------------------------------- 1 | cd "%WORK_DIR%" 2 | 3 | @if NOT EXIST "%SOURCE_DIR%\%ZLIB%" goto file_not_found_bin 4 | 5 | 6 | @7z.exe x "%SOURCE_DIR%\%ZLIB%" -so | 7z.exe x -aoa -si -ttar 7 | 8 | set ZLIB_DIR=%ZLIB:~0,-7% 9 | 10 | move "%ZLIB_DIR%" "zlib" 11 | 12 | cd "zlib" 13 | nmake -f win32\Makefile.msc 14 | @if NOT (%ERRORLEVEL%) == (0) goto build_failed 15 | SET INCLUDE=%INCLUDE%;%WORK_DIR%\zlib 16 | SET LIB=%LIB%;%WORK_DIR%\zlib 17 | cd "%WORK_DIR%" 18 | 19 | copy /y "%WORK_DIR%\zlib\zlib1.dll" "%OUTPUT_DIR%" 20 | copy /y "%WORK_DIR%\zlib\zlib1.pdb" "%OUTPUT_DIR%" 21 | copy /y "%WORK_DIR%\zlib\zdll.lib" "%OUTPUT_DIR%" 22 | 23 | @exit /B 0 24 | 25 | :file_not_found_bin 26 | @echo File not found: "%SOURCE_DIR%\%ZLIB%" 27 | @goto failed 28 | 29 | :build_failed 30 | @echo Problems during the building phase 31 | @goto failed 32 | 33 | :failed 34 | @exit /B 1 35 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/iis/mymodule.def: -------------------------------------------------------------------------------- 1 | LIBRARY "ModSecurityIIS" 2 | 3 | EXPORTS 4 | RegisterModule 5 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/iis/wix/Microsoft_VC110_CRT_x64.msm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeusoftSecurity/SEnginx/d4b03e7a6f3fa288740089f203d6d1b10050d834/3rd-party/ModSecurity/iis/wix/Microsoft_VC110_CRT_x64.msm -------------------------------------------------------------------------------- /3rd-party/ModSecurity/iis/wix/Microsoft_VC110_CRT_x86.msm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeusoftSecurity/SEnginx/d4b03e7a6f3fa288740089f203d6d1b10050d834/3rd-party/ModSecurity/iis/wix/Microsoft_VC110_CRT_x86.msm -------------------------------------------------------------------------------- /3rd-party/ModSecurity/iis/wix/Microsoft_VC120_CRT_x64.msm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeusoftSecurity/SEnginx/d4b03e7a6f3fa288740089f203d6d1b10050d834/3rd-party/ModSecurity/iis/wix/Microsoft_VC120_CRT_x64.msm -------------------------------------------------------------------------------- /3rd-party/ModSecurity/iis/wix/Microsoft_VC120_CRT_x86.msm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeusoftSecurity/SEnginx/d4b03e7a6f3fa288740089f203d6d1b10050d834/3rd-party/ModSecurity/iis/wix/Microsoft_VC120_CRT_x86.msm -------------------------------------------------------------------------------- /3rd-party/ModSecurity/iis/wix/README.TXT: -------------------------------------------------------------------------------- 1 | Please note that installing ModSecurity for IIS requires IIS to be installed and enabled. 2 | 3 | 4 | After installing ModSecurity for IIS, the module will be running in all websites by default. To remove from a website add to web.config: 5 | 6 | 7 | 8 | 9 | 10 | To configure module in a website add to web.config: 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | where configFile is standard ModSecurity config file. 20 | 21 | Events from the module will show up in "Application" Windows log. 22 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/iis/wix/banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeusoftSecurity/SEnginx/d4b03e7a6f3fa288740089f203d6d1b10050d834/3rd-party/ModSecurity/iis/wix/banner.jpg -------------------------------------------------------------------------------- /3rd-party/ModSecurity/iis/wix/dialog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeusoftSecurity/SEnginx/d4b03e7a6f3fa288740089f203d6d1b10050d834/3rd-party/ModSecurity/iis/wix/dialog.jpg -------------------------------------------------------------------------------- /3rd-party/ModSecurity/iis/wix/modsecurity_iis.conf: -------------------------------------------------------------------------------- 1 | Include modsecurity.conf 2 | Include modsecurity_crs_10_setup.conf 3 | Include owasp_crs\base_rules\*.conf 4 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/mlogc/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | bin_SCRIPTS = mlogc-batch-load.pl 3 | 4 | bin_PROGRAMS = mlogc 5 | 6 | mlogc_SOURCES = mlogc.c 7 | 8 | mlogc_CPPFLAGS = @APR_CPPFLAGS@ \ 9 | @PCRE_CPPFLAGS@ \ 10 | @CURL_CPPFLAGS@ \ 11 | -I$(top_srcdir)/apache2 12 | 13 | mlogc_CFLAGS = @APR_CFLAGS@ \ 14 | @CURL_CFLAGS@ \ 15 | @PCRE_CFLAGS@ 16 | 17 | mlogc_LDFLAGS = @APR_LDFLAGS@ \ 18 | @CURL_LDFLAGS@ \ 19 | @PCRE_LDFLAGS@ 20 | 21 | mlogc_LDADD = @APR_LDADD@ \ 22 | @CURL_LDADD@ \ 23 | @PCRE_LDADD@ 24 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/nginx/TODO: -------------------------------------------------------------------------------- 1 | Modsecurity NGINX TODO 2 | 3 | * Code Cleanup 4 | 5 | * Create a method for action DROP as in Apache 6 | 7 | * Add CRS Support 8 | 9 | * Specific NGINX config file 10 | 11 | * Separate nginx/ IIS/ apache/ and generic/ folders 12 | 13 | * Source code documentation (insert doxygen headers) 14 | 15 | * Create better build infrastructure with support for tests and automated regression 16 | 17 | * Better things for test 18 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/nginx/modsecurity/apr_bucket_nginx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "apr_buckets.h" 4 | 5 | apr_bucket * apr_bucket_nginx_create(ngx_buf_t *buf, 6 | apr_pool_t *p, 7 | apr_bucket_alloc_t *list); 8 | 9 | apr_bucket * apr_bucket_nginx_make(apr_bucket *e, ngx_buf_t *buf, 10 | apr_pool_t *pool); 11 | 12 | #define ngx_buf_to_apr_bucket apr_bucket_nginx_create 13 | 14 | ngx_buf_t * apr_bucket_to_ngx_buf(apr_bucket *e, ngx_pool_t *pool); 15 | 16 | ngx_int_t move_chain_to_brigade(ngx_chain_t *chain, apr_bucket_brigade *bb, ngx_pool_t *pool, ngx_int_t last_buf); 17 | ngx_int_t move_brigade_to_chain(apr_bucket_brigade *bb, ngx_chain_t **chain, ngx_pool_t *pool); 18 | 19 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/nginx/modsecurity/ngx_pool_context.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef _NGX_POOL_CONTEXT_H_INCLUDE_ 4 | #define _NGX_POOL_CONTEXT_H_INCLUDE_ 5 | 6 | void* ngx_pool_get_ctx(ngx_pool_t * pool, ngx_uint_t index); 7 | ngx_int_t ngx_pool_set_ctx(ngx_pool_t * pool, ngx_uint_t index,void * data); 8 | 9 | #define ngx_http_get_module_pool_ctx(r, module) ngx_pool_get_ctx(r->pool, module.index) 10 | #define ngx_http_set_pool_ctx(r, c, module) ngx_pool_set_ctx(r->pool, module.index, c) 11 | 12 | #endif /* _NGX_POOL_CONTEXT_H_INCLUDE_ */ 13 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/stamp-h1: -------------------------------------------------------------------------------- 1 | timestamp for modsecurity_config_auto.h 2 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/standalone/modules.mk: -------------------------------------------------------------------------------- 1 | MOD_SECURITY2 = mod_security2 apache2_config apache2_io apache2_util \ 2 | re re_operators re_actions re_tfns re_variables \ 3 | msc_logging msc_xml msc_multipart modsecurity msc_parsers msc_util msc_pcre \ 4 | persist_dbm msc_reqbody pdf_protect msc_geo msc_gsb msc_unicode acmp msc_lua 5 | 6 | H = re.h modsecurity.h msc_logging.h msc_multipart.h msc_parsers.h \ 7 | msc_pcre.h msc_util.h msc_xml.h persist_dbm.h apache2.h pdf_protect.h \ 8 | msc_geo.h msc_gsb.h msc_unicode.h acmp.h utf8tables.h msc_lua.h 9 | 10 | ${MOD_SECURITY2:=.slo}: ${H} 11 | ${MOD_SECURITY2:=.lo}: ${H} 12 | ${MOD_SECURITY2:=.o}: ${H} 13 | 14 | mod_security2.la: ${MOD_SECURITY2:=.slo} 15 | $(SH_LINK) -rpath $(libexecdir) -module -avoid-version ${MOD_SECURITY2:=.lo} 16 | 17 | DISTCLEAN_TARGETS = modules.mk 18 | 19 | shared = mod_security2.la 20 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/standalone/standalone.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -c d:\temp\antixss.conf -u d:\temp\modsec_urls.txt d:\temp\test1.dat 5 | WindowsLocalDebugger 6 | $(TargetPath) 7 | false 8 | NativeOnly 9 | 10 | 11 | -c d:\xss.conf d:\test.dat 12 | WindowsLocalDebugger 13 | 14 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/action/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeusoftSecurity/SEnginx/d4b03e7a6f3fa288740089f203d6d1b10050d834/3rd-party/ModSecurity/tests/action/.empty -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/csv_rx-pm.pl.in: -------------------------------------------------------------------------------- 1 | #!@PERL@ 2 | # 3 | # Example to generate CSV performance data from test results taken from 4 | # test generated by gen_rx-pm.pl. 5 | # 6 | use strict; 7 | 8 | my %H = (); 9 | while (<>) { 10 | chomp; 11 | my ($op, $label, $n, $i, $value) = (m/\s*\d+\)\s+\S+\s+"([^"]*)"\s+(\S+)\s+(\d+) item\(s\): passed\s+\((\d+)\s+\@\s+([-\+\d\.E]+) msec\s.*/); 12 | 13 | next unless defined($value); 14 | $H{$n}{$label} = $value; 15 | 16 | } 17 | 18 | printf "%s, %s, %s, %s\n", qw(N rx1 rx2 pm1); 19 | for (sort {$a <=> $b} keys %H) { 20 | printf "%s, %s, %s, %s\n", $_, $H{$_}{rx1}, $H{$_}{rx2}, $H{$_}{pm1} 21 | }; 22 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/op/beginsWith.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | { 3 | type => "op", 4 | name => "beginsWith", 5 | param => "", 6 | input => "", 7 | ret => 1, 8 | }, 9 | { 10 | type => "op", 11 | name => "beginsWith", 12 | param => "TestCase", 13 | input => "", 14 | ret => 0, 15 | }, 16 | { 17 | type => "op", 18 | name => "beginsWith", 19 | param => "", 20 | input => "TestCase", 21 | ret => 1, 22 | }, 23 | 24 | ### General 25 | { 26 | type => "op", 27 | name => "beginsWith", 28 | param => "abcdef", 29 | input => "abcdef", 30 | ret => 1, 31 | }, 32 | { 33 | type => "op", 34 | name => "beginsWith", 35 | param => "abcdef", 36 | input => "abcdefghi", 37 | ret => 1, 38 | }, 39 | { 40 | type => "op", 41 | name => "beginsWith", 42 | param => "abcdef", 43 | input => "abc", 44 | ret => 0, 45 | }, 46 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/op/detectSQLi.t: -------------------------------------------------------------------------------- 1 | { 2 | type => "op", 3 | name => "detectSQLi", 4 | input => "", 5 | ret => 0 6 | }, 7 | { 8 | type => "op", 9 | name => "detectSQLi", 10 | input => "this is not isqli", 11 | ret => 0 12 | }, 13 | { 14 | type => "op", 15 | name => "detectSQLi", 16 | input => "ascii(substring(version() from 1 for 1))", 17 | ret => 1 18 | } 19 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/op/detectXSS.t: -------------------------------------------------------------------------------- 1 | { 2 | type => "op", 3 | name => "detectXSS", 4 | input => "", 5 | ret => 0 6 | }, 7 | { 8 | type => "op", 9 | name => "detectXSS", 10 | input => "this is not an XSS", 11 | ret => 0 12 | }, 13 | { 14 | type => "op", 15 | name => "detectXSS", 16 | input => ")", 17 | ret => 1 18 | } 19 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/op/endsWith.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | { 3 | type => "op", 4 | name => "endsWith", 5 | param => "", 6 | input => "", 7 | ret => 1, 8 | }, 9 | { 10 | type => "op", 11 | name => "endsWith", 12 | param => "TestCase", 13 | input => "", 14 | ret => 0, 15 | }, 16 | { 17 | type => "op", 18 | name => "endsWith", 19 | param => "", 20 | input => "TestCase", 21 | ret => 1, 22 | }, 23 | 24 | ### General 25 | { 26 | type => "op", 27 | name => "endsWith", 28 | param => "abc", 29 | input => "abcdefghi", 30 | ret => 0, 31 | }, 32 | { 33 | type => "op", 34 | name => "endsWith", 35 | param => "def", 36 | input => "abcdefghi", 37 | ret => 0, 38 | }, 39 | { 40 | type => "op", 41 | name => "endsWith", 42 | param => "ghi", 43 | input => "abcdefghi", 44 | ret => 1, 45 | }, 46 | { 47 | type => "op", 48 | name => "endsWith", 49 | param => "ghi", 50 | input => "abcdef\0ghi", 51 | ret => 1, 52 | }, 53 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/op/geoLookup.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | # NOTE: All will return 0 because of lacking DB 3 | { 4 | type => "op", 5 | name => "geoLookup", 6 | param => "", 7 | input => "", 8 | ret => 0, 9 | }, 10 | { 11 | type => "op", 12 | name => "geoLookup", 13 | param => "TestCase", 14 | input => "", 15 | ret => 0, 16 | }, 17 | 18 | # Failed Lookup 19 | { 20 | type => "op", 21 | name => "geoLookup", 22 | param => "", 23 | input => "127.0.0.1", 24 | ret => 0, 25 | }, 26 | 27 | # Good 28 | { 29 | type => "op", 30 | name => "geoLookup", 31 | param => "", 32 | input => "216.75.21.122", 33 | #ret => 1, 34 | ret => 0, 35 | }, 36 | { 37 | type => "op", 38 | name => "geoLookup", 39 | param => "", 40 | input => "www.modsecurity.org", 41 | #ret => 1, 42 | ret => 0, 43 | }, 44 | 45 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/op/inspectFile.t: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/op/noMatch.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | { 3 | type => "op", 4 | name => "noMatch", 5 | param => "", 6 | input => "", 7 | ret => 0, 8 | }, 9 | { 10 | type => "op", 11 | name => "noMatch", 12 | param => "TestCase", 13 | input => "", 14 | ret => 0, 15 | }, 16 | { 17 | type => "op", 18 | name => "noMatch", 19 | param => "", 20 | input => "TestCase", 21 | ret => 0, 22 | }, 23 | 24 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/op/pmFromFile-01.dat: -------------------------------------------------------------------------------- 1 | abc 2 | def 3 | ghi 4 | xxx yyy zzz 5 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/op/pmFromFile.t: -------------------------------------------------------------------------------- 1 | ### No Match 2 | { 3 | type => "op", 4 | name => "pmFromFile", 5 | param => "op/pmFromFile-01.dat", 6 | input => "xxxyyyzzz", 7 | ret => 0, 8 | }, 9 | 10 | ### Multiple 11 | { 12 | type => "op", 13 | name => "pmFromFile", 14 | param => "op/pmFromFile-01.dat", 15 | input => "defxxxyyy", 16 | ret => 1, 17 | }, 18 | { 19 | type => "op", 20 | name => "pmFromFile", 21 | param => "op/pmFromFile-01.dat", 22 | input => "xxxdefyyy", 23 | ret => 1, 24 | }, 25 | { 26 | type => "op", 27 | name => "pmFromFile", 28 | param => "op/pmFromFile-01.dat", 29 | input => "xxxyyydef", 30 | ret => 1, 31 | }, 32 | { 33 | type => "op", 34 | name => "pmFromFile", 35 | param => "op/pmFromFile-01.dat", 36 | input => "xxx yyy zzz", 37 | ret => 1, 38 | }, 39 | { 40 | type => "op", 41 | name => "pmFromFile", 42 | param => "op/pmFromFile-01.dat", 43 | input => "xxx yyy", 44 | ret => 0, 45 | }, 46 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/op/rbl.t: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/op/streq.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | { 3 | type => "op", 4 | name => "streq", 5 | param => "", 6 | input => "", 7 | ret => 1, 8 | }, 9 | { 10 | type => "op", 11 | name => "streq", 12 | param => "TestCase", 13 | input => "", 14 | ret => 0, 15 | }, 16 | { 17 | type => "op", 18 | name => "streq", 19 | param => "", 20 | input => "TestCase", 21 | ret => 0, 22 | }, 23 | 24 | ### General 25 | { 26 | type => "op", 27 | name => "streq", 28 | param => "abc", 29 | input => "abcdefghi", 30 | ret => 0, 31 | }, 32 | { 33 | type => "op", 34 | name => "streq", 35 | param => "def", 36 | input => "abcdefghi", 37 | ret => 0, 38 | }, 39 | { 40 | type => "op", 41 | name => "streq", 42 | param => "ghi", 43 | input => "abcdefghi", 44 | ret => 0, 45 | }, 46 | { 47 | type => "op", 48 | name => "streq", 49 | param => "abcdefghi", 50 | input => "abcdefghi", 51 | ret => 1, 52 | }, 53 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/op/strmatch.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | { 3 | type => "op", 4 | name => "strmatch", 5 | param => "TestCase", 6 | input => "", 7 | ret => 0, 8 | }, 9 | ### General 10 | { 11 | type => "op", 12 | name => "strmatch", 13 | param => "abc", 14 | input => "abcdefghi", 15 | ret => 1, 16 | }, 17 | { 18 | type => "op", 19 | name => "strmatch", 20 | param => "def", 21 | input => "abcdefghi", 22 | ret => 1, 23 | }, 24 | { 25 | type => "op", 26 | name => "strmatch", 27 | param => "ghi", 28 | input => "abcdefghi", 29 | ret => 1, 30 | }, 31 | { 32 | type => "op", 33 | name => "strmatch", 34 | param => "ghij", 35 | input => "abcdefghi", 36 | ret => 0, 37 | }, 38 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/op/unconditionalMatch.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | { 3 | type => "op", 4 | name => "unconditionalMatch", 5 | param => "", 6 | input => "", 7 | ret => 1, 8 | }, 9 | { 10 | type => "op", 11 | name => "unconditionalMatch", 12 | param => "TestCase", 13 | input => "", 14 | ret => 1, 15 | }, 16 | { 17 | type => "op", 18 | name => "unconditionalMatch", 19 | param => "", 20 | input => "TestCase", 21 | ret => 1, 22 | }, 23 | 24 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/op/validateByteRange.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | { 3 | type => "op", 4 | name => "validateByteRange", 5 | param => "0-255", 6 | input => "", 7 | ret => 0, 8 | }, 9 | { 10 | type => "op", 11 | name => "validateByteRange", 12 | param => "", 13 | input => "TestCase", 14 | ret => 1, 15 | }, 16 | 17 | ### Invalid 18 | { 19 | type => "op", 20 | name => "validateByteRange", 21 | param => "xxx", 22 | input => "TestCase", 23 | ret => 1, 24 | }, 25 | { 26 | type => "op", 27 | name => "validateByteRange", 28 | param => "xxx", 29 | input => "\x00", 30 | ret => 0, 31 | }, 32 | 33 | ### General 34 | { 35 | type => "op", 36 | name => "validateByteRange", 37 | param => "0-255", 38 | input => "abcdefghi", 39 | ret => 0, 40 | }, 41 | { 42 | type => "op", 43 | name => "validateByteRange", 44 | param => ord("a")."-".ord("i"), 45 | input => "abcdefghi", 46 | ret => 0, 47 | }, 48 | { 49 | type => "op", 50 | name => "validateByteRange", 51 | param => ord("a")."-".ord("i"), 52 | input => "abcdefghij", 53 | ret => 1, 54 | }, 55 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/op/validateDTD.t: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/op/validateSchema.t: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/op/within.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | { 3 | type => "op", 4 | name => "within", 5 | param => "", 6 | input => "", 7 | ret => 1, 8 | }, 9 | { 10 | type => "op", 11 | name => "within", 12 | param => "TestCase", 13 | input => "", 14 | ret => 1, 15 | }, 16 | { 17 | type => "op", 18 | name => "within", 19 | param => "", 20 | input => "TestCase", 21 | ret => 0, 22 | }, 23 | 24 | ### General 25 | { 26 | type => "op", 27 | name => "within", 28 | param => "abcdefghi", 29 | input => "abc", 30 | ret => 1, 31 | }, 32 | { 33 | type => "op", 34 | name => "within", 35 | param => "abcdefghi", 36 | input => "def", 37 | ret => 1, 38 | }, 39 | { 40 | type => "op", 41 | name => "within", 42 | param => "abcdefghi", 43 | input => "ghi", 44 | ret => 1, 45 | }, 46 | { 47 | type => "op", 48 | name => "within", 49 | param => "abcdefghi", 50 | input => "ghij", 51 | ret => 0, 52 | }, 53 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/action/00-meta.t: -------------------------------------------------------------------------------- 1 | ### Test meta actions 2 | 3 | # TODO: id 4 | # TODO: logdata 5 | # TODO: msg 6 | # TODO: rev 7 | # TODO: severity 8 | # TODO: tag 9 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/action/00-misc.t: -------------------------------------------------------------------------------- 1 | ### Test misc actions 2 | 3 | # TODO: block 4 | # TODO: capture 5 | # TODO: chain 6 | # TODO: deprecatevar 7 | # TODO: exec 8 | # TODO: expirevar 9 | # TODO: initcol 10 | # TODO: multiMatch 11 | # TODO: pause 12 | # TODO: sanitiseArg 13 | # TODO: sanitiseMatched 14 | # TODO: sanitiseRequestHeader 15 | # TODO: sanitiseResponseHeader 16 | # TODO: setuid 17 | # TODO: setsid 18 | # TODO: setenv 19 | # TODO: setvar 20 | # TODO: skip 21 | # TODO: skipAfter 22 | # TODO: xmlns 23 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/action/00-transformations.t: -------------------------------------------------------------------------------- 1 | ### Transformation tests 2 | 3 | # NOTE: individual tests done in unit tests 4 | 5 | # TODO: t:none to override default 6 | # TODO: t:none inline 7 | # TODO: combined 8 | # TODO: caching 9 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/config/00-load-modsec.t: -------------------------------------------------------------------------------- 1 | { 2 | type => "config", 3 | comment => "module loaded", 4 | match_log => { 5 | error => { 6 | apache => [ qr/ModSecurity for Apache.* configured\./, 10 ], 7 | nginx => [ qr/ModSecurity for nginx.* configured\./, 10 ], 8 | }, 9 | }, 10 | }, 11 | { 12 | type => "config", 13 | comment => "minimal config", 14 | conf => sub { 15 | # Open the minimal conf file, substituting the 16 | # relative log paths with full paths. 17 | open(C, "<$ENV{DIST_ROOT}/modsecurity.conf-minimal") or die "$!\n"; 18 | (my $conf = join('', )) =~ s#Log logs/#Log $ENV{TEST_SERVER_ROOT}/logs/#g; 19 | close C; 20 | 21 | return $conf; 22 | }, 23 | match_log => { 24 | error => { 25 | apache => [ qr/ModSecurity for Apache.* configured\./, 10 ], 26 | nginx => [ qr/ModSecurity for nginx.* configured\./, 10 ], 27 | }, 28 | }, 29 | }, 30 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/config/20-chroot.t: -------------------------------------------------------------------------------- 1 | ### SecChroot tests 2 | # TODO: Will not work as we need root access 3 | 4 | #{ 5 | # type => "config", 6 | # comment => "SecChroot", 7 | # httpd_opts => qw( 8 | # -DCHROOT 9 | # ), 10 | # conf => qq( 11 | # # These will be in the chroot 12 | # PidFile /logs/httpd.pid 13 | # ScoreBoardFile /logs/httpd.scoreboard 14 | # User nobody 15 | # Group nogroup 16 | # 17 | # SecAuditEngine On 18 | # SecDebugLog $ENV{DEBUG_LOG} 19 | # SecDebugLogLevel 9 20 | # SecAuditLog $ENV{AUDIT_LOG} 21 | # SecAuditLogStorageDir "/logs/audit" 22 | # SecAuditLogType Concurrent 23 | # SecChrootDir "$ENV{TEST_SERVER_ROOT}" 24 | # ), 25 | # match_log => { 26 | # debug => [ qr/./, 1 ], 27 | # audit => [ qr/./, 1 ], 28 | # }, 29 | # match_response => { 30 | # status => qr/^200$/, 31 | # }, 32 | # request => new HTTP::Request( 33 | # GET => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt", 34 | # ), 35 | #}, 36 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/nginx/conf/SoapEnvelope-bad.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/nginx/conf/SoapEnvelope.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/nginx/conf/empty.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeusoftSecurity/SEnginx/d4b03e7a6f3fa288740089f203d6d1b10050d834/3rd-party/ModSecurity/tests/regression/nginx/conf/empty.conf -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/nginx/conf/match.lua: -------------------------------------------------------------------------------- 1 | -- Test matching Lua Script to just print debug messages 2 | function main() 3 | m.log(1, "Test message."); 4 | m.log(2, "Test message."); 5 | m.log(3, "Test message."); 6 | m.log(4, "Test message."); 7 | m.log(5, "Test message."); 8 | m.log(6, "Test message."); 9 | m.log(7, "Test message."); 10 | m.log(8, "Test message."); 11 | m.log(9, "Test message."); 12 | 13 | return "Lua script matched."; 14 | end 15 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/nginx/conf/nginx.conf.template: -------------------------------------------------------------------------------- 1 | 2 | user root; 3 | worker_processes 1; 4 | daemon on; 5 | error_log logs/error.log debug; 6 | events { 7 | worker_connections 1024; 8 | } 9 | 10 | http { 11 | ModSecurityEnabled [% enable %]; 12 | ModSecurityConfig [% config %]; 13 | server { 14 | 15 | listen [% listen %]; 16 | server_name localhost; 17 | location / { 18 | error_page 405 = $uri; 19 | } 20 | } 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/nginx/conf/test.lua: -------------------------------------------------------------------------------- 1 | -- Test Lua Script to just print debug messages 2 | function main() 3 | m.log(1, "Test message."); 4 | m.log(2, "Test message."); 5 | m.log(3, "Test message."); 6 | m.log(4, "Test message."); 7 | m.log(5, "Test message."); 8 | m.log(6, "Test message."); 9 | m.log(7, "Test message."); 10 | m.log(8, "Test message."); 11 | m.log(9, "Test message."); 12 | 13 | return nil; 14 | end 15 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/rule/00-inheritance.t: -------------------------------------------------------------------------------- 1 | ### Tests for rule inheritance 2 | 3 | ### TODO: 4 | # SecRuleInheritance 5 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/server_root/conf/SoapEnvelope-bad.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/server_root/conf/SoapEnvelope.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/server_root/conf/match.lua: -------------------------------------------------------------------------------- 1 | -- Test matching Lua Script to just print debug messages 2 | function main() 3 | m.log(1, "Test message."); 4 | m.log(2, "Test message."); 5 | m.log(3, "Test message."); 6 | m.log(4, "Test message."); 7 | m.log(5, "Test message."); 8 | m.log(6, "Test message."); 9 | m.log(7, "Test message."); 10 | m.log(8, "Test message."); 11 | m.log(9, "Test message."); 12 | 13 | return "Lua script matched."; 14 | end 15 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/server_root/conf/test.lua: -------------------------------------------------------------------------------- 1 | -- Test Lua Script to just print debug messages 2 | function main() 3 | m.log(1, "Test message."); 4 | m.log(2, "Test message."); 5 | m.log(3, "Test message."); 6 | m.log(4, "Test message."); 7 | m.log(5, "Test message."); 8 | m.log(6, "Test message."); 9 | m.log(7, "Test message."); 10 | m.log(8, "Test message."); 11 | m.log(9, "Test message."); 12 | 13 | return nil; 14 | end 15 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/server_root/data/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeusoftSecurity/SEnginx/d4b03e7a6f3fa288740089f203d6d1b10050d834/3rd-party/ModSecurity/tests/regression/server_root/data/.empty -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/server_root/data/ip.dir: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeusoftSecurity/SEnginx/d4b03e7a6f3fa288740089f203d6d1b10050d834/3rd-party/ModSecurity/tests/regression/server_root/data/ip.dir -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/server_root/htdocs/index.html: -------------------------------------------------------------------------------- 1 | INDEX 2 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/server_root/htdocs/test.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeusoftSecurity/SEnginx/d4b03e7a6f3fa288740089f203d6d1b10050d834/3rd-party/ModSecurity/tests/regression/server_root/htdocs/test.pdf -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/server_root/htdocs/test.txt: -------------------------------------------------------------------------------- 1 | TEST 2 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/server_root/htdocs/test2.txt: -------------------------------------------------------------------------------- 1 | TEST 2 2 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/server_root/logs/audit/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeusoftSecurity/SEnginx/d4b03e7a6f3fa288740089f203d6d1b10050d834/3rd-party/ModSecurity/tests/regression/server_root/logs/audit/.empty -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/server_root/logs/subdir/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeusoftSecurity/SEnginx/d4b03e7a6f3fa288740089f203d6d1b10050d834/3rd-party/ModSecurity/tests/regression/server_root/logs/subdir/.empty -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/server_root/tmp/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeusoftSecurity/SEnginx/d4b03e7a6f3fa288740089f203d6d1b10050d834/3rd-party/ModSecurity/tests/regression/server_root/tmp/.empty -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/regression/server_root/upload/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeusoftSecurity/SEnginx/d4b03e7a6f3fa288740089f203d6d1b10050d834/3rd-party/ModSecurity/tests/regression/server_root/upload/.empty -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/tfn/base64Encode.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | { 3 | type => "tfn", 4 | name => "base64Encode", 5 | input => "", 6 | output => "", 7 | ret => 0, 8 | }, 9 | 10 | ### Test values with varying lengths to check padding 11 | { 12 | type => "tfn", 13 | name => "base64Encode", 14 | input => "TestCase", 15 | output => "VGVzdENhc2U=", 16 | ret => 1, 17 | }, 18 | { 19 | type => "tfn", 20 | name => "base64Encode", 21 | input => "TestCase1", 22 | output => "VGVzdENhc2Ux", 23 | ret => 1, 24 | }, 25 | { 26 | type => "tfn", 27 | name => "base64Encode", 28 | input => "TestCase12", 29 | output => "VGVzdENhc2UxMg==", 30 | ret => 1, 31 | }, 32 | 33 | ### Check with a NUL 34 | { 35 | type => "tfn", 36 | name => "base64Encode", 37 | input => "Test\0Case", 38 | output => "VGVzdABDYXNl", 39 | ret => 1, 40 | }, 41 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/tfn/hexDecode.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | { 3 | type => "tfn", 4 | name => "hexDecode", 5 | input => "", 6 | output => "", 7 | ret => 1, 8 | }, 9 | 10 | ### Basic 11 | { 12 | type => "tfn", 13 | name => "hexDecode", 14 | input => "5465737443617365", 15 | output => "TestCase", 16 | ret => 1, 17 | }, 18 | 19 | ### Basic w/NULL 20 | { 21 | type => "tfn", 22 | name => "hexDecode", 23 | input => "546573740043617365", 24 | output => "Test\0Case", 25 | ret => 1, 26 | }, 27 | 28 | ### Invalid 29 | # What should happen here? Probably just fail and leave alone. 30 | { 31 | type => "tfn", 32 | name => "hexDecode", 33 | input => "01234567890a0z01234567890a", 34 | output => "\x01#Eg\x89\x0a#\x01#Eg\x89\x0a", 35 | ret => 1, 36 | }, 37 | { 38 | type => "tfn", 39 | name => "hexDecode", 40 | input => "01234567890az", 41 | output => "\x01#Eg\x89\x0a", 42 | ret => 1, 43 | }, 44 | { 45 | type => "tfn", 46 | name => "hexDecode", 47 | input => "01234567890a0", 48 | output => "\x01#Eg\x89\x0a", 49 | ret => 1, 50 | }, 51 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/tfn/hexEncode.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | { 3 | type => "tfn", 4 | name => "hexEncode", 5 | input => "", 6 | output => "", 7 | ret => 1, 8 | }, 9 | 10 | ### Basic 11 | { 12 | type => "tfn", 13 | name => "hexEncode", 14 | input => "TestCase", 15 | output => "5465737443617365", 16 | ret => 1, 17 | }, 18 | 19 | ### Basic w/NULL 20 | { 21 | type => "tfn", 22 | name => "hexEncode", 23 | input => "Test\0Case", 24 | output => "546573740043617365", 25 | ret => 1, 26 | }, 27 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/tfn/length.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | { 3 | type => "tfn", 4 | name => "length", 5 | input => "", 6 | output => "0", 7 | ret => 1, 8 | }, 9 | 10 | 11 | ### Basic normal and large 12 | { 13 | type => "tfn", 14 | name => "length", 15 | input => "0123456789abcdef", 16 | output => "16", 17 | ret => 1, 18 | }, 19 | # ENH: This sometimes fails w/4096 length 20 | #{ 21 | # type => "tfn", 22 | # name => "length", 23 | # input => ('x' x 8192), 24 | # output => "8192", 25 | # ret => 1, 26 | #}, 27 | 28 | ### With TAB 29 | { 30 | type => "tfn", 31 | name => "length", 32 | input => "0123456789\tabcdef", 33 | output => "17", 34 | ret => 1, 35 | }, 36 | 37 | ### With NUL 38 | { 39 | type => "tfn", 40 | name => "length", 41 | input => "Test\0Case", 42 | output => "9", 43 | ret => 1, 44 | }, 45 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/tfn/lowercase.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | { 3 | type => "tfn", 4 | name => "lowercase", 5 | input => "", 6 | output => "", 7 | ret => 0, 8 | }, 9 | 10 | ### Nothing 11 | { 12 | type => "tfn", 13 | name => "lowercase", 14 | input => "testcase", 15 | output => "testcase", 16 | ret => 0, 17 | }, 18 | { 19 | type => "tfn", 20 | name => "lowercase", 21 | input => "test\0case", 22 | output => "test\0case", 23 | ret => 0, 24 | }, 25 | 26 | ### Basic 27 | { 28 | type => "tfn", 29 | name => "lowercase", 30 | input => "TestCase", 31 | output => "testcase", 32 | ret => 1, 33 | }, 34 | { 35 | type => "tfn", 36 | name => "lowercase", 37 | input => "Test\0Case", 38 | output => "test\0case", 39 | ret => 1, 40 | }, 41 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/tfn/md5.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | { 3 | type => "tfn", 4 | name => "md5", 5 | input => "", 6 | output => "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04\xe9\x80\x09\x98\xec\xf8\x42\x7e", 7 | ret => 1, 8 | }, 9 | 10 | ### Basic 11 | { 12 | type => "tfn", 13 | name => "md5", 14 | input => "TestCase", 15 | output => "\xc9\xab\xa2\xc3\xe6\x01\x26\x16\x9e\x80\xe9\xa2\x6b\xa2\x73\xc1", 16 | ret => 1, 17 | }, 18 | 19 | ### Binary w/NUL 20 | { 21 | type => "tfn", 22 | name => "md5", 23 | input => "\x00\x01\x02\x03\x04\x05\x06\x07\x08", 24 | output => "\xa6\xe7\xd3\xb4\x6f\xdf\xaf\x0b\xde\x2a\x1f\x83\x2a\x00\xd2\xde", 25 | ret => 1, 26 | }, 27 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/tfn/parityZero7bit.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | { 3 | type => "tfn", 4 | name => "parityZero7bit", 5 | input => "", 6 | output => "", 7 | ret => 0, 8 | }, 9 | 10 | ### Nothing 11 | { 12 | type => "tfn", 13 | name => "parityZero7bit", 14 | input => "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 15 | output => "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 16 | ret => 0, 17 | }, 18 | { 19 | type => "tfn", 20 | name => "parityZero7bit", 21 | input => "abcdefghijklmnopqrstuvwxyz\x000123456789\x00ABCDEFGHIJKLMNOPQRSTUVWXYZ", 22 | output => "abcdefghijklmnopqrstuvwxyz\x000123456789\x00ABCDEFGHIJKLMNOPQRSTUVWXYZ", 23 | ret => 0, 24 | }, 25 | 26 | ### Basic 27 | { 28 | type => "tfn", 29 | name => "parityZero7bit", 30 | input => "\x80\x00\x8f\xff", 31 | output => "\x00\x00\x0f\x7f", 32 | ret => 1, 33 | }, 34 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/tfn/removeWhitespace.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | { 3 | type => "tfn", 4 | name => "removeWhitespace", 5 | input => "", 6 | output => "", 7 | ret => 0, 8 | }, 9 | 10 | ### Nothing 11 | { 12 | type => "tfn", 13 | name => "removeWhitespace", 14 | input => "TestCase", 15 | output => "TestCase", 16 | ret => 0, 17 | }, 18 | { 19 | type => "tfn", 20 | name => "removeWhitespace", 21 | input => "Test\0Case", 22 | output => "Test\0Case", 23 | ret => 0, 24 | }, 25 | 26 | 27 | ### Remove space/tab 28 | { 29 | type => "tfn", 30 | name => "removeWhitespace", 31 | input => " Test \t Case ", 32 | output => "TestCase", 33 | ret => 1, 34 | }, 35 | 36 | ### Pretty much everything in one 37 | { 38 | type => "tfn", 39 | name => "removeWhitespace", 40 | input => "This is a test case with a tab \t, vtab \x0b, newline \x0a, return \x0d, formfeed \f, and a NUL\0 in it with a CRLF at the end.\x0d\x0a", 41 | output => "Thisisatestcasewithatab,vtab,newline,return,formfeed,andaNUL\0initwithaCRLFattheend.", 42 | ret => 1, 43 | }, 44 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/tfn/replaceNulls.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | { 3 | type => "tfn", 4 | name => "replaceNulls", 5 | input => "", 6 | output => "", 7 | ret => 0, 8 | }, 9 | 10 | ### Nothing 11 | { 12 | type => "tfn", 13 | name => "replaceNulls", 14 | input => "TestCase", 15 | output => "TestCase", 16 | ret => 0, 17 | }, 18 | 19 | 20 | ### Basics 21 | { 22 | type => "tfn", 23 | name => "replaceNulls", 24 | input => "\0TestCase", 25 | output => " TestCase", 26 | ret => 1, 27 | }, 28 | { 29 | type => "tfn", 30 | name => "replaceNulls", 31 | input => "Test\0Case", 32 | output => "Test Case", 33 | ret => 1, 34 | }, 35 | { 36 | type => "tfn", 37 | name => "replaceNulls", 38 | input => "Test\0\0Case", 39 | output => "Test Case", 40 | ret => 1, 41 | }, 42 | { 43 | type => "tfn", 44 | name => "replaceNulls", 45 | input => "TestCase\0", 46 | output => "TestCase ", 47 | ret => 1, 48 | }, 49 | { 50 | type => "tfn", 51 | name => "replaceNulls", 52 | input => "\0Test\0Case\0", 53 | output => " Test Case ", 54 | ret => 1, 55 | }, 56 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tests/tfn/sha1.t: -------------------------------------------------------------------------------- 1 | ### Empty 2 | { 3 | type => "tfn", 4 | name => "sha1", 5 | input => "", 6 | output => "\xda\x39\xa3\xee\x5e\x6b\x4b\x0d\x32\x55\xbf\xef\x95\x60\x18\x90\xaf\xd8\x07\x09", 7 | ret => 1, 8 | }, 9 | 10 | ### Basic 11 | { 12 | type => "tfn", 13 | name => "sha1", 14 | input => "TestCase", 15 | output => "\xa7\x0c\xe3\x83\x89\xe3\x18\xbd\x2b\xe1\x8a\x01\x11\xc6\xdc\x76\xbd\x2c\xd9\xed", 16 | ret => 1, 17 | }, 18 | 19 | ### Binary w/NUL 20 | { 21 | type => "tfn", 22 | name => "sha1", 23 | input => "\x00\x01\x02\x03\x04\x05\x06\x07\x08", 24 | output => "\x63\xbf\x60\xc7\x10\x5a\x07\xa2\xb1\x25\xbb\xf8\x9e\x61\xab\xda\xbc\x69\x78\xc2", 25 | ret => 1, 26 | }, 27 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tools/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_SCRIPTS = rules-updater.pl 2 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tools/README: -------------------------------------------------------------------------------- 1 | These tools are built during the ModSecurity configure process run under the 2 | apache2 directory. To use them you will first need to run configure under 3 | the apache2 directory: 4 | 5 | ./configure [any options] 6 | 7 | -------------------------------------------------------------------------------- /3rd-party/ModSecurity/tools/rules-updater-example.conf: -------------------------------------------------------------------------------- 1 | # This is an example configuration to be used with ruleset-updator.pl -c 2 | 3 | # The repository URI. 4 | RepositoryURI http://username:password@www.example.tld/repository/ 5 | 6 | # Where to download the rulesets to 7 | LocalRepository /path/to/repository 8 | 9 | # Where to unpack the rulesets (if Unpack is true) 10 | LocalRules /path/to/repository 11 | 12 | # What version (or version prefix) to use 13 | #Version 1.5 14 | 15 | # Should we unpack the ruleset to LocalRules? 16 | Unpack True 17 | 18 | # Email update notifications 19 | #NotifyEmail "modsec-admin@example.tld, someone@example.tld" 20 | #NotifyEmailFrom "ModSec Rules Updater " 21 | 22 | # Output lots of debugging info? 23 | Debug False 24 | -------------------------------------------------------------------------------- /3rd-party/headers-more-nginx-module/.gitignore: -------------------------------------------------------------------------------- 1 | reindex 2 | .libs 3 | *.swp 4 | *.slo 5 | *.la 6 | *.swo 7 | *.lo 8 | *~ 9 | *.o 10 | print.txt 11 | .rsync 12 | *.tar.gz 13 | dist 14 | build[78] 15 | build 16 | tags 17 | update-readme 18 | *.tmp 19 | test/Makefile 20 | test/blib 21 | test.sh 22 | t.sh 23 | t/t.sh 24 | test/t/servroot/ 25 | releng 26 | reset 27 | *.t_ 28 | genmobi.sh 29 | *.mobi 30 | misc/chunked 31 | src/headers.c 32 | src/headers.h 33 | src/module.c 34 | src/module.h 35 | src/util.c 36 | src/util.h 37 | go 38 | ctags 39 | src/in.c 40 | src/in.h 41 | src/out.c 42 | src/out.h 43 | build[89] 44 | build1[012] 45 | buildroot/ 46 | work/ 47 | all 48 | t/servroot 49 | analyze 50 | cov 51 | nginx 52 | *.plist 53 | a.patch 54 | Makefile 55 | -------------------------------------------------------------------------------- /3rd-party/headers-more-nginx-module/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_headers_more_filter_module 2 | HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_headers_more_filter_module" 3 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/src/ngx_http_headers_more_filter_module.c $ngx_addon_dir/src/ngx_http_headers_more_headers_out.c $ngx_addon_dir/src/ngx_http_headers_more_headers_in.c $ngx_addon_dir/src/ngx_http_headers_more_util.c" 4 | NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_addon_dir/src/ddebug.h $ngx_addon_dir/src/ngx_http_headers_more_filter_module.h $ngx_addon_dir/src/ngx_http_headers_more_headers_in.h $ngx_addon_dir/src/ngx_http_headers_more_headers_out.h $ngx_addon_dir/src/ngx_http_headers_more_headers_in.h $ngx_addon_dir/src/ngx_http_headers_more_util.h" 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/headers-more-nginx-module/src/ngx_http_headers_more_headers_in.h: -------------------------------------------------------------------------------- 1 | #ifndef NGX_HTTP_HEADERS_MORE_INPUT_HEADERS_H 2 | #define NGX_HTTP_HEADERS_MORE_INPUT_HEADERS_H 3 | 4 | #include "ngx_http_headers_more_filter_module.h" 5 | 6 | /* output header setters and clearers */ 7 | 8 | ngx_int_t ngx_http_headers_more_exec_input_cmd(ngx_http_request_t *r, 9 | ngx_http_headers_more_cmd_t *cmd); 10 | 11 | char * ngx_http_headers_more_set_input_headers(ngx_conf_t *cf, 12 | ngx_command_t *cmd, void *conf); 13 | 14 | char * ngx_http_headers_more_clear_input_headers(ngx_conf_t *cf, 15 | ngx_command_t *cmd, void *conf); 16 | 17 | #endif /* NGX_HTTP_HEADERS_MORE_INPUT_HEADERS_H */ 18 | 19 | -------------------------------------------------------------------------------- /3rd-party/headers-more-nginx-module/src/ngx_http_headers_more_headers_out.h: -------------------------------------------------------------------------------- 1 | #ifndef NGX_HTTP_HEADERS_MORE_OUTPUT_HEADERS_H 2 | #define NGX_HTTP_HEADERS_MORE_OUTPUT_HEADERS_H 3 | 4 | #include "ngx_http_headers_more_filter_module.h" 5 | 6 | /* output header setters and clearers */ 7 | 8 | ngx_int_t ngx_http_headers_more_exec_cmd(ngx_http_request_t *r, 9 | ngx_http_headers_more_cmd_t *cmd); 10 | 11 | char * ngx_http_headers_more_set_headers(ngx_conf_t *cf, 12 | ngx_command_t *cmd, void *conf); 13 | 14 | char * ngx_http_headers_more_clear_headers(ngx_conf_t *cf, 15 | ngx_command_t *cmd, void *conf); 16 | 17 | #endif /* NGX_HTTP_HEADERS_MORE_OUTPUT_HEADERS_H */ 18 | 19 | -------------------------------------------------------------------------------- /3rd-party/headers-more-nginx-module/src/ngx_http_headers_more_util.h: -------------------------------------------------------------------------------- 1 | #ifndef NGX_HTTP_HEADERS_MORE_UTIL_H 2 | #define NGX_HTTP_HEADERS_MORE_UTIL_H 3 | 4 | 5 | #include "ngx_http_headers_more_filter_module.h" 6 | 7 | 8 | ngx_int_t 9 | ngx_http_headers_more_parse_header(ngx_conf_t *cf, ngx_str_t *cmd_name, 10 | ngx_str_t *raw_header, ngx_array_t *headers, 11 | ngx_http_headers_more_opcode_t opcode, 12 | ngx_http_headers_more_set_header_t *handlers); 13 | 14 | ngx_int_t ngx_http_headers_more_parse_statuses(ngx_log_t *log, 15 | ngx_str_t *cmd_name, ngx_str_t *value, ngx_array_t *statuses); 16 | 17 | ngx_int_t ngx_http_headers_more_parse_types(ngx_log_t *log, 18 | ngx_str_t *cmd_name, ngx_str_t *value, ngx_array_t *types); 19 | 20 | ngx_int_t ngx_http_headers_more_rm_header_helper(ngx_list_t *l, 21 | ngx_list_part_t *cur, ngx_uint_t i); 22 | 23 | ngx_int_t ngx_http_headers_more_rm_header(ngx_list_t *l, 24 | ngx_table_elt_t *h); 25 | 26 | 27 | #endif /* NGX_HTTP_HEADERS_MORE_UTIL_H */ 28 | 29 | -------------------------------------------------------------------------------- /3rd-party/headers-more-nginx-module/t/eval.t: -------------------------------------------------------------------------------- 1 | # vi:filetype=perl 2 | 3 | use lib 'lib'; 4 | use Test::Nginx::Socket; # 'no_plan'; 5 | 6 | repeat_each(3); 7 | 8 | plan tests => repeat_each() * 2 * blocks(); 9 | 10 | #no_long_string(); 11 | #no_diff; 12 | 13 | run_tests(); 14 | 15 | __DATA__ 16 | 17 | === TEST 1: set request header at client side 18 | --- config 19 | location /foo { 20 | eval_subrequest_in_memory off; 21 | eval_override_content_type text/plain; 22 | eval $res { 23 | echo -n 1; 24 | } 25 | #echo "[$res]"; 26 | if ($res = '1') { 27 | more_set_input_headers 'Foo: Bar'; 28 | echo "OK"; 29 | break; 30 | } 31 | echo "NOT OK"; 32 | } 33 | --- request 34 | GET /foo 35 | --- response_body 36 | OK 37 | 38 | -------------------------------------------------------------------------------- /3rd-party/headers-more-nginx-module/t/phase.t: -------------------------------------------------------------------------------- 1 | # vi:filetype=perl 2 | 3 | use lib 'lib'; 4 | use Test::Nginx::Socket; 5 | 6 | plan tests => 3; 7 | 8 | no_diff; 9 | 10 | run_tests(); 11 | 12 | __DATA__ 13 | 14 | === TEST 1: simple set (1 arg) 15 | --- config 16 | location /foo { 17 | deny all; 18 | more_set_headers 'X-Foo: Blah'; 19 | } 20 | --- request 21 | GET /foo 22 | --- response_headers 23 | X-Foo: Blah 24 | --- response_body_like: 403 Forbidden 25 | --- error_code: 403 26 | 27 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/.gitattributes: -------------------------------------------------------------------------------- 1 | *.t linguist-language=Text 2 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | I hereby granted the copyright of the changes in this pull request 2 | to the authors of this lua-nginx-module project. 3 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_accessby.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_ACCESSBY_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_ACCESSBY_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | ngx_int_t ngx_http_lua_access_handler(ngx_http_request_t *r); 16 | ngx_int_t ngx_http_lua_access_handler_inline(ngx_http_request_t *r); 17 | ngx_int_t ngx_http_lua_access_handler_file(ngx_http_request_t *r); 18 | 19 | 20 | #endif /* _NGX_HTTP_LUA_ACCESSBY_H_INCLUDED_ */ 21 | 22 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 23 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_args.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_LUA_ARGS_H_INCLUDED_ 8 | #define _NGX_HTTP_LUA_ARGS_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_lua_common.h" 12 | 13 | 14 | void ngx_http_lua_inject_req_args_api(lua_State *L); 15 | int ngx_http_lua_parse_args(lua_State *L, u_char *buf, u_char *last, int max); 16 | 17 | 18 | #endif /* _NGX_HTTP_LUA_ARGS_H_INCLUDED_ */ 19 | 20 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 21 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_balancer.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_LUA_BALANCER_H_INCLUDED_ 8 | #define _NGX_HTTP_LUA_BALANCER_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_lua_common.h" 12 | 13 | 14 | ngx_int_t ngx_http_lua_balancer_handler_inline(ngx_http_request_t *r, 15 | ngx_http_lua_srv_conf_t *lscf, lua_State *L); 16 | 17 | ngx_int_t ngx_http_lua_balancer_handler_file(ngx_http_request_t *r, 18 | ngx_http_lua_srv_conf_t *lscf, lua_State *L); 19 | 20 | char *ngx_http_lua_balancer_by_lua(ngx_conf_t *cf, ngx_command_t *cmd, 21 | void *conf); 22 | 23 | char *ngx_http_lua_balancer_by_lua_block(ngx_conf_t *cf, ngx_command_t *cmd, 24 | void *conf); 25 | 26 | 27 | #endif /* _NGX_HTTP_LUA_BALANCER_H_INCLUDED_ */ 28 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_bodyfilterby.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_LUA_BODYFILTERBY_H_INCLUDED_ 8 | #define _NGX_HTTP_LUA_BODYFILTERBY_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_lua_common.h" 12 | 13 | 14 | extern ngx_http_output_body_filter_pt ngx_http_lua_next_filter_body_filter; 15 | 16 | 17 | ngx_int_t ngx_http_lua_body_filter_init(void); 18 | ngx_int_t ngx_http_lua_body_filter_by_chunk(lua_State *L, 19 | ngx_http_request_t *r, ngx_chain_t *in); 20 | ngx_int_t ngx_http_lua_body_filter_inline(ngx_http_request_t *r, 21 | ngx_chain_t *in); 22 | ngx_int_t ngx_http_lua_body_filter_file(ngx_http_request_t *r, 23 | ngx_chain_t *in); 24 | int ngx_http_lua_body_filter_param_get(lua_State *L); 25 | int ngx_http_lua_body_filter_param_set(lua_State *L, ngx_http_request_t *r, 26 | ngx_http_lua_ctx_t *ctx); 27 | 28 | 29 | #endif /* _NGX_HTTP_LUA_BODYFILTERBY_H_INCLUDED_ */ 30 | 31 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 32 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_cache.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_CACHE_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_CACHE_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | ngx_int_t ngx_http_lua_cache_loadbuffer(ngx_log_t *log, lua_State *L, 16 | const u_char *src, size_t src_len, const u_char *cache_key, 17 | const char *name); 18 | ngx_int_t ngx_http_lua_cache_loadfile(ngx_log_t *log, lua_State *L, 19 | const u_char *script, const u_char *cache_key); 20 | 21 | 22 | #endif /* _NGX_HTTP_LUA_CACHE_H_INCLUDED_ */ 23 | 24 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 25 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_capturefilter.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_CAPTUREFILTER_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_CAPTUREFILTER_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | ngx_int_t ngx_http_lua_capture_filter_init(ngx_conf_t *cf); 16 | 17 | 18 | #endif /* NGX_HTTP_LUA_CAPTUREFILTER_H */ 19 | 20 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 21 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_clfactory.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_CLFACTORY_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_CLFACTORY_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | ngx_int_t ngx_http_lua_clfactory_loadfile(lua_State *L, const char *filename); 16 | ngx_int_t ngx_http_lua_clfactory_loadbuffer(lua_State *L, const char *buff, 17 | size_t size, const char *name); 18 | 19 | 20 | #endif /* _NGX_HTTP_LUA_CLFACTORY_H_INCLUDED_ */ 21 | 22 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 23 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_config.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_LUA_CONFIG_H_INCLUDED_ 8 | #define _NGX_HTTP_LUA_CONFIG_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_lua_common.h" 12 | 13 | 14 | void ngx_http_lua_inject_config_api(lua_State *L); 15 | 16 | 17 | #endif /* _NGX_HTTP_LUA_CONFIG_H_INCLUDED_ */ 18 | 19 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 20 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_consts.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_LUA_CONSTS_H_INCLUDED_ 8 | #define _NGX_HTTP_LUA_CONSTS_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_lua_common.h" 12 | 13 | 14 | void ngx_http_lua_inject_http_consts(lua_State *L); 15 | void ngx_http_lua_inject_core_consts(lua_State *L); 16 | 17 | 18 | #endif /* _NGX_HTTP_LUA_CONSTS_H_INCLUDED_ */ 19 | 20 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 21 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_contentby.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_CONTENT_BY_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_CONTENT_BY_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | ngx_int_t ngx_http_lua_content_by_chunk(lua_State *L, ngx_http_request_t *r); 16 | void ngx_http_lua_content_wev_handler(ngx_http_request_t *r); 17 | ngx_int_t ngx_http_lua_content_handler_file(ngx_http_request_t *r); 18 | ngx_int_t ngx_http_lua_content_handler_inline(ngx_http_request_t *r); 19 | ngx_int_t ngx_http_lua_content_handler(ngx_http_request_t *r); 20 | ngx_int_t ngx_http_lua_content_run_posted_threads(lua_State *L, 21 | ngx_http_request_t *r, ngx_http_lua_ctx_t *ctx, int n); 22 | 23 | 24 | #endif /* _NGX_HTTP_LUA_CONTENT_BY_H_INCLUDED_ */ 25 | 26 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 27 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_control.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_CONTROL_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_CONTROL_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | void ngx_http_lua_inject_control_api(ngx_log_t *log, lua_State *L); 16 | 17 | 18 | #endif /* _NGX_HTTP_LUA_CONTROL_H_INCLUDED_ */ 19 | 20 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 21 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_coroutine.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_COROUTINE_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_COROUTINE_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | void ngx_http_lua_inject_coroutine_api(ngx_log_t *log, lua_State *L); 16 | 17 | int ngx_http_lua_coroutine_create_helper(lua_State *L, ngx_http_request_t *r, 18 | ngx_http_lua_ctx_t *ctx, ngx_http_lua_co_ctx_t **pcoctx); 19 | 20 | 21 | #endif /* _NGX_HTTP_LUA_COROUTINE_H_INCLUDED_ */ 22 | 23 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 24 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_ctx.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_CTX_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_CTX_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | int ngx_http_lua_ngx_get_ctx(lua_State *L); 16 | int ngx_http_lua_ngx_set_ctx(lua_State *L); 17 | int ngx_http_lua_ngx_set_ctx_helper(lua_State *L, ngx_http_request_t *r, 18 | ngx_http_lua_ctx_t *ctx, int index); 19 | 20 | 21 | #endif /* _NGX_HTTP_LUA_CTX_H_INCLUDED_ */ 22 | 23 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 24 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_exception.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_EXCEPTION_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_EXCEPTION_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | #define NGX_LUA_EXCEPTION_TRY \ 16 | if (setjmp(ngx_http_lua_exception) == 0) 17 | 18 | #define NGX_LUA_EXCEPTION_CATCH \ 19 | else 20 | 21 | #define NGX_LUA_EXCEPTION_THROW(x) \ 22 | longjmp(ngx_http_lua_exception, (x)) 23 | 24 | 25 | extern jmp_buf ngx_http_lua_exception; 26 | 27 | 28 | int ngx_http_lua_atpanic(lua_State *L); 29 | 30 | 31 | #endif /* _NGX_HTTP_LUA_EXCEPTION_H_INCLUDED_ */ 32 | 33 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 34 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_headerfilterby.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_LUA_HEADERFILTERBY_H_INCLUDED_ 8 | #define _NGX_HTTP_LUA_HEADERFILTERBY_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_lua_common.h" 12 | 13 | 14 | extern ngx_http_output_header_filter_pt ngx_http_lua_next_filter_header_filter; 15 | 16 | 17 | ngx_int_t ngx_http_lua_header_filter_init(void); 18 | 19 | ngx_int_t ngx_http_lua_header_filter_by_chunk(lua_State *L, 20 | ngx_http_request_t *r); 21 | 22 | ngx_int_t ngx_http_lua_header_filter_inline(ngx_http_request_t *r); 23 | 24 | ngx_int_t ngx_http_lua_header_filter_file(ngx_http_request_t *r); 25 | 26 | 27 | #endif /* _NGX_HTTP_LUA_HEADERFILTERBY_H_INCLUDED_ */ 28 | 29 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 30 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_headers.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_HEADERS_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_HEADERS_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | void ngx_http_lua_inject_resp_header_api(lua_State *L); 16 | void ngx_http_lua_inject_req_header_api(lua_State *L); 17 | void ngx_http_lua_create_headers_metatable(ngx_log_t *log, lua_State *L); 18 | 19 | 20 | #endif /* _NGX_HTTP_LUA_HEADERS_H_INCLUDED_ */ 21 | 22 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 23 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_headers_in.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_HEADERS_IN_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_HEADERS_IN_H_INCLUDED_ 10 | 11 | 12 | #include 13 | #include "ngx_http_lua_common.h" 14 | 15 | 16 | ngx_int_t ngx_http_lua_set_input_header(ngx_http_request_t *r, ngx_str_t key, 17 | ngx_str_t value, unsigned override); 18 | 19 | 20 | #endif /* _NGX_HTTP_LUA_HEADERS_IN_H_INCLUDED_ */ 21 | 22 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 23 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_headers_out.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_HEADERS_OUT_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_HEADERS_OUT_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | ngx_int_t ngx_http_lua_set_output_header(ngx_http_request_t *r, ngx_str_t key, 16 | ngx_str_t value, unsigned override); 17 | int ngx_http_lua_get_output_header(lua_State *L, ngx_http_request_t *r, 18 | ngx_str_t *key); 19 | 20 | 21 | #endif /* _NGX_HTTP_LUA_HEADERS_OUT_H_INCLUDED_ */ 22 | 23 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 24 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_initby.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_LUA_INITBY_H_INCLUDED_ 8 | #define _NGX_HTTP_LUA_INITBY_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_lua_common.h" 12 | 13 | 14 | ngx_int_t ngx_http_lua_init_by_inline(ngx_log_t *log, 15 | ngx_http_lua_main_conf_t *lmcf, lua_State *L); 16 | 17 | ngx_int_t ngx_http_lua_init_by_file(ngx_log_t *log, 18 | ngx_http_lua_main_conf_t *lmcf, lua_State *L); 19 | 20 | 21 | #endif /* _NGX_HTTP_LUA_INITBY_H_INCLUDED_ */ 22 | 23 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 24 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_initworkerby.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_LUA_INITWORKERBY_H_INCLUDED_ 8 | #define _NGX_HTTP_LUA_INITWORKERBY_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_lua_common.h" 12 | 13 | 14 | ngx_int_t ngx_http_lua_init_worker_by_inline(ngx_log_t *log, 15 | ngx_http_lua_main_conf_t *lmcf, lua_State *L); 16 | 17 | ngx_int_t ngx_http_lua_init_worker_by_file(ngx_log_t *log, 18 | ngx_http_lua_main_conf_t *lmcf, lua_State *L); 19 | 20 | ngx_int_t ngx_http_lua_init_worker(ngx_cycle_t *cycle); 21 | 22 | 23 | #endif /* _NGX_HTTP_LUA_INITWORKERBY_H_INCLUDED_ */ 24 | 25 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 26 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_lex.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_LUA_LEX_H_INCLUDED_ 8 | #define _NGX_HTTP_LUA_LEX_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_lua_common.h" 12 | 13 | 14 | int ngx_http_lua_lex(const u_char *const s, size_t len, int *const ovec); 15 | 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_log.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_LOG_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_LOG_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | void ngx_http_lua_inject_log_api(lua_State *L); 16 | 17 | 18 | #endif /* _NGX_HTTP_LUA_LOG_H_INCLUDED_ */ 19 | 20 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 21 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_logby.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_LUA_LOGBY_H_INCLUDED_ 8 | #define _NGX_HTTP_LUA_LOGBY_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_lua_common.h" 12 | 13 | 14 | ngx_int_t ngx_http_lua_log_handler(ngx_http_request_t *r); 15 | ngx_int_t ngx_http_lua_log_handler_inline(ngx_http_request_t *r); 16 | ngx_int_t ngx_http_lua_log_handler_file(ngx_http_request_t *r); 17 | void ngx_http_lua_inject_logby_ngx_api(ngx_conf_t *cf, lua_State *L); 18 | 19 | 20 | #endif /* _NGX_HTTP_LUA_LOGBY_H_INCLUDED_ */ 21 | 22 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 23 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_misc.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_MISC_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_MISC_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | void ngx_http_lua_inject_misc_api(lua_State *L); 16 | 17 | void ngx_http_lua_inject_req_misc_api(lua_State *L); 18 | 19 | 20 | #endif /* _NGX_HTTP_LUA_MISC_H_INCLUDED_ */ 21 | 22 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 23 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_ndk.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_LUA_NDK_H_INCLUDED_ 8 | #define _NGX_HTTP_LUA_NDK_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_lua_common.h" 12 | 13 | 14 | #if defined(NDK) && NDK 15 | void ngx_http_lua_inject_ndk_api(lua_State *L); 16 | #endif 17 | 18 | 19 | #endif /* _NGX_HTTP_LUA_NDK_H_INCLUDED_ */ 20 | 21 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 22 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_output.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_OUTPUT_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_OUTPUT_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | void ngx_http_lua_inject_output_api(lua_State *L); 16 | 17 | size_t ngx_http_lua_calc_strlen_in_table(lua_State *L, int index, int arg_i, 18 | unsigned strict); 19 | 20 | u_char *ngx_http_lua_copy_str_in_table(lua_State *L, int index, u_char *dst); 21 | 22 | ngx_int_t ngx_http_lua_flush_resume_helper(ngx_http_request_t *r, 23 | ngx_http_lua_ctx_t *ctx); 24 | 25 | 26 | #endif /* _NGX_HTTP_LUA_OUTPUT_H_INCLUDED_ */ 27 | 28 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 29 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_pcrefix.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_PCREFIX_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_PCREFIX_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | #if (NGX_PCRE) 16 | ngx_pool_t *ngx_http_lua_pcre_malloc_init(ngx_pool_t *pool); 17 | void ngx_http_lua_pcre_malloc_done(ngx_pool_t *old_pool); 18 | #endif 19 | 20 | 21 | #endif /* _NGX_HTTP_LUA_PCREFIX_H_INCLUDED_ */ 22 | 23 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 24 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_phase.h: -------------------------------------------------------------------------------- 1 | #ifndef _NGX_HTTP_LUA_PHASE_H_INCLUDED_ 2 | #define _NGX_HTTP_LUA_PHASE_H_INCLUDED_ 3 | 4 | 5 | #include "ngx_http_lua_common.h" 6 | 7 | 8 | void ngx_http_lua_inject_phase_api(lua_State *L); 9 | 10 | 11 | #endif /* _NGX_HTTP_LUA_PHASE_H_INCLUDED_ */ 12 | 13 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 14 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_regex.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_LUA_REGEX_H_INCLUDED_ 8 | #define _NGX_HTTP_LUA_REGEX_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_lua_common.h" 12 | #include "ngx_http_lua_script.h" 13 | 14 | 15 | #if (NGX_PCRE) 16 | void ngx_http_lua_inject_regex_api(lua_State *L); 17 | #endif 18 | 19 | 20 | #endif /* _NGX_HTTP_LUA_REGEX_H_INCLUDED_ */ 21 | 22 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 23 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_req_body.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_REQ_BODY_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_REQ_BODY_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | void ngx_http_lua_inject_req_body_api(lua_State *L); 16 | 17 | 18 | #endif /* _NGX_HTTP_LUA_REQ_BODY_H_INCLUDED_ */ 19 | 20 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 21 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_req_method.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_LUA_METHOD_H_INCLUDED_ 8 | #define _NGX_HTTP_LUA_METHOD_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_lua_common.h" 12 | 13 | 14 | void ngx_http_lua_inject_req_method_api(lua_State *L); 15 | 16 | 17 | #endif /* _NGX_HTTP_LUA_METHOD_H_INCLUDED_ */ 18 | 19 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 20 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_rewriteby.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_REWRITEBY_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_REWRITEBY_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | ngx_int_t ngx_http_lua_rewrite_handler(ngx_http_request_t *r); 16 | ngx_int_t ngx_http_lua_rewrite_handler_inline(ngx_http_request_t *r); 17 | ngx_int_t ngx_http_lua_rewrite_handler_file(ngx_http_request_t *r); 18 | 19 | 20 | #endif /* _NGX_HTTP_LUA_REWRITEBY_H_INCLUDED_ */ 21 | 22 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 23 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_setby.h: -------------------------------------------------------------------------------- 1 | #ifndef _NGX_HTTP_LUA_SET_BY_H_INCLUDED_ 2 | #define _NGX_HTTP_LUA_SET_BY_H_INCLUDED_ 3 | 4 | #include "ngx_http_lua_common.h" 5 | 6 | 7 | ngx_int_t ngx_http_lua_set_by_chunk(lua_State *L, ngx_http_request_t *r, 8 | ngx_str_t *val, ngx_http_variable_value_t *args, size_t nargs, 9 | ngx_str_t *script); 10 | int ngx_http_lua_setby_param_get(lua_State *L); 11 | 12 | 13 | #endif /* _NGX_HTTP_LUA_SET_BY_H_INCLUDED_ */ 14 | 15 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 16 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_sleep.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_SLEEP_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_SLEEP_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | void ngx_http_lua_inject_sleep_api(lua_State *L); 16 | 17 | 18 | #endif /* _NGX_HTTP_LUA_SLEEP_H_INCLUDED_ */ 19 | 20 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 21 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_ssl.c: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef DDEBUG 8 | #define DDEBUG 0 9 | #endif 10 | #include "ddebug.h" 11 | 12 | 13 | #if (NGX_HTTP_SSL) 14 | 15 | 16 | int ngx_http_lua_ssl_ctx_index = -1; 17 | 18 | 19 | ngx_int_t 20 | ngx_http_lua_ssl_init(ngx_log_t *log) 21 | { 22 | if (ngx_http_lua_ssl_ctx_index == -1) { 23 | ngx_http_lua_ssl_ctx_index = SSL_get_ex_new_index(0, NULL, NULL, 24 | NULL, NULL); 25 | 26 | if (ngx_http_lua_ssl_ctx_index == -1) { 27 | ngx_ssl_error(NGX_LOG_ALERT, log, 0, 28 | "lua: SSL_get_ex_new_index() for ctx failed"); 29 | return NGX_ERROR; 30 | } 31 | } 32 | 33 | return NGX_OK; 34 | } 35 | 36 | 37 | #endif /* NGX_HTTP_SSL */ 38 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_ssl_certby.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_LUA_SSL_CERTBY_H_INCLUDED_ 8 | #define _NGX_HTTP_LUA_SSL_CERTBY_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_lua_common.h" 12 | 13 | 14 | #if (NGX_HTTP_SSL) 15 | 16 | 17 | ngx_int_t ngx_http_lua_ssl_cert_handler_inline(ngx_http_request_t *r, 18 | ngx_http_lua_srv_conf_t *lscf, lua_State *L); 19 | 20 | ngx_int_t ngx_http_lua_ssl_cert_handler_file(ngx_http_request_t *r, 21 | ngx_http_lua_srv_conf_t *lscf, lua_State *L); 22 | 23 | char *ngx_http_lua_ssl_cert_by_lua_block(ngx_conf_t *cf, ngx_command_t *cmd, 24 | void *conf); 25 | 26 | char *ngx_http_lua_ssl_cert_by_lua(ngx_conf_t *cf, ngx_command_t *cmd, 27 | void *conf); 28 | 29 | int ngx_http_lua_ssl_cert_handler(ngx_ssl_conn_t *ssl_conn, void *data); 30 | 31 | 32 | #endif /* NGX_HTTP_SSL */ 33 | 34 | 35 | #endif /* _NGX_HTTP_LUA_SSL_CERTBY_H_INCLUDED_ */ 36 | 37 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 38 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_string.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_STRING_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_STRING_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | void ngx_http_lua_inject_string_api(lua_State *L); 16 | 17 | 18 | #endif /* _NGX_HTTP_LUA_STRING_H_INCLUDED_ */ 19 | 20 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 21 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_time.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_TIME_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_TIME_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | void ngx_http_lua_inject_time_api(lua_State *L); 16 | void ngx_http_lua_inject_req_time_api(lua_State *L); 17 | 18 | 19 | #endif /* _NGX_HTTP_LUA_TIME_H_INCLUDED_ */ 20 | 21 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 22 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_timer.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_TIMER_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_TIMER_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | void ngx_http_lua_inject_timer_api(lua_State *L); 16 | 17 | 18 | #endif /* _NGX_HTTP_LUA_TIMER_H_INCLUDED_ */ 19 | 20 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 21 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_uri.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_URI_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_URI_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | void ngx_http_lua_inject_req_uri_api(ngx_log_t *log, lua_State *L); 16 | 17 | 18 | #endif /* _NGX_HTTP_LUA_URI_H_INCLUDED_ */ 19 | 20 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 21 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_variable.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Xiaozhe Wang (chaoslawful) 4 | * Copyright (C) Yichun Zhang (agentzh) 5 | */ 6 | 7 | 8 | #ifndef _NGX_HTTP_LUA_VARIABLE_H_INCLUDED_ 9 | #define _NGX_HTTP_LUA_VARIABLE_H_INCLUDED_ 10 | 11 | 12 | #include "ngx_http_lua_common.h" 13 | 14 | 15 | void ngx_http_lua_inject_variable_api(lua_State *L); 16 | 17 | 18 | #endif /* _NGX_HTTP_LUA_VARIABLE_H_INCLUDED_ */ 19 | 20 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 21 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/src/ngx_http_lua_worker.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_LUA_WORKER_H_INCLUDED_ 8 | #define _NGX_HTTP_LUA_WORKER_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_lua_common.h" 12 | 13 | 14 | void ngx_http_lua_inject_worker_api(lua_State *L); 15 | 16 | 17 | #endif /* _NGX_HTTP_LUA_WORKER_H_INCLUDED_ */ 18 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/.gitignore: -------------------------------------------------------------------------------- 1 | servroot 2 | 3 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/000-sanity.t: -------------------------------------------------------------------------------- 1 | # vim:set ft= ts=4 sw=4 et fdm=marker: 2 | 3 | use Test::Nginx::Socket::Lua; 4 | 5 | repeat_each(2); 6 | 7 | plan tests => blocks() * repeat_each() * 2; 8 | 9 | run_tests(); 10 | 11 | __DATA__ 12 | 13 | === TEST 1: sanity (integer) 14 | --- config 15 | location /lua { 16 | echo 2; 17 | } 18 | --- request 19 | GET /lua 20 | --- response_body 21 | 2 22 | 23 | 24 | 25 | === TEST 2: sanity (string) 26 | --- config 27 | location /lua { 28 | echo "helloworld"; 29 | } 30 | --- request 31 | GET /lua 32 | --- response_body 33 | helloworld 34 | 35 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/008-today.t: -------------------------------------------------------------------------------- 1 | # vim:set ft= ts=4 sw=4 et fdm=marker: 2 | 3 | use Test::Nginx::Socket::Lua; 4 | 5 | #worker_connections(1014); 6 | #master_process_enabled(1); 7 | log_level('warn'); 8 | 9 | repeat_each(2); 10 | 11 | plan tests => repeat_each() * (blocks() * 2); 12 | 13 | #no_diff(); 14 | #no_long_string(); 15 | run_tests(); 16 | 17 | __DATA__ 18 | 19 | === TEST 1: use ngx.today in content_by_lua 20 | --- config 21 | location = /today { 22 | content_by_lua 'ngx.say(ngx.today())'; 23 | } 24 | --- request 25 | GET /today 26 | --- response_body_like: ^\d{4}-\d{2}-\d{2}$ 27 | 28 | 29 | 30 | === TEST 2: use ngx.today in set_by_lua 31 | --- config 32 | location = /today { 33 | set_by_lua $a 'return ngx.today()'; 34 | echo $a; 35 | } 36 | --- request 37 | GET /today 38 | --- response_body_like: ^\d{4}-\d{2}-\d{2}$ 39 | 40 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/019-const.t: -------------------------------------------------------------------------------- 1 | # vim:set ft= ts=4 sw=4 et fdm=marker: 2 | 3 | use Test::Nginx::Socket::Lua; 4 | 5 | repeat_each(2); 6 | 7 | plan tests => blocks() * repeat_each() * 2; 8 | 9 | #no_diff(); 10 | #no_long_string(); 11 | 12 | run_tests(); 13 | 14 | __DATA__ 15 | 16 | === TEST 1: sanity 17 | --- config 18 | location /read { 19 | content_by_lua ' 20 | ngx.say(ngx.OK) 21 | ngx.say(ngx.AGAIN) 22 | ngx.say(ngx.DONE) 23 | ngx.say(ngx.ERROR) 24 | '; 25 | } 26 | --- request 27 | GET /read 28 | --- response_body 29 | 0 30 | -2 31 | -4 32 | -1 33 | 34 | 35 | 36 | === TEST 2: http constants 37 | --- config 38 | location /read { 39 | content_by_lua ' 40 | ngx.say(ngx.HTTP_GATEWAY_TIMEOUT) 41 | '; 42 | } 43 | --- request 44 | GET /read 45 | --- response_body 46 | 504 47 | 48 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/021-cookie-time.t: -------------------------------------------------------------------------------- 1 | # vim:set ft= ts=4 sw=4 et fdm=marker: 2 | 3 | use Test::Nginx::Socket::Lua; 4 | 5 | #worker_connections(1014); 6 | #master_process_enabled(1); 7 | log_level('warn'); 8 | 9 | repeat_each(2); 10 | #repeat_each(1); 11 | 12 | plan tests => repeat_each() * (blocks() * 2); 13 | 14 | #no_diff(); 15 | #no_long_string(); 16 | run_tests(); 17 | 18 | __DATA__ 19 | 20 | === TEST 1: cookie_time 21 | --- config 22 | location /lua { 23 | content_by_lua ' 24 | ngx.say(ngx.cookie_time(1290079655)) 25 | '; 26 | } 27 | --- request 28 | GET /lua 29 | --- response_body 30 | Thu, 18-Nov-10 11:27:35 GMT 31 | 32 | 33 | 34 | === TEST 2: cookie_time in set_by_lua 35 | --- config 36 | location /lua { 37 | set_by_lua $a ' 38 | return ngx.cookie_time(1290079655) 39 | '; 40 | echo $a; 41 | } 42 | --- request 43 | GET /lua 44 | --- response_body 45 | Thu, 18-Nov-10 11:27:35 GMT 46 | 47 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/046-hmac.t: -------------------------------------------------------------------------------- 1 | # vim:set ft= ts=4 sw=4 et fdm=marker: 2 | use Test::Nginx::Socket::Lua; 3 | 4 | #worker_connections(1014); 5 | #master_on(); 6 | #workers(2); 7 | #log_level('warn'); 8 | 9 | repeat_each(2); 10 | #repeat_each(1); 11 | 12 | plan tests => repeat_each() * (blocks() * 2); 13 | 14 | #no_diff(); 15 | #no_long_string(); 16 | run_tests(); 17 | 18 | __DATA__ 19 | 20 | === TEST 1: sanity 21 | --- config 22 | location /lua { 23 | content_by_lua ' 24 | local digest = ngx.hmac_sha1("thisisverysecretstuff", "some string we want to sign") 25 | ngx.say(ngx.encode_base64(digest)) 26 | '; 27 | } 28 | --- request 29 | GET /lua 30 | --- response_body 31 | R/pvxzHC4NLtj7S+kXFg/NePTmk= 32 | 33 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/103-req-http-ver.t: -------------------------------------------------------------------------------- 1 | # vim:set ft= ts=4 sw=4 et fdm=marker: 2 | use Test::Nginx::Socket::Lua; 3 | 4 | #worker_connections(1014); 5 | #master_on(); 6 | #workers(2); 7 | #log_level('warn'); 8 | 9 | repeat_each(2); 10 | #repeat_each(1); 11 | 12 | plan tests => repeat_each() * (blocks() * 3); 13 | 14 | #no_diff(); 15 | #no_long_string(); 16 | run_tests(); 17 | 18 | __DATA__ 19 | 20 | === TEST 1: HTTP 1.1 21 | --- config 22 | location /t { 23 | content_by_lua ' 24 | ngx.say(ngx.req.http_version()) 25 | '; 26 | } 27 | --- request 28 | GET /t 29 | --- response_body 30 | 1.1 31 | --- no_error_log 32 | [error] 33 | 34 | 35 | 36 | === TEST 2: HTTP 1.0 37 | --- config 38 | location /t { 39 | content_by_lua ' 40 | ngx.say(ngx.req.http_version()) 41 | '; 42 | } 43 | --- request 44 | GET /t HTTP/1.0 45 | --- response_body 46 | 1 47 | --- no_error_log 48 | [error] 49 | 50 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/114-config.t: -------------------------------------------------------------------------------- 1 | # vim:set ft= ts=4 sw=4 et fdm=marker: 2 | 3 | use Test::Nginx::Socket::Lua; 4 | 5 | #worker_connections(1014); 6 | #master_on(); 7 | #workers(2); 8 | #log_level('warn'); 9 | 10 | repeat_each(2); 11 | 12 | plan tests => repeat_each() * (blocks() * 3); 13 | 14 | #no_diff(); 15 | #no_long_string(); 16 | run_tests(); 17 | 18 | __DATA__ 19 | 20 | === TEST 1: ngx.config.debug 21 | --- config 22 | location /t { 23 | content_by_lua ' 24 | ngx.say("debug: ", ngx.config.debug) 25 | '; 26 | } 27 | --- request 28 | GET /t 29 | --- response_body_like chop 30 | ^debug: (?:true|false)$ 31 | --- no_error_log 32 | [error] 33 | 34 | 35 | 36 | === TEST 2: ngx.config.subystem 37 | --- config 38 | location /t { 39 | content_by_lua ' 40 | ngx.say("subsystem: ", ngx.config.subsystem) 41 | '; 42 | } 43 | --- request 44 | GET /t 45 | --- response_body 46 | subsystem: http 47 | --- no_error_log 48 | [error] 49 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/119-config-prefix.t: -------------------------------------------------------------------------------- 1 | # vim:set ft= ts=4 sw=4 et fdm=marker: 2 | use Test::Nginx::Socket::Lua; 3 | 4 | #worker_connections(1014); 5 | #master_on(); 6 | #workers(2); 7 | #log_level('warn'); 8 | 9 | repeat_each(2); 10 | #repeat_each(1); 11 | 12 | plan tests => repeat_each() * (blocks() * 3); 13 | 14 | #no_diff(); 15 | #no_long_string(); 16 | run_tests(); 17 | 18 | __DATA__ 19 | 20 | === TEST 1: content_by_lua 21 | --- config 22 | location /lua { 23 | content_by_lua ' 24 | ngx.say("prefix: ", ngx.config.prefix()) 25 | '; 26 | } 27 | --- request 28 | GET /lua 29 | --- response_body_like chop 30 | ^prefix: \/\S+$ 31 | --- no_error_log 32 | [error] 33 | 34 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/121-version.t: -------------------------------------------------------------------------------- 1 | # vim:set ft= ts=4 sw=4 et fdm=marker: 2 | use Test::Nginx::Socket::Lua; 3 | 4 | #worker_connections(1014); 5 | #master_on(); 6 | #workers(2); 7 | #log_level('warn'); 8 | 9 | repeat_each(2); 10 | #repeat_each(1); 11 | 12 | plan tests => repeat_each() * (blocks() * 3); 13 | 14 | #no_diff(); 15 | #no_long_string(); 16 | run_tests(); 17 | 18 | __DATA__ 19 | 20 | === TEST 1: nginx version 21 | --- config 22 | location /lua { 23 | content_by_lua ' 24 | ngx.say("version: ", ngx.config.nginx_version) 25 | '; 26 | } 27 | --- request 28 | GET /lua 29 | --- response_body_like chop 30 | ^version: \d+$ 31 | --- no_error_log 32 | [error] 33 | 34 | 35 | 36 | === TEST 2: ngx_lua_version 37 | --- config 38 | location /lua { 39 | content_by_lua ' 40 | ngx.say("version: ", ngx.config.ngx_lua_version) 41 | '; 42 | } 43 | --- request 44 | GET /lua 45 | --- response_body_like chop 46 | ^version: \d+$ 47 | --- no_error_log 48 | [error] 49 | 50 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/125-configure-args.t: -------------------------------------------------------------------------------- 1 | # vim:set ft= ts=4 sw=4 et fdm=marker: 2 | use Test::Nginx::Socket::Lua; 3 | 4 | #worker_connections(1014); 5 | #master_on(); 6 | #workers(2); 7 | #log_level('warn'); 8 | 9 | repeat_each(2); 10 | 11 | plan tests => repeat_each() * (blocks() * 3); 12 | 13 | #no_diff(); 14 | #no_long_string(); 15 | run_tests(); 16 | 17 | __DATA__ 18 | 19 | === TEST 1: nginx configure 20 | --- config 21 | location /configure_args { 22 | content_by_lua ' 23 | ngx.say(ngx.config.nginx_configure()) 24 | '; 25 | } 26 | --- request 27 | GET /configure_args 28 | --- response_body_like chop 29 | ^\s*\-\-[^-]+ 30 | --- no_error_log 31 | [error] 32 | 33 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/cert/test.crl: -------------------------------------------------------------------------------- 1 | -----BEGIN X509 CRL----- 2 | MIIBjzCB+QIBATANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UEBhMCVVMxEzARBgNV 3 | BAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEjAQBgNVBAoM 4 | CU9wZW5SZXN0eTESMBAGA1UECwwJT3BlblJlc3R5MREwDwYDVQQDDAh0ZXN0LmNv 5 | bTEgMB4GCSqGSIb3DQEJARYRYWdlbnR6aEBnbWFpbC5jb20XDTE0MDcyMTIxNDEy 6 | MloXDTE0MDgyMDIxNDEyMlowHDAaAgkApQ5tVpK3luIXDTE0MDcyMTIxNDEwMlqg 7 | DzANMAsGA1UdFAQEAgIQATANBgkqhkiG9w0BAQUFAAOBgQBDZ6UY0Qg7qDoLrXXl 8 | gJElFilZ7LiKPqjE3+Rfx7XkgdbPxjGCr77TfMm+smdvawk7WHv1AOvRH7kGrgGT 9 | kGJZwqJ4vKa/NpEWJIMAZ1Gq9BIH/Ig6ffmPk+S9ozcVHKJDW7x4nMuotyj1hILN 10 | EePv78DZCYMZgf8WwMElNgz6Hw== 11 | -----END X509 CRL----- 12 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/cert/test.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXgIBAAKBgQDo/XzNS+2ZopArbF4/LxlsXBLJMvD6Nbq315lqJN5zxfeJs31Z 3 | 6avEfORNGKTE/dwBCghNG5mJC8XhDsM7rAyTP9vTPB+Bfm550arTjsAk/qf+bCUM 4 | 6MZI2iYEuhdDOju1V7rSKQSbdnINSqck8ky3eEiY7ldKingw8y5lr1aEVwIDAQAB 5 | AoGBANgB66sKMga2SKN5nQdHS3LDCkevCutu1OWM5ZcbB4Kej5kC57xsf+tzPtab 6 | emeIVGhCPOAALqB4YcT+QtMX967oM1MjcFbtH7si5oq6UYyp3i0G9Si6jIoVHz3+ 7 | 8yOUaqwKbK+bRX8VS0YsHZmBsPK5ryN50iUwsU08nemoA94BAkEA9GS9Q5OPeFkM 8 | tFxsIQ1f2FSsZAuN/1cpZgJqY+YaAN7MSPGTWyfd7nWG/Zgk3GO9/2ihh4gww+7B 9 | To09GkmW4QJBAPQOHC2V+t2TA98+6Lj6+TYwcGEkhOENfVpH25mQ+kXgF/1Bd6rA 10 | nosT1bdAY+SnmWXbSw6Kv5C20Em+bEX8WjcCQCSRRjhsRdVODbaW9Z7kb2jhEoJN 11 | sEt6cTlQNzcHYPCsZYisjM3g4zYg47fiIfHQAsfKkhDDcfh/KvFj9LaQOEECQQCH 12 | eBWYEDpSJ7rsfqT7mQQgWj7nDThdG/nK1TxGP71McBmg0Gg2dfkLRhVJRQqt74Is 13 | kc9V4Rp4n6F6baL4Lh19AkEA6pZZer0kg3Kv9hjhaITIKUYdfIp9vYnDRWbQlBmR 14 | atV8V9u9q2ETZvqfHpN+9Lu6NYR4yXIEIRf1bnIZ/mr9eQ== 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/cert/test2.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIChzCCAfACCQDjCkJpJUtZmjANBgkqhkiG9w0BAQUFADCBhjELMAkGA1UEBhMC 3 | VVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28x 4 | EjAQBgNVBAoMCU9wZW5SZXN0eTESMBAGA1UEAwwJdGVzdDIuY29tMSIwIAYJKoZI 5 | hvcNAQkBFhNvcGVucmVzdHlAZ21haWwuY29tMCAXDTE0MDkxMzAwMTgxMFoYDzIx 6 | MTQwODIwMDAxODEwWjCBhjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3Ju 7 | aWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEjAQBgNVBAoMCU9wZW5SZXN0eTES 8 | MBAGA1UEAwwJdGVzdDIuY29tMSIwIAYJKoZIhvcNAQkBFhNvcGVucmVzdHlAZ21h 9 | aWwuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDy+OVI2u5NBOeB2Cyz 10 | Gnwy9b7Ao4CSi05XtUxh2IoVdzYZz6c4PFb9C1ad52LDdRStiQT5A7+RKLj6Kr7f 11 | JrKFziJxMy4g4Kdn9G659vE7CWu/UAVjRUtc+mTBAEfjdbumizmHLG7DmnNhGl3R 12 | NGiVNLsUInSMGfUlJRzZJXhI4QIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAEMmRvyN 13 | N7uE24Tc6TR19JadNHK8g3YGktRoXWiqd/y0HY4NRPgvnK/nX7CY/wXa1j+uDO8K 14 | e6/Ldm5RZrjtvfHJmTSAu8zkqTJz8bqRDH7kzL5Ni2Ky2x8r9dtB0ImpOiSlwvZN 15 | snMvbrxEdwBiqlC9prV2f9aG+ACo1KnPL0j6 16 | -----END CERTIFICATE----- 17 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/cert/test2.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXAIBAAKBgQDy+OVI2u5NBOeB2CyzGnwy9b7Ao4CSi05XtUxh2IoVdzYZz6c4 3 | PFb9C1ad52LDdRStiQT5A7+RKLj6Kr7fJrKFziJxMy4g4Kdn9G659vE7CWu/UAVj 4 | RUtc+mTBAEfjdbumizmHLG7DmnNhGl3RNGiVNLsUInSMGfUlJRzZJXhI4QIDAQAB 5 | AoGAEqBB83PVENJvbOTFiHVfUAjGtr3R/Wnwd4jOcjHHZB3fZ9sjVoxJntxfp3s1 6 | dwZir2rxlqVS6i3VAFiGiVTOGo2Vvzhw2J7f58twCECmnLb2f863AkGEYe4dAndD 7 | GHGD0WI0CBMD1sT18YCj561o0Wol5deWH0gM9pr2N3HkeIECQQD6hUKFlFhrpaHP 8 | WNJsl6BxgE6pB5kxLcMcpIQ7P+kHUvtyvCJl5QZJqPrpPGjRsAI5Ph92rpsp/zDp 9 | /IZNWGVjAkEA+Ele31Rt+XbV32MrLKZgBDBk+Pzss5LTn9fZ5v1k/7hrMk2VVWvk 10 | AD6n5QiGe/g59woANpPb1T9l956SBf0d6wJABTXOS17pc9uvANP1FGMW6CVl/Wf2 11 | DKrJ+weE5IKQwyE7r4gwIvRfbBrClSU3fNzvPueG2f4JphbzmnoxBNzIxwJAYivY 12 | mGNwzHehXx99/byXMHDWK+EN0n8WsBgP75Z3rekEcbJdfpYXY8Via1vwmOnwOW65 13 | 4NqbzHix37PSNw37GwJBALxaGNpREO2Tk+oWOvsD2QyviMVae3mXAJHc6nLVdKDM 14 | q0YvDT6VdeNYYFTkAuzJacsVXOpn6AnUMFj0OBedMhc= 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/cert/test_ecdsa.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBtDCCAVoCCQD0QJnL8zpA0jAKBggqhkjOPQQDAjBhMQswCQYDVQQGEwJVUzET 3 | MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzESMBAG 4 | A1UECgwJT3BlblJlc3R5MREwDwYDVQQDDAh0ZXN0LmNvbTAgFw0xNTA3MTcyMTUx 5 | NDFaGA8yMTE1MDYyMzIxNTE0MVowYTELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNh 6 | bGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEjAQBgNVBAoMCU9wZW5S 7 | ZXN0eTERMA8GA1UEAwwIdGVzdC5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNC 8 | AAT/OtGmlIlbtvvJ3OP0dm5lyEMCrMnpDTDjwBPnUZ2f+16LCmNsdtEJ0r0Sd4GM 9 | o4Lss2JpwzPy2SLGEj3KwGKSMAoGCCqGSM49BAMCA0gAMEUCIQDbNwDkq1FiqcRD 10 | XdbP1MPAc33N2IK9EDIfMgJ0nTL82wIgNZiL4xvCQe9UA0zC+JqHLnVCQHYAM9kI 11 | BbvzNrt0hEM= 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/cert/test_ecdsa.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg0vwBPGgv1hE6RnQo 3 | 3imyoceR+5dLsKegodOlBwnWtbuhRANCAAT/OtGmlIlbtvvJ3OP0dm5lyEMCrMnp 4 | DTDjwBPnUZ2f+16LCmNsdtEJ0r0Sd4GMo4Lss2JpwzPy2SLGEj3KwGKS 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/data/fake-module/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_fake_module 2 | HTTP_MODULES="$HTTP_MODULES ngx_http_fake_module" 3 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_fake_module.c" 4 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/t/data/fake-shm-module/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_lua_shm_fake_module 2 | HTTP_MODULES="$HTTP_MODULES ngx_http_lua_fake_shm_module" 3 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_lua_fake_shm_module.c" 4 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/tapset/ngx_lua.stp: -------------------------------------------------------------------------------- 1 | function ngx_http_lua_ctx_context(r) 2 | { 3 | 4 | } 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/util/fix-comments: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | for my $infile (@ARGV) { 7 | warn "Processing $infile...\n"; 8 | open my $in, $infile or 9 | die "Cannot open $infile for reading: $!\n"; 10 | my $s; 11 | my $changed = 0; 12 | while (<$in>) { 13 | $changed += s{//(.*)}{/* $1 */}; 14 | $s .= $_; 15 | } 16 | close $in; 17 | 18 | if ($changed) { 19 | my $outfile = $infile; 20 | open my $out, ">$outfile" or 21 | die "Cannot open $outfile for writing: $!\n"; 22 | print $out $s; 23 | close $out; 24 | warn "Wrote $outfile\n"; 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/util/gen-lexer-c: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ -z "$1" ]; then 4 | level=0 5 | else 6 | level="$1" 7 | fi 8 | 9 | #echo '{' '}' '\[=*\[' '--\[=*\[' '\]=*\]' '--[^\n]*' '"(?:\\[^\n]|[^"\n\\])*"' $'\'(?:\\\\[^\\n]|[^\'\\n\\\\])*\'' 10 | 11 | # we need the re.pl script here: 12 | # https://github.com/openresty/sregex/blob/dfa-multi-re/re.pl 13 | re.pl -W --no-main -c --cc="clang -O2" \ 14 | --func-name ngx_http_lua_lex \ 15 | --header ngx_http_lua_lex.h -o src/ngx_http_lua_lex.c \ 16 | --debug=$level -n 8 \ 17 | -- '{' '}' '\[=*\[' '--\[=*\[' '\]=*\]' '--[^\n]*' '"(?:\\[^\n]|[^"\n\\])*"' $'\'(?:\\\\[^\\n]|[^\'\\n\\\\])*\'' \ 18 | || exit 1 19 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/util/retab: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for f in $*; do 4 | if [ -f "$f" ]; then 5 | vim -c retab -c x $f 6 | fi 7 | done 8 | 9 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/util/run_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | script_dir=$(dirname $0) 3 | root=$(readlink -f $script_dir/..) 4 | testfile=${1:-$root/t/*.t $root/t/*/*.t} 5 | cd $root 6 | $script_dir/reindex $testfile 7 | export PATH=$root/work/sbin:$PATH 8 | killall nginx 9 | prove -I$root/../test-nginx/lib $testfile 10 | 11 | -------------------------------------------------------------------------------- /3rd-party/lua-nginx-module-0.10.7/util/update-readme.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | perl util/wiki2pod.pl doc/manpage.wiki > /tmp/a.pod && pod2text /tmp/a.pod > README 4 | 5 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/.gitattributes: -------------------------------------------------------------------------------- 1 | *.t linguist-language=Text 2 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/.gitignore: -------------------------------------------------------------------------------- 1 | .libs 2 | *.t_ 3 | *.swp 4 | *.slo 5 | *.la 6 | *.swo 7 | *.lo 8 | *~ 9 | *.o 10 | print.txt 11 | .rsync 12 | *.tar.gz 13 | dist 14 | build[789] 15 | build 16 | tags 17 | update-readme 18 | *.tmp 19 | test/Makefile 20 | test/blib 21 | test.sh 22 | t.sh 23 | t/t.sh 24 | test/t/servroot/ 25 | releng 26 | reset 27 | *.t_ 28 | genmobi.sh 29 | *.mobi 30 | misc/chunked 31 | reindex 32 | src/response.c 33 | src/handler.h 34 | src/util.c 35 | src/module.c 36 | src/handler.c 37 | src/response.rl 38 | src/response.h 39 | src/module.h 40 | src/util.h 41 | src/request.h 42 | src/request.c 43 | ctags 44 | nginx 45 | *.html 46 | t/servroot/ 47 | all 48 | Changes 49 | build1[0-9] 50 | go 51 | buildroot/ 52 | analyze 53 | *.plist 54 | Makefile 55 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/src/memc_common.rl: -------------------------------------------------------------------------------- 1 | %%{ 2 | machine memc_common; 3 | 4 | action catch_err { 5 | dd("caught error..."); 6 | dd("machine state: %d", cs); 7 | 8 | *status_addr = NGX_HTTP_BAD_GATEWAY; 9 | } 10 | 11 | msg = any* -- "\r\n"; 12 | 13 | error_helper = "ERROR\r\n" 14 | | "CLIENT_ERROR " msg "\r\n" 15 | | "SERVER_ERROR " msg "\r\n" 16 | ; 17 | 18 | error = error_helper @catch_err 19 | ; 20 | 21 | action finalize { 22 | dd("done it!"); 23 | *done_addr = 1; 24 | } 25 | 26 | action check { 27 | dd("state %d, left %d, reading char '%c'", cs, 28 | (int) (pe - p), *p); 29 | } 30 | 31 | action handle_stored { 32 | dd("status set to 201"); 33 | 34 | *status_addr = NGX_HTTP_CREATED; 35 | } 36 | 37 | action handle_not_found { 38 | dd("status set to 404"); 39 | 40 | *status_addr = NGX_HTTP_NOT_FOUND; 41 | } 42 | 43 | }%% 44 | 45 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/src/memc_delete.rl: -------------------------------------------------------------------------------- 1 | %%{ 2 | machine memc_delete; 3 | 4 | alphtype short; 5 | 6 | include memc_common "memc_common.rl"; 7 | 8 | response = "DELETED\r\n" 9 | | "NOT_FOUND\r\n" @handle_not_found 10 | | error 11 | ; 12 | 13 | main := response @finalize 14 | ; 15 | 16 | }%% 17 | 18 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/src/memc_flush_all.rl: -------------------------------------------------------------------------------- 1 | %%{ 2 | machine memc_flush_all; 3 | 4 | alphtype short; 5 | 6 | include memc_common "memc_common.rl"; 7 | 8 | response = "OK\r\n" 9 | | error 10 | ; 11 | 12 | main := response @finalize 13 | ; 14 | 15 | }%% 16 | 17 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/src/memc_incr_decr.rl: -------------------------------------------------------------------------------- 1 | %%{ 2 | machine memc_incr_decr; 3 | 4 | alphtype short; 5 | 6 | include memc_common "memc_common.rl"; 7 | 8 | value = digit+ 9 | ; 10 | 11 | response = value " "* "\r\n" @handle_stored 12 | | "NOT_FOUND\r\n" @handle_not_found 13 | | error 14 | ; 15 | 16 | main := response @finalize $check 17 | ; 18 | 19 | }%% 20 | 21 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/src/memc_stats.rl: -------------------------------------------------------------------------------- 1 | %%{ 2 | machine memc_stats; 3 | 4 | alphtype short; 5 | 6 | include memc_common "memc_common.rl"; 7 | 8 | content = any+ - "\r\n" 9 | ; 10 | 11 | stat_line = "STAT " content "\r\n" 12 | ; 13 | 14 | response = stat_line* "END\r\n" 15 | | error 16 | ; 17 | 18 | main := response @finalize 19 | ; 20 | 21 | }%% 22 | 23 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/src/memc_storage.rl: -------------------------------------------------------------------------------- 1 | %%{ 2 | machine memc_storage; 3 | 4 | include memc_common "memc_common.rl"; 5 | 6 | response = "STORED\r\n" @handle_stored 7 | | "NOT_STORED\r\n" 8 | | "EXISTS\r\n" 9 | | "NOT_FOUND\r\n" @handle_not_found 10 | | error 11 | ; 12 | 13 | main := response @finalize 14 | ; 15 | 16 | }%% 17 | 18 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/src/memc_version.rl: -------------------------------------------------------------------------------- 1 | %%{ 2 | machine memc_version; 3 | 4 | alphtype short; 5 | 6 | include memc_common "memc_common.rl"; 7 | 8 | version = any+ - "\r\n" 9 | ; 10 | 11 | response = "VERSION " version "\r\n" 12 | | error 13 | ; 14 | 15 | main := response @finalize 16 | ; 17 | 18 | }%% 19 | 20 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/src/ngx_http_memc_handler.h: -------------------------------------------------------------------------------- 1 | #ifndef NGX_HTTP_MEMC_HANDLER_H 2 | #define NGX_HTTP_MEMC_HANDLER_H 3 | 4 | #include 5 | #include 6 | 7 | 8 | ngx_int_t ngx_http_memc_handler(ngx_http_request_t *r); 9 | ngx_int_t ngx_http_memc_init(ngx_conf_t *cf); 10 | 11 | 12 | #endif /* NGX_HTTP_MEMC_HANDLER_H */ 13 | 14 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/src/ngx_http_memc_request.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef NGX_HTTP_MEMC_REQUEST_H 8 | #define NGX_HTTP_MEMC_REQUEST_H 9 | 10 | #include 11 | #include 12 | 13 | ngx_int_t ngx_http_memc_create_get_cmd_request(ngx_http_request_t *r); 14 | 15 | ngx_int_t ngx_http_memc_create_storage_cmd_request(ngx_http_request_t *r); 16 | 17 | ngx_int_t ngx_http_memc_create_noarg_cmd_request(ngx_http_request_t *r); 18 | 19 | ngx_int_t ngx_http_memc_create_flush_all_cmd_request(ngx_http_request_t *r); 20 | 21 | ngx_int_t ngx_http_memc_create_delete_cmd_request(ngx_http_request_t *r); 22 | 23 | ngx_int_t ngx_http_memc_create_incr_decr_cmd_request(ngx_http_request_t *r); 24 | 25 | 26 | #endif /* NGX_HTTP_MEMC_REQUEST_H */ 27 | 28 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/src/ngx_http_memc_response.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef NGX_HTTP_MEMC_RESPONSE_H 8 | #define NGX_HTTP_MEMC_RESPONSE_H 9 | 10 | #include 11 | #include 12 | 13 | ngx_int_t ngx_http_memc_process_get_cmd_header(ngx_http_request_t *r); 14 | 15 | ngx_int_t ngx_http_memc_get_cmd_filter_init(void *data); 16 | 17 | ngx_int_t ngx_http_memc_get_cmd_filter(void *data, ssize_t bytes); 18 | 19 | ngx_int_t ngx_http_memc_process_simple_header(ngx_http_request_t *r); 20 | 21 | ngx_int_t ngx_http_memc_empty_filter_init(void *data); 22 | 23 | ngx_int_t ngx_http_memc_empty_filter(void *data, ssize_t bytes); 24 | 25 | ngx_int_t ngx_http_memc_process_flush_all_cmd_header(ngx_http_request_t *r); 26 | 27 | #endif /* NGX_HTTP_MEMC_RESPONSE_H */ 28 | 29 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/src/ngx_http_memc_util.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef NGX_HTTP_MEMC_UTIL_H 8 | #define NGX_HTTP_MEMC_UTIL_H 9 | 10 | #include 11 | #include 12 | #include "ngx_http_memc_module.h" 13 | 14 | #ifndef NGX_UINT32_LEN 15 | #define NGX_UINT32_LEN (NGX_INT32_LEN - 1) 16 | #endif 17 | 18 | #ifndef NGX_UINT64_LEN 19 | #define NGX_UINT64_LEN (NGX_INT64_LEN - 1) 20 | #endif 21 | 22 | #define ngx_http_memc_strcmp_const(a, b) \ 23 | ngx_strncmp(a, b, sizeof(b) - 1) 24 | 25 | ngx_http_memc_cmd_t ngx_http_memc_parse_cmd(u_char *data, size_t len, 26 | ngx_flag_t *is_storage_cmd); 27 | 28 | ngx_http_upstream_srv_conf_t *ngx_http_memc_upstream_add( 29 | ngx_http_request_t *r, ngx_url_t *url); 30 | 31 | 32 | #endif /* NGX_HTTP_MEMC_UTIL_H */ 33 | 34 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/t/errors.t: -------------------------------------------------------------------------------- 1 | # vi:filetype= 2 | 3 | use lib 'lib'; 4 | use Test::Nginx::Socket; 5 | 6 | plan tests => repeat_each() * 2 * blocks(); 7 | 8 | $ENV{TEST_NGINX_MEMCACHED_PORT} ||= 11211; 9 | 10 | #no_diff; 11 | 12 | run_tests(); 13 | 14 | __DATA__ 15 | 16 | === TEST 1: empty pass 17 | little-endian systems only 18 | 19 | --- config 20 | location /memc { 21 | set $memc_key foo; 22 | set $backend "not-exist"; 23 | memc_pass $backend; 24 | } 25 | --- request 26 | GET /memc 27 | --- error_code: 500 28 | --- response_body_like: 500 Internal Server Error 29 | 30 | 31 | 32 | === TEST 2: connection refused 33 | little-endian systems only 34 | 35 | --- config 36 | location /memc { 37 | set $memc_key foo; 38 | set $backend "not-exist"; 39 | memc_pass 127.0.0.1:1; 40 | } 41 | --- request 42 | GET /memc 43 | --- error_code: 502 44 | --- response_body_like: 502 Bad Gateway 45 | 46 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/t/if.t: -------------------------------------------------------------------------------- 1 | # vi:filetype= 2 | 3 | use lib 'lib'; 4 | use Test::Nginx::Socket; 5 | 6 | plan tests => repeat_each() * (3 * blocks()); 7 | 8 | $ENV{TEST_NGINX_MEMCACHED_PORT} ||= 11211; 9 | 10 | #no_diff; 11 | 12 | run_tests(); 13 | 14 | __DATA__ 15 | 16 | === TEST 1: bad cmd 17 | --- config 18 | location /foo { 19 | if ($uri ~* 'foo') { 20 | set $memc_cmd flush_all; 21 | } 22 | memc_pass 127.0.0.1:$TEST_NGINX_MEMCACHED_PORT; 23 | } 24 | --- request 25 | GET /foo 26 | --- response_body eval 27 | "OK\r\n" 28 | --- no_error_log 29 | [error] 30 | 31 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/t/keepalive.t: -------------------------------------------------------------------------------- 1 | # vi:filetype= 2 | 3 | use lib 'lib'; 4 | use Test::Nginx::Socket; 5 | 6 | repeat_each(3); 7 | 8 | plan tests => repeat_each() * 2 * blocks(); 9 | 10 | $ENV{TEST_NGINX_MEMCACHED_PORT} ||= 11211; 11 | 12 | #no_diff; 13 | 14 | run_tests(); 15 | 16 | __DATA__ 17 | 18 | === TEST 1: keepalive 19 | --- http_config 20 | upstream backend { 21 | server 127.0.0.1:$TEST_NGINX_MEMCACHED_PORT; 22 | #server 127.0.0.1:11985; 23 | #server 127.0.0.1:11986; 24 | keepalive 2; 25 | #hash $arg_key; 26 | } 27 | 28 | --- config 29 | location /memc { 30 | set $memc_cmd set; 31 | set $memc_key $arg_key; 32 | set $memc_value 'value'; 33 | memc_pass backend; 34 | } 35 | --- request 36 | GET /memc?key=dog 37 | --- response_body eval 38 | "STORED\r 39 | " 40 | --- error_code: 201 41 | 42 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/t/stats.t: -------------------------------------------------------------------------------- 1 | # vi:filetype= 2 | 3 | use lib 'lib'; 4 | use Test::Nginx::Socket; 5 | 6 | repeat_each(1); 7 | 8 | plan tests => repeat_each() * 2 * blocks(); 9 | 10 | $ENV{TEST_NGINX_MEMCACHED_PORT} ||= 11211; 11 | 12 | #no_diff; 13 | log_level('error'); 14 | 15 | run_tests(); 16 | 17 | __DATA__ 18 | 19 | === TEST 1: sanity 20 | --- timeout: 5 21 | --- config 22 | location /stats { 23 | set $memc_cmd stats; 24 | memc_pass 127.0.0.1:$TEST_NGINX_MEMCACHED_PORT; 25 | } 26 | --- request 27 | GET /stats 28 | --- response_body_like: ^(?:STAT [^\r]*\r\n)*END\r\n$ 29 | 30 | 31 | 32 | === TEST 2: timeout 33 | --- config 34 | memc_connect_timeout 10ms; 35 | memc_send_timeout 10ms; 36 | location /stats { 37 | set $memc_cmd stats; 38 | memc_pass www.taobao.com:12345; 39 | } 40 | --- request 41 | GET /stats 42 | --- response_body_like: 504 Gateway Time-out 43 | --- timeout: 1 44 | --- error_code: 504 45 | 46 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/t/version.t: -------------------------------------------------------------------------------- 1 | # vi:filetype= 2 | 3 | use lib 'lib'; 4 | use Test::Nginx::Socket; 5 | 6 | plan tests => repeat_each() * 2 * blocks(); 7 | 8 | $ENV{TEST_NGINX_MEMCACHED_PORT} ||= 11211; 9 | 10 | #no_diff; 11 | 12 | run_tests(); 13 | 14 | __DATA__ 15 | 16 | === TEST 1: the "version" command 17 | --- config 18 | location /ver { 19 | set $memc_cmd version; 20 | memc_pass 127.0.0.1:$TEST_NGINX_MEMCACHED_PORT; 21 | } 22 | --- request 23 | GET /ver 24 | --- response_body_like: ^VERSION \d+(\.\d+)+\S*?\r\n$ 25 | 26 | -------------------------------------------------------------------------------- /3rd-party/memc-nginx-module-0.17/util/update-readme.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | perl util/wiki2pod.pl doc/readme.wiki > /tmp/a.pod \ 4 | && pod2text /tmp/a.pod > README \ 5 | && perl -i -pe 's{(https?://.*?)>}{$1 >}g' README 6 | 7 | -------------------------------------------------------------------------------- /3rd-party/naxsi/naxsi_src/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_naxsi_module 2 | HTTP_MODULES="$HTTP_MODULES ngx_http_naxsi_module" 3 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/naxsi_runtime.c $ngx_addon_dir/naxsi_config.c $ngx_addon_dir/naxsi_utils.c $ngx_addon_dir/naxsi_skeleton.c $ngx_addon_dir/naxsi_json.c" 4 | NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_addon_dir/naxsi.h" 5 | -------------------------------------------------------------------------------- /3rd-party/naxsi/nx_util/nx_lib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeusoftSecurity/SEnginx/d4b03e7a6f3fa288740089f203d6d1b10050d834/3rd-party/naxsi/nx_util/nx_lib/__init__.py -------------------------------------------------------------------------------- /3rd-party/naxsi/nx_util/nx_lib/nx_tools.py: -------------------------------------------------------------------------------- 1 | import ConfigParser 2 | import logging 3 | 4 | 5 | 6 | class NxConfig(object): 7 | def __init__(self, path): 8 | self.path = path 9 | self.data_dir = "" 10 | self.db_dir = "" 11 | self.core_rules = "/etc/nginx/naxsi_core.rules" 12 | def parse(self): 13 | config = ConfigParser.ConfigParser() 14 | config.readfp(open(self.path)) 15 | try: 16 | self.data_dir = config.get("nx_util", "data_dir") 17 | self.db_dir = config.get("nx_util", "database_dir") 18 | self.core_rules = config.get("nx_util", "naxsi_core_rules") 19 | except: 20 | logging.critical("Unable to parse configuration file :"+self.path) 21 | return 0 22 | return 1 23 | -------------------------------------------------------------------------------- /3rd-party/naxsi/nx_util/nx_util.1.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeusoftSecurity/SEnginx/d4b03e7a6f3fa288740089f203d6d1b10050d834/3rd-party/naxsi/nx_util/nx_util.1.gz -------------------------------------------------------------------------------- /3rd-party/naxsi/nx_util/nx_util.conf: -------------------------------------------------------------------------------- 1 | [nx_util] 2 | data_dir=/usr/local/nx_datas 3 | database_dir= 4 | naxsi_core_rules=/etc/nginx/naxsi_core.rules 5 | -------------------------------------------------------------------------------- /3rd-party/naxsi/nx_util/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from distutils.core import setup 4 | 5 | setup(name='nx_util', 6 | version='1.1', 7 | description='Naxsi log parser, whitelist & report generator', 8 | author='Naxsi Dev Team', 9 | author_email='thibault.koechlin@nbs-system.com', 10 | url='naxsi.googlecode.com', 11 | scripts=['nx_util.py'], 12 | packages=['nx_lib'], 13 | data_files=[('nx_datas', ['nx_datas/bootstrap.min.css', 14 | 'nx_datas/bootstrap-responsive.min.css', 15 | 'nx_datas/highcharts.js', 16 | 'nx_datas/map.tpl', 17 | 'nx_datas/bootstrap.min.js', 18 | 'nx_datas/country2coords.txt']), 19 | ('/usr/share/man/man1', ['nx_util.1.gz']), 20 | ('/usr/local/etc/', ['nx_util.conf'])] 21 | ) 22 | -------------------------------------------------------------------------------- /3rd-party/naxsi/nx_util/unit_test/01_UNPREDICTABLE_NOTHING.results: -------------------------------------------------------------------------------- 1 | BasicRule wl:1001 "mz:$URL://foobar|$ARGS_VAR:vulnarg"; 2 | -------------------------------------------------------------------------------- /3rd-party/naxsi/nx_util/unit_test/02_UNPREDICTABLE_ID.results: -------------------------------------------------------------------------------- 1 | BasicRule wl:0 "mz:$URL://comment_post.php|$ARGS_VAR:foobar"; 2 | -------------------------------------------------------------------------------- /3rd-party/naxsi/nx_util/unit_test/03_UNPREDICTABLE_URL.results: -------------------------------------------------------------------------------- 1 | BasicRule wl:1001 "mz:$ARGS_VAR:foobar"; 2 | -------------------------------------------------------------------------------- /3rd-party/naxsi/nx_util/unit_test/04_UNPREDICTABLE_ARGNAME.results: -------------------------------------------------------------------------------- 1 | BasicRule wl:1001 "mz:$URL://foobar|ARGS"; 2 | -------------------------------------------------------------------------------- /3rd-party/naxsi/nx_util/unit_test/05_NAME_TARGET.results: -------------------------------------------------------------------------------- 1 | BasicRule wl:1311 "mz:$URL:/a|$ARGS_VAR:a[]a[][]¹|NAME"; 2 | BasicRule wl:1310 "mz:$URL:/a|$ARGS_VAR:a[]a[][]¹|NAME"; 3 | -------------------------------------------------------------------------------- /3rd-party/naxsi/nx_util/unit_test/06_NAME_UNPREDICTABLE.results: -------------------------------------------------------------------------------- 1 | BasicRule wl:1310 "mz:$URL:/a|ARGS|NAME"; 2 | -------------------------------------------------------------------------------- /3rd-party/naxsi/nx_util/unit_test/07_INTERNAL_REQUEST2BIG: -------------------------------------------------------------------------------- 1 | 2012/08/23 19:04:58 [error] 2706#0: *1 NAXSI_FMT: ip=127.0.0.1&server=www.nbs-system.com&uri=/recrutement&total_processed=4&total_blocked=1&zone0=BODY&id0=2&var_name0=, client: 127.0.0.1, server: , request: "POST /recrutement HTTP/1.1", host: "www.nbs-system.com", referrer: "http://www.nbs-system.com/recrutement" 2 | 3 | -------------------------------------------------------------------------------- /3rd-party/naxsi/nx_util/unit_test/07_INTERNAL_REQUEST2BIG.results: -------------------------------------------------------------------------------- 1 | BasicRule wl:2 "mz:$URL:/recrutement|BODY"; 2 | -------------------------------------------------------------------------------- /3rd-party/naxsi/nx_util/unit_test/08_WEIRD_REQUESTS.results: -------------------------------------------------------------------------------- 1 | BasicRule wl:1 "mz:$URL:/wp-cron.php"; 2 | -------------------------------------------------------------------------------- /3rd-party/naxsi/nx_util/unit_test/09_FILE_EXT_NAMED_VAR.results: -------------------------------------------------------------------------------- 1 | BasicRule wl:1315 "mz:$URL:/recrutement|$HEADERS_VAR:cookie"; 2 | BasicRule wl:1011 "mz:$URL:/recrutement|$HEADERS_VAR:cookie"; 3 | BasicRule wl:1010 "mz:$URL:/recrutement|$HEADERS_VAR:cookie"; 4 | BasicRule wl:1005 "mz:$URL:/recrutement|$HEADERS_VAR:cookie"; 5 | BasicRule wl:1315 "mz:$URL:/recrutement|$BODY_VAR:cf_working3"; 6 | BasicRule wl:1501 "mz:$URL:/recrutement|$BODY_VAR:cf_uploadfile3[]|FILE_EXT"; 7 | BasicRule wl:1315 "mz:$URL:/recrutement|$BODY_VAR:cf_failure3"; 8 | BasicRule wl:1315 "mz:$URL:/recrutement|$BODY_VAR:cf_codeerr3"; 9 | BasicRule wl:1007 "mz:$URL:/recrutement|$BODY_VAR:cf_codeerr3"; 10 | -------------------------------------------------------------------------------- /3rd-party/naxsi/nx_util/unit_test/run_ut.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | for i in `ls 0* | grep -v .conf | grep -v .results` ; do 5 | PY=$i; 6 | echo "$i" 7 | nx_util.py -v0 -l $PY -o | grep "^Bas" > $PY".results.tmp" 8 | diff $PY".results" $PY".results.tmp" 9 | if [ "$?" != "0" ] ; then 10 | echo "fail on $PY"; 11 | exit; 12 | else 13 | echo "success on $PY"; 14 | fi 15 | #rm naxsi_sig 16 | done 17 | rm naxsi_sig* 18 | rm 0*.tmp 19 | #rm *.log 20 | -------------------------------------------------------------------------------- /3rd-party/nginx-eval-module/Changelog: -------------------------------------------------------------------------------- 1 | 2 | Version 1.0.3 3 | * Change: compatibility with nginx API 0.8.42 and greater 4 | * Change: handle requests with bodies properly 5 | 6 | Version 1.0.2 7 | * Change: restore $uri variable in subrequests 8 | -------------------------------------------------------------------------------- /3rd-party/nginx-eval-module/README: -------------------------------------------------------------------------------- 1 | 2 | Documentation for this module could be found under following URLs: 3 | 4 | * English: 5 | 6 | http://www.grid.net.ru/nginx/eval.en.html 7 | 8 | * Russian: 9 | 10 | http://www.grid.net.ru/nginx/eval.ru.html 11 | 12 | This work is commissioned by gadu-gadu.pl 13 | -------------------------------------------------------------------------------- /3rd-party/nginx-eval-module/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_eval_module 2 | HTTP_MODULES="$HTTP_MODULES ngx_http_eval_module" 3 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_eval_module.c" 4 | -------------------------------------------------------------------------------- /3rd-party/nginx-upstream-fair/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_upstream_fair_module 2 | HTTP_MODULES="$HTTP_MODULES ngx_http_upstream_fair_module" 3 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_upstream_fair_module.c" 4 | have=NGX_HTTP_UPSTREAM_FAIR . auto/have 5 | -------------------------------------------------------------------------------- /3rd-party/ngx_cache_purge-2.3/TODO.md: -------------------------------------------------------------------------------- 1 | Features that __will not__ be added to `ngx_cache_purge`: 2 | 3 | * Support for prefixed purges (`/purge/images/*`). 4 | Reason: Impossible with current cache implementation. 5 | 6 | * Support for wildcard/regex purges (`/purge/*.jpg`). 7 | Reason: Impossible with current cache implementation. 8 | -------------------------------------------------------------------------------- /3rd-party/ngx_cache_purge-2.3/config: -------------------------------------------------------------------------------- 1 | if [ "$HTTP_PROXY" = "YES" ]; then 2 | have=NGX_HTTP_PROXY . auto/have 3 | fi 4 | 5 | if [ "$HTTP_FASTCGI" = "YES" ]; then 6 | have=NGX_HTTP_FASTCGI . auto/have 7 | fi 8 | 9 | if [ "$HTTP_SCGI" = "YES" ]; then 10 | have=NGX_HTTP_SCGI . auto/have 11 | fi 12 | 13 | if [ "$HTTP_UWSGI" = "YES" ]; then 14 | have=NGX_HTTP_UWSGI . auto/have 15 | fi 16 | 17 | ngx_addon_name=ngx_http_cache_purge_module 18 | HTTP_MODULES="$HTTP_MODULES ngx_http_cache_purge_module" 19 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_cache_purge_module.c" 20 | 21 | have=NGX_CACHE_PURGE_MODULE . auto/have 22 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/.gitignore: -------------------------------------------------------------------------------- 1 | tags 2 | cscope.* 3 | *~ 4 | *.swp 5 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/TODO: -------------------------------------------------------------------------------- 1 | - for backward compatability, add the ndk_macros 2 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/auto/actions/array: -------------------------------------------------------------------------------- 1 | 2 | array_create (a,pl,n,sz) a = %1%_array_create (pl,n,sz); if (a == NULL) %A% 3 | array_init (a,pl,n,sz) if (%1%_array_init (a,pl,n,sz) == %E%) %A% 4 | array_push (p,a) p = %1%_array_push (a); if (p == NULL) %A% 5 | array_push_clean (p,a) p = %1%_array_push (a); if (p == NULL) %A%; %2%_zerop (p) 6 | array_push_n (p,a,n) p = %1%_array_push_n (a,n); if (p == NULL) %A% 7 | array_push_n_clean (p,a,n) p = %1%_array_push_n (a,n); if (p == NULL) %A%; %2%_zeropn (p,n) 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/auto/actions/palloc: -------------------------------------------------------------------------------- 1 | 2 | palloc (p,pl,sz) p = %1%_palloc (pl,sz); if (p == NULL) %A% 3 | pallocp (p,pl) %2%_pallocp (p,pl); if (p == NULL) %A% 4 | pallocpn (p,pl,n) %2%_pallocpn (p,pl,n); if (p == NULL) %A% 5 | pcalloc (p,pl,sz) p = %1%_pcalloc (pl,sz); if (p == NULL) %A% 6 | pcallocp (p,pl) %2%_pcallocp (p,pl); if (p == NULL) %A% 7 | pcallocpn (p,pl,n) %2%_pcallocpn (p,pl,n); if (p == NULL) %A% 8 | 9 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/auto/data/action_replacements: -------------------------------------------------------------------------------- 1 | 2 | OK NGX_OK 3 | E NGX_ERROR 4 | CE NGX_CONF_ERROR 5 | COK NGX_CONF_OK 6 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/auto/data/action_types: -------------------------------------------------------------------------------- 1 | r0 return 0 2 | r1 return 1 3 | r_1 return -1 4 | rok return %OK% 5 | rce return %CE% 6 | rcok return %COK% 7 | re return %E% 8 | rn return NULL 9 | rse {ngx_script_error (e); return;} 10 | sce {ngx_script_configure_error (c); return;} 11 | g(_lb) goto _lb 12 | ge goto error 13 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/auto/data/conf_args: -------------------------------------------------------------------------------- 1 | 2 | TAKE1 3 | TAKE2 4 | TAKE3 5 | TAKE4 6 | TAKE5 7 | TAKE6 8 | TAKE7 9 | TAKE8 10 | TAKE12 11 | TAKE13 12 | TAKE23 13 | TAKE123 14 | TAKE1234 15 | 1MORE 16 | 2MORE 17 | ANY 18 | FLAG 19 | BLOCK 20 | MULTI 21 | ARGS_NUMBER 22 | 23 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/auto/data/contexts: -------------------------------------------------------------------------------- 1 | 2 | MAIN 3 | SRV 4 | SIF 5 | LOC 6 | LIF 7 | 8 | MAIN_SRV 9 | MAIN_SIF 10 | MAIN_LOC 11 | MAIN_LIF 12 | SRV_LOC 13 | SRV_LIF 14 | SIF_LOC 15 | SIF_LIF 16 | 17 | MAIN_SRV_LOC 18 | MAIN_SRV_LIF 19 | MAIN_SIF_LOC 20 | MAIN_SIF_LIF 21 | ANY_MAIN 22 | 23 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/auto/data/header_files: -------------------------------------------------------------------------------- 1 | array 2 | palloc 3 | 4 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/auto/data/headers: -------------------------------------------------------------------------------- 1 | http_headers 2 | log 3 | parse 4 | string_util 5 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/auto/data/module_dependencies: -------------------------------------------------------------------------------- 1 | complex_path complex_value path 2 | conf_file string 3 | hash string 4 | set_var rewrite 5 | upstream_list http_create_main_conf 6 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/auto/data/modules_optional: -------------------------------------------------------------------------------- 1 | buf 2 | complex_path 3 | complex_value 4 | conf_file 5 | encoding 6 | hash 7 | http 8 | path 9 | process 10 | regex 11 | rewrite 12 | set_var 13 | string 14 | upstream_list * 15 | uri 16 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/auto/data/prefixes: -------------------------------------------------------------------------------- 1 | ngx 2 | ndk 3 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/auto/src/array.h: -------------------------------------------------------------------------------- 1 | 2 | #define %2%_array_count(a) ((a)->nelts) 3 | #define %2%_array_get_first(a) ((a)->elts) 4 | #define %2%_array_get_index(a,n) ((void*) ((char*) (a)->elts + (a)->size * n)) 5 | #define %2%_array_get_last(a) ((void*) ((char*) (a)->elts + (a)->size * ((a)->nelts - 1))) 6 | #define %2%_array_get_reverse_index(a,n) ((void*) ((char*) (a)->elts + (a)->size * ((a)->nelts - 1 - n))) 7 | #define %2%_array_push_clean(p,a) {p = %1%_array_push (a); %2%_zerop (p);} 8 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/auto/src/palloc.h: -------------------------------------------------------------------------------- 1 | 2 | #define %2%_pallocp(p,pl) p = %1%_palloc (pl,sizeof(*p)) 3 | #define %2%_pallocpn(p,pl,n) p = %1%_palloc (pl,sizeof(*p)*(n)) 4 | 5 | #define %2%_pcallocp(p,pl) p = %1%_pcalloc (pl,sizeof(*p)) 6 | #define %2%_pcallocpn(p,pl,n) p = %1%_pcalloc (pl,sizeof(*p)*(n)) 7 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/auto/text/autogen: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * 2010 (C) Marcus Clyne 4 | * 5 | * DO NOT EDIT THIS FILE MANUALLY 6 | * ------------------------------ 7 | * This file has been generated automatically from scripts in the $base/auto dir and 8 | * data in the $base/auto/data dir. If you wish to edit the output of this file, then 9 | * you should edit these files instead. 10 | * 11 | */ 12 | 13 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/examples/README: -------------------------------------------------------------------------------- 1 | 2 | 2010 (C) Marcus Clyne 3 | 4 | 5 | Examples 6 | -------- 7 | 8 | In this section there are a number of examples of the various features of the tools 9 | module. These have been given in the form of dummy modules, to make it easier to 10 | use as templates for your own module should you choose to do so. 11 | 12 | 13 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/examples/http/set_var/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_set_var_examples_module 2 | HTTP_MODULES="$HTTP_MODULES ngx_http_set_var_examples_module" 3 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_set_var_examples_module.c" 4 | have=NDK_SET_VAR . auto/have -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/notes/CHANGES: -------------------------------------------------------------------------------- 1 | Changelog 2 | --------- 3 | 4 | 0.1 feature : set_var functions 5 | 0.1.1 feature : upstream_list directive and functions 6 | 0.2 feature : conf merge functions 7 | feature : conf command macros 8 | feature : 'action' macros 9 | 0.2.1 bugfix : ndk_map_uri_to_path_add_suffix 10 | 0.2.2 feature : regex conf functions 11 | 0.2.3 feature : version number 12 | 0.2.4 change : the auto/build script is now executed automatically on compilation 13 | 0.2.9 feature : ngx_auto_lib included with source 14 | 0.2.11 bugfix : hash functions did not display properly 15 | 0.2.12 feature : patches for rewrite functions and rewrite phase handler 16 | 0.2.13 change : revert to old behaviour rewrite functions 17 | change : pre-generated config and macro files now provided -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/patches/auto_config: -------------------------------------------------------------------------------- 1 | diff -pNr a/src/core/ngx_config.h b/src/core/ngx_config.h 2 | *** a/src/core/ngx_config.h 2008-09-19 13:47:13.000000000 +0100 3 | --- b/src/core/ngx_config.h 2010-10-09 17:14:13.000000000 +0100 4 | *************** typedef intptr_t ngx_flag_t; 5 | *** 127,131 **** 6 | #define NGX_MAX_UINT32_VALUE (uint32_t) 0xffffffff 7 | #endif 8 | 9 | ! 10 | #endif /* _NGX_CONFIG_H_INCLUDED_ */ 11 | --- 127,131 ---- 12 | #define NGX_MAX_UINT32_VALUE (uint32_t) 0xffffffff 13 | #endif 14 | 15 | ! #include 16 | #endif /* _NGX_CONFIG_H_INCLUDED_ */ 17 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/patches/rewrite_phase_handler: -------------------------------------------------------------------------------- 1 | diff -p -r a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c 2 | *** a/src/http/ngx_http_core_module.c 2010-09-27 12:48:12.000000000 +0100 3 | --- b/src/http/ngx_http_core_module.c 2010-10-09 13:44:09.000000000 +0100 4 | *************** ngx_http_core_rewrite_phase(ngx_http_req 5 | *** 910,915 **** 6 | --- 910,922 ---- 7 | return NGX_AGAIN; 8 | } 9 | 10 | + #if defined(nginx_version) && nginx_version >= 8042 && (NDK_REWRITE_PHASE) 11 | + 12 | + if (rc == NGX_AGAIN || rc == NGX_DONE) { 13 | + return NGX_OK; 14 | + } 15 | + 16 | + #endif 17 | /* rc == NGX_OK || rc == NGX_ERROR || rc == NGX_HTTP_... */ 18 | 19 | ngx_http_finalize_request(r, rc); 20 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/src/ndk_buf.c: -------------------------------------------------------------------------------- 1 | 2 | ngx_int_t 3 | ndk_copy_chain_to_str (ngx_pool_t *pool, ngx_chain_t *in, ngx_str_t *str) 4 | { 5 | ngx_chain_t *cl; 6 | size_t len; 7 | u_char *p; 8 | ngx_buf_t *b; 9 | 10 | len = 0; 11 | for (cl = in; cl; cl = cl->next) 12 | len += ngx_buf_size (cl->buf); 13 | 14 | ndk_palloc_re (p, pool, len + 1); 15 | 16 | str->data = p; 17 | str->len = len; 18 | 19 | for (cl = in; cl; cl = cl->next) { 20 | 21 | b = cl->buf; 22 | 23 | if (ngx_buf_in_memory (b)) { 24 | p = ngx_cpymem (p, b->pos, b->last - b->pos); 25 | } 26 | } 27 | 28 | *p = '\0'; 29 | 30 | return NGX_OK; 31 | } 32 | 33 | 34 | char * 35 | ndk_copy_chain_to_charp (ngx_pool_t *pool, ngx_chain_t *in) 36 | { 37 | ngx_str_t str; 38 | 39 | if (ndk_copy_chain_to_str (pool, in, &str) != NGX_OK) 40 | return NULL; 41 | 42 | return (char *) str.data; 43 | } -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/src/ndk_buf.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | ngx_int_t ndk_copy_chain_to_str (ngx_pool_t *pool, ngx_chain_t *in, ngx_str_t *str); 4 | char * ndk_copy_chain_to_charp (ngx_pool_t *pool, ngx_chain_t *in); 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/src/ndk_complex_value.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | typedef struct { 4 | ngx_str_t key; 5 | ngx_http_complex_value_t value; 6 | } ndk_http_complex_keyval_t; 7 | 8 | 9 | 10 | /* create/compile functions */ 11 | 12 | ngx_int_t ndk_http_complex_value_compile (ngx_conf_t *cf, ngx_http_complex_value_t *cv, ngx_str_t *value); 13 | ngx_array_t * ndk_http_complex_value_array_create (ngx_conf_t *cf, char **s, ngx_int_t n); 14 | ngx_int_t ndk_http_complex_value_array_compile (ngx_conf_t *cf, ngx_array_t *a); 15 | 16 | 17 | /* conf set slot functions */ 18 | 19 | char * ndk_conf_set_http_complex_keyval_slot (ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 20 | char * ndk_conf_set_http_complex_value_slot (ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 21 | char * ndk_conf_set_http_complex_value_array_slot (ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 22 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/src/ndk_encoding.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include 4 | 5 | typedef struct { 6 | char *from; 7 | char *to; 8 | } ndk_encoding_t; 9 | 10 | 11 | char * ndk_conf_set_encoding_slot (ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 12 | 13 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/src/ndk_http.h: -------------------------------------------------------------------------------- 1 | 2 | ngx_uint_t ndk_http_count_phase_handlers (ngx_http_core_main_conf_t *cmcf); 3 | ngx_uint_t ndk_http_parse_request_method (ngx_str_t *m); 4 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/src/ndk_log.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* TODO : the required functions if the compiler does not have variadic macros */ 4 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/src/ndk_path.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* path conversion functions */ 4 | 5 | void ndk_clean_path (ngx_str_t *path, ngx_uint_t complex, size_t off); 6 | void ndk_path_to_dir_safe (ngx_str_t *path, ngx_uint_t complex, size_t off); 7 | 8 | /* path create functions */ 9 | 10 | ngx_array_t * ndk_split_path_create (ngx_conf_t *cf, ngx_str_t *path); 11 | ngx_array_t * ndk_split_path_create_raw (ngx_conf_t *cf, char *path); 12 | 13 | /* conf set functions */ 14 | 15 | char * ndk_conf_set_full_path_slot (ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 16 | char * ndk_conf_set_split_path_slot (ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 17 | 18 | /* conf set post functions */ 19 | 20 | char * ndk_conf_set_full_path (ngx_conf_t *cf, void *data, ngx_str_t *path); 21 | char * ndk_conf_set_full_conf_path (ngx_conf_t *cf, void *data, ngx_str_t *path); 22 | 23 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/src/ndk_process.c: -------------------------------------------------------------------------------- 1 | 2 | ngx_int_t 3 | ndk_init_signals (ngx_signal_t *sig, ngx_log_t *log) 4 | { 5 | struct sigaction sa; 6 | 7 | for ( ; sig->signo != 0; sig++) { 8 | ndk_zerov (sa); 9 | sa.sa_handler = sig->handler; 10 | sigemptyset (&sa.sa_mask); 11 | 12 | if (sigaction (sig->signo, &sa, NULL) == -1) { 13 | ngx_log_error (NGX_LOG_EMERG, log, ngx_errno, 14 | "sigaction(%s) failed", sig->signame); 15 | return NGX_ERROR; 16 | } 17 | } 18 | 19 | return NGX_OK; 20 | } 21 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/src/ndk_process.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | typedef struct { 4 | int signo; 5 | char *signame; 6 | char *name; 7 | void (*handler)(int signo); 8 | } ngx_signal_t; 9 | 10 | 11 | ngx_int_t ndk_init_signals (ngx_signal_t *sig, ngx_log_t *log); 12 | 13 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/src/ndk_regex.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | char * ndk_conf_set_regex_slot (ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 4 | char * ndk_conf_set_regex_caseless_slot (ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 5 | char * ndk_conf_set_regex_array_slot (ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 6 | char * ndk_conf_set_regex_array_caseless_slot (ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 7 | 8 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/src/ndk_rewrite.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* TODO : should remove this when not needed */ 4 | 5 | 6 | 7 | /* used for plugging into the rewrite module (taken from the rewrite module) */ 8 | 9 | typedef struct { 10 | ngx_array_t *codes; /* uintptr_t */ 11 | ngx_uint_t stack_size; 12 | ngx_flag_t log; 13 | ngx_flag_t uninitialized_variable_warn; 14 | } ndk_http_rewrite_loc_conf_t; 15 | 16 | 17 | extern ngx_module_t ngx_http_rewrite_module; 18 | extern uintptr_t ndk_http_script_exit_code; 19 | 20 | char * ndk_http_rewrite_value (ngx_conf_t *cf, ndk_http_rewrite_loc_conf_t *lcf, 21 | ngx_str_t *value); 22 | ngx_int_t ndk_http_rewrite_var (ngx_http_request_t *r, 23 | ngx_http_variable_value_t *v, uintptr_t data); 24 | 25 | #define ndk_http_script_exit (u_char *) &ndk_http_script_exit_code 26 | 27 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/src/ndk_string_util.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #define ndk_str_init(ns,s) {(ns).data = (u_char*) s; (ns).len = sizeof (s) - 1;} 4 | #define ndk_strp_init(ns,s) {(ns)->data = (u_char*) s; (ns)->len = sizeof (s) - 1;} 5 | 6 | #define ndk_zero(p,sz) memset (p,'\0',sz) 7 | #define ndk_zerop(p) ndk_zero (p,sizeof(*p)) 8 | #define ndk_zeropn(p,n) ndk_zero (p,sizeof(*p)*(n)) 9 | #define ndk_zerov(v) ndk_zero (&v,sizeof(v)) 10 | 11 | #define ngx_null_enum { ngx_null_string, 0 } 12 | 13 | #define ndk_memcpyp(d,s) ngx_memcpy(d,s,sizeof(s)) 14 | 15 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/src/ndk_upstream_list.h: -------------------------------------------------------------------------------- 1 | 2 | #if (NDK_UPSTREAM_LIST_CMDS) 3 | 4 | /* TODO : use the generated commands */ 5 | 6 | { 7 | ngx_string ("upstream_list"), 8 | NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_2MORE, 9 | ndk_upstream_list, 10 | 0, 11 | 0, 12 | NULL 13 | }, 14 | 15 | #else 16 | 17 | typedef struct { 18 | ngx_str_t **elts; 19 | ngx_uint_t nelts; 20 | ngx_str_t name; 21 | } ndk_upstream_list_t; 22 | 23 | 24 | ndk_upstream_list_t * 25 | ndk_get_upstream_list (ndk_http_main_conf_t *mcf, u_char *data, size_t len); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/src/ndk_uri.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* TODO : check that this is correct */ 4 | 5 | u_char * 6 | ndk_map_uri_to_path_add_suffix (ngx_http_request_t *r, ngx_str_t *path, ngx_str_t *suffix, ngx_int_t dot) 7 | { 8 | size_t root_size; 9 | u_char *p; 10 | 11 | if (suffix->len) { 12 | 13 | if (dot) { 14 | 15 | p = ngx_http_map_uri_to_path (r, path, &root_size, suffix->len + 1); 16 | 17 | if (p == NULL) 18 | return NULL; 19 | 20 | *p = '.'; 21 | p++; 22 | 23 | } else { 24 | 25 | p = ngx_http_map_uri_to_path (r, path, &root_size, suffix->len); 26 | 27 | if (p == NULL) 28 | return NULL; 29 | } 30 | 31 | path->len--; 32 | 33 | p = ngx_cpymem (p, suffix->data, suffix->len); 34 | *p = '\0'; 35 | 36 | return p; 37 | } 38 | 39 | p = ngx_http_map_uri_to_path (r, path, &root_size, 0); 40 | 41 | path->len--; 42 | 43 | return p; 44 | } 45 | 46 | -------------------------------------------------------------------------------- /3rd-party/ngx_devel_kit/src/ndk_uri.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | u_char * ndk_map_uri_to_path_add_suffix (ngx_http_request_t *r, ngx_str_t *path, ngx_str_t *suffix, ngx_int_t dot); 5 | 6 | 7 | -------------------------------------------------------------------------------- /3rd-party/ngx_http_substitutions_filter_module/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_subs_filter_module 2 | HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_subs_filter_module" 3 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_subs_filter_module.c" 4 | -------------------------------------------------------------------------------- /3rd-party/ngx_http_substitutions_filter_module/test/inc/Module/Install/Include.pm: -------------------------------------------------------------------------------- 1 | #line 1 2 | package Module::Install::Include; 3 | 4 | use strict; 5 | use Module::Install::Base (); 6 | 7 | use vars qw{$VERSION @ISA $ISCORE}; 8 | BEGIN { 9 | $VERSION = '1.01'; 10 | @ISA = 'Module::Install::Base'; 11 | $ISCORE = 1; 12 | } 13 | 14 | sub include { 15 | shift()->admin->include(@_); 16 | } 17 | 18 | sub include_deps { 19 | shift()->admin->include_deps(@_); 20 | } 21 | 22 | sub auto_include { 23 | shift()->admin->auto_include(@_); 24 | } 25 | 26 | sub auto_include_deps { 27 | shift()->admin->auto_include_deps(@_); 28 | } 29 | 30 | sub auto_include_dependent_dists { 31 | shift()->admin->auto_include_dependent_dists(@_); 32 | } 33 | 34 | 1; 35 | -------------------------------------------------------------------------------- /3rd-party/ngx_http_substitutions_filter_module/test/inc/Module/Install/TestBase.pm: -------------------------------------------------------------------------------- 1 | #line 1 2 | package Module::Install::TestBase; 3 | use strict; 4 | use warnings; 5 | 6 | use Module::Install::Base; 7 | 8 | use vars qw($VERSION @ISA); 9 | BEGIN { 10 | $VERSION = '0.60'; 11 | @ISA = 'Module::Install::Base'; 12 | } 13 | 14 | sub use_test_base { 15 | my $self = shift; 16 | $self->include('Test::Base'); 17 | $self->include('Test::Base::Filter'); 18 | $self->include('Spiffy'); 19 | $self->include('Test::More'); 20 | $self->include('Test::Builder'); 21 | $self->include('Test::Builder::Module'); 22 | $self->requires('Filter::Util::Call'); 23 | } 24 | 25 | 1; 26 | 27 | =encoding utf8 28 | 29 | #line 70 30 | -------------------------------------------------------------------------------- /3rd-party/ngx_http_substitutions_filter_module/test/t/subs_capture.t: -------------------------------------------------------------------------------- 1 | 2 | # vi:filetype=perl 3 | 4 | use lib 'lib'; 5 | use Test::Nginx::LWP; 6 | 7 | plan tests => repeat_each() * 2 * blocks(); 8 | $ENV{TEST_NGINX_BACKENDS_PORT} ||= "blog.163.com:80"; 9 | no_root_location(); 10 | 11 | #no_diff; 12 | 13 | run_tests(); 14 | 15 | __DATA__ 16 | 17 | === TEST 1: the "regex with captures substitution" command 18 | --- http_config 19 | 20 | upstream backends { 21 | server $TEST_NGINX_BACKENDS_PORT; 22 | } 23 | 24 | --- config 25 | 26 | location / { 27 | subs_filter '163.(com)' 'yaoweibin.$1' ir; 28 | proxy_set_header Host 'blog.163.com'; 29 | proxy_pass http://backends; 30 | } 31 | --- request 32 | GET / 33 | --- response_body_unlike: ^(.*)163.com(.*)$ 34 | -------------------------------------------------------------------------------- /3rd-party/ngx_http_substitutions_filter_module/test/t/subs_fix_string.t: -------------------------------------------------------------------------------- 1 | 2 | # vi:filetype=perl 3 | 4 | use lib 'lib'; 5 | use Test::Nginx::LWP; 6 | 7 | plan tests => repeat_each() * 2 * blocks(); 8 | $ENV{TEST_NGINX_BACKENDS_PORT} ||= "blog.163.com:80"; 9 | no_root_location(); 10 | 11 | #no_diff; 12 | 13 | run_tests(); 14 | 15 | __DATA__ 16 | 17 | === TEST 1: the "fix string substitution" command 18 | --- http_config 19 | 20 | upstream backends { 21 | server $TEST_NGINX_BACKENDS_PORT; 22 | } 23 | 24 | --- config 25 | 26 | location / { 27 | subs_filter '163.com' 'yaoweibin'; 28 | proxy_set_header Host 'blog.163.com'; 29 | proxy_pass http://backends; 30 | } 31 | --- request 32 | GET / 33 | --- response_body_unlike: ^(.*)163\.com(.*)$ 34 | -------------------------------------------------------------------------------- /3rd-party/ngx_http_substitutions_filter_module/test/t/subs_regex.t: -------------------------------------------------------------------------------- 1 | 2 | # vi:filetype=perl 3 | 4 | use lib 'lib'; 5 | use Test::Nginx::LWP; 6 | 7 | plan tests => repeat_each() * 2 * blocks(); 8 | $ENV{TEST_NGINX_BACKENDS_PORT} ||= "blog.163.com:80"; 9 | no_root_location(); 10 | 11 | #no_diff; 12 | 13 | run_tests(); 14 | 15 | __DATA__ 16 | 17 | === TEST 1: the "regex substitution" command 18 | --- http_config 19 | 20 | upstream backends { 21 | server $TEST_NGINX_BACKENDS_PORT; 22 | } 23 | 24 | --- config 25 | 26 | location / { 27 | subs_filter '163.com' 'yaoweibin' ir; 28 | proxy_set_header Host 'blog.163.com'; 29 | proxy_pass http://backends; 30 | } 31 | --- request 32 | GET / 33 | --- response_body_unlike: ^(.*)163.com(.*)$ 34 | -------------------------------------------------------------------------------- /3rd-party/ngx_http_substitutions_filter_module/test/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #TEST_NGINX_BACKENDS_PORT=127.0.0.1:1234 PATH=/home/yaoweibin/nginx/sbin:$PATH prove -r t 4 | 5 | PATH=/home/yaoweibin/nginx/sbin:$PATH prove -r t 6 | -------------------------------------------------------------------------------- /3rd-party/ngx_http_substitutions_filter_module/util/update-readme.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | perl util/wiki2pod.pl doc/README.wiki > /tmp/a.pod && pod2text /tmp/a.pod > README 4 | 5 | perl util/wiki2pod.pl doc/README.wiki > /tmp/a.pod && pod2html /tmp/a.pod > doc/README.html 6 | 7 | perl util/wiki2google_code_homepage.pl doc/README.wiki > doc/README.google_code_home_page.wiki 8 | -------------------------------------------------------------------------------- /3rd-party/ngx_http_substitutions_filter_module/util/wiki2google_code_homepage.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | 3 | use strict; 4 | use warnings; 5 | use bytes; 6 | 7 | while (<>) { 8 | 9 | s{\s\[ ( [^\[\s]+ ) \]\s }{" `[`$1`]` "}gixe; 10 | 11 | s{ \[\[ ( [^\]\|]+ ) \| ([^\]]*) \]\] }{"[$1 $2]"}gixe; 12 | 13 | s{'''(.*?)'''}{"`$1`"}ge; 14 | s{''(.*?)''}{"_$1_"}ge; 15 | 16 | s{^\s*<[^/>]+>\s*$}{\{\{\{\n}; 17 | s{^\s*\s*$}{\}\}\}}; 18 | 19 | if (/^\s*$/) { 20 | print "\n"; 21 | next; 22 | } 23 | 24 | s{^\*}{ \*}; 25 | s{^\#}{ \#}; 26 | 27 | print $_; 28 | } 29 | 30 | -------------------------------------------------------------------------------- /3rd-party/ngx_http_upstream_check_module/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_upstream_check_module 2 | HTTP_MODULES="$HTTP_MODULES ngx_http_upstream_check_module" 3 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_upstream_check_module.c" 4 | 5 | have=NGX_HTTP_UPSTREAM_CHECK . auto/have 6 | -------------------------------------------------------------------------------- /3rd-party/srcache-nginx-module/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_srcache_filter_module 2 | HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_srcache_filter_module" 3 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/src/ngx_http_srcache_filter_module.c $ngx_addon_dir/src/ngx_http_srcache_util.c $ngx_addon_dir/src/ngx_http_srcache_var.c $ngx_addon_dir/src/ngx_http_srcache_store.c $ngx_addon_dir/src/ngx_http_srcache_fetch.c $ngx_addon_dir/src/ngx_http_srcache_headers.c" 4 | NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_addon_dir/src/ddebug.h $ngx_addon_dir/src/ngx_http_srcache_filter_module.h $ngx_addon_dir/src/ngx_http_srcache_util.h $ngx_addon_dir/src/ngx_http_srcache_var.h $ngx_addon_dir/src/ngx_http_srcache_fetch.h $ngx_addon_dir/src/ngx_http_srcache_store.h $ngx_addon_dir/src/ngx_http_srcache_headers.h" 5 | 6 | -------------------------------------------------------------------------------- /3rd-party/srcache-nginx-module/src/ngx_http_srcache_fetch.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_SRCACHE_FETCH_H_INCLUDED_ 8 | #define _NGX_HTTP_SRCACHE_FETCH_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_srcache_filter_module.h" 12 | 13 | 14 | ngx_int_t ngx_http_srcache_access_handler(ngx_http_request_t *r); 15 | 16 | ngx_int_t ngx_http_srcache_fetch_post_subrequest(ngx_http_request_t *r, 17 | void *data, ngx_int_t rc); 18 | 19 | 20 | #endif /* _NGX_HTTP_SRCACHE_FETCH_H_INCLUDED_ */ 21 | 22 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 23 | -------------------------------------------------------------------------------- /3rd-party/srcache-nginx-module/src/ngx_http_srcache_headers.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_SRCACHE_HEADERS_H_INCLUDED_ 8 | #define _NGX_HTTP_SRCACHE_HEADERS_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_srcache_filter_module.h" 12 | 13 | 14 | typedef struct { 15 | ngx_str_t name; 16 | ngx_http_header_handler_pt handler; 17 | ngx_uint_t offset; 18 | } ngx_http_srcache_header_t; 19 | 20 | 21 | extern ngx_http_srcache_header_t ngx_http_srcache_headers_in[]; 22 | 23 | 24 | ngx_int_t ngx_http_srcache_process_header_line(ngx_http_request_t *r, 25 | ngx_table_elt_t *h, ngx_uint_t offset); 26 | 27 | 28 | #endif /* _NGX_HTTP_SRCACHE_HEADERS_H_INCLUDED_ */ 29 | 30 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 31 | -------------------------------------------------------------------------------- /3rd-party/srcache-nginx-module/src/ngx_http_srcache_store.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_SRCACHE_STORE_H_INCLUDED_ 8 | #define _NGX_HTTP_SRCACHE_STORE_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_srcache_filter_module.h" 12 | 13 | 14 | extern ngx_http_output_header_filter_pt ngx_http_srcache_next_header_filter; 15 | extern ngx_http_output_body_filter_pt ngx_http_srcache_next_body_filter; 16 | 17 | 18 | ngx_int_t ngx_http_srcache_filter_init(ngx_conf_t *cf); 19 | 20 | 21 | #endif /* _NGX_HTTP_SRCACHE_STORE_H_INCLUDED_ */ 22 | 23 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 24 | -------------------------------------------------------------------------------- /3rd-party/srcache-nginx-module/src/ngx_http_srcache_var.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Yichun Zhang (agentzh) 4 | */ 5 | 6 | 7 | #ifndef _NGX_HTTP_SRCACHE_VAR_H_INCLUDED_ 8 | #define _NGX_HTTP_SRCACHE_VAR_H_INCLUDED_ 9 | 10 | 11 | #include "ngx_http_srcache_filter_module.h" 12 | 13 | 14 | ngx_int_t ngx_http_srcache_add_variables(ngx_conf_t *cf); 15 | 16 | 17 | #endif /* _NGX_HTTP_SRCACHE_VAR_H_INCLUDED_ */ 18 | 19 | /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ 20 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | 2 | Documentation is available at http://nginx.org 3 | 4 | -------------------------------------------------------------------------------- /auto/cc/acc: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | # aCC: HP ANSI C++ B3910B A.03.55.02 7 | 8 | # C89 mode 9 | 10 | CFLAGS="$CFLAGS -Ae" 11 | CC_TEST_FLAGS="-Ae" 12 | 13 | PCRE_OPT="$PCRE_OPT -Ae" 14 | ZLIB_OPT="$ZLIB_OPT -Ae" 15 | MD5_OPT="$MD5_OPT -Ae" 16 | -------------------------------------------------------------------------------- /auto/define: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | cat << END >> $NGX_AUTO_CONFIG_H 7 | 8 | #ifndef $have 9 | #define $have $value 10 | #endif 11 | 12 | END 13 | -------------------------------------------------------------------------------- /auto/have: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | cat << END >> $NGX_AUTO_CONFIG_H 7 | 8 | #ifndef $have 9 | #define $have 1 10 | #endif 11 | 12 | END 13 | -------------------------------------------------------------------------------- /auto/have_headers: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | cat << END >> $NGX_AUTO_HEADERS_H 7 | 8 | #ifndef $have 9 | #define $have 1 10 | #endif 11 | 12 | END 13 | -------------------------------------------------------------------------------- /auto/headers: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | ngx_include="unistd.h"; . auto/include 7 | ngx_include="inttypes.h"; . auto/include 8 | ngx_include="limits.h"; . auto/include 9 | ngx_include="sys/filio.h"; . auto/include 10 | ngx_include="sys/param.h"; . auto/include 11 | ngx_include="sys/mount.h"; . auto/include 12 | ngx_include="sys/statvfs.h"; . auto/include 13 | ngx_include="crypt.h"; . auto/include 14 | -------------------------------------------------------------------------------- /auto/init: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | NGX_MAKEFILE=$NGX_OBJS/Makefile 7 | NGX_MODULES_C=$NGX_OBJS/ngx_modules.c 8 | 9 | NGX_AUTO_HEADERS_H=$NGX_OBJS/ngx_auto_headers.h 10 | NGX_AUTO_CONFIG_H=$NGX_OBJS/ngx_auto_config.h 11 | 12 | NGX_AUTOTEST=$NGX_OBJS/autotest 13 | NGX_AUTOCONF_ERR=$NGX_OBJS/autoconf.err 14 | 15 | # STUBs 16 | NGX_ERR=$NGX_OBJS/autoconf.err 17 | MAKEFILE=$NGX_OBJS/Makefile 18 | 19 | 20 | NGX_PCH= 21 | NGX_USE_PCH= 22 | 23 | 24 | # check the echo's "-n" option and "\c" capability 25 | 26 | if echo "test\c" | grep c >/dev/null; then 27 | 28 | if echo -n test | grep n >/dev/null; then 29 | ngx_n= 30 | ngx_c= 31 | 32 | else 33 | ngx_n=-n 34 | ngx_c= 35 | fi 36 | 37 | else 38 | ngx_n= 39 | ngx_c='\c' 40 | fi 41 | 42 | 43 | # create Makefile 44 | 45 | cat << END > Makefile 46 | 47 | default: build 48 | 49 | clean: 50 | rm -rf Makefile $NGX_OBJS 51 | END 52 | -------------------------------------------------------------------------------- /auto/lib/libatomic/make: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | cat << END >> $NGX_MAKEFILE 7 | 8 | $NGX_LIBATOMIC/src/libatomic_ops.a: $NGX_LIBATOMIC/Makefile 9 | cd $NGX_LIBATOMIC && \$(MAKE) 10 | 11 | $NGX_LIBATOMIC/Makefile: $NGX_MAKEFILE 12 | cd $NGX_LIBATOMIC \\ 13 | && if [ -f Makefile ]; then \$(MAKE) distclean; fi \\ 14 | && ./configure 15 | 16 | END 17 | -------------------------------------------------------------------------------- /auto/lib/make: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | if [ $PCRE != NONE -a $PCRE != NO -a $PCRE != YES ]; then 7 | . auto/lib/pcre/make 8 | fi 9 | 10 | if [ $MD5 != NONE -a $MD5 != NO -a $MD5 != YES ]; then 11 | . auto/lib/md5/make 12 | fi 13 | 14 | if [ $SHA1 != NONE -a $SHA1 != NO -a $SHA1 != YES ]; then 15 | . auto/lib/sha1/make 16 | fi 17 | 18 | if [ $OPENSSL != NONE -a $OPENSSL != NO -a $OPENSSL != YES ]; then 19 | . auto/lib/openssl/make 20 | fi 21 | 22 | if [ $ZLIB != NONE -a $ZLIB != NO -a $ZLIB != YES ]; then 23 | . auto/lib/zlib/make 24 | fi 25 | 26 | if [ $NGX_LIBATOMIC != NO -a $NGX_LIBATOMIC != YES ]; then 27 | . auto/lib/libatomic/make 28 | fi 29 | 30 | if [ $USE_PERL != NO ]; then 31 | . auto/lib/perl/make 32 | fi 33 | -------------------------------------------------------------------------------- /auto/lib/md5/makefile.bcc: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | CFLAGS = -q -O2 -tWM $(CPU_OPT) -DL_ENDIAN 7 | 8 | !if "$(MD5_ASM)" == "YES" 9 | 10 | md5.lib: 11 | cd $(MD5) 12 | bcc32 -c $(CFLAGS) -DMD5_ASM md5_dgst.c 13 | tlib md5.lib +md5_dgst.obj +"asm\m-win32.obj" 14 | 15 | !else 16 | 17 | md5.lib: 18 | cd $(MD5) 19 | bcc32 -c $(CFLAGS) md5_dgst.c 20 | tlib md5.lib +md5_dgst.obj 21 | 22 | !endif 23 | -------------------------------------------------------------------------------- /auto/lib/md5/makefile.msvc: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | CFLAGS = -nologo -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT) -D L_ENDIAN 7 | 8 | !IF "$(MD5_ASM)" == "YES" 9 | 10 | md5.lib: 11 | cd $(MD5) 12 | cl -c $(CFLAGS) -D MD5_ASM md5_dgst.c 13 | link -lib -out:md5.lib md5_dgst.obj asm/m-win32.obj 14 | 15 | !ELSE 16 | 17 | md5.lib: 18 | cd $(MD5) 19 | cl -c $(CFLAGS) md5_dgst.c 20 | link -lib -out:md5.lib md5_dgst.obj 21 | 22 | !ENDIF 23 | -------------------------------------------------------------------------------- /auto/lib/md5/makefile.owc: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | CFLAGS = -zq -bt=nt -bm -ot -op -oi -oe -s $(CPU_OPT) 7 | 8 | md5.lib: 9 | cd $(MD5) 10 | wcl386 -c $(CFLAGS) -dL_ENDIAN md5_dgst.c 11 | wlib -n md5.lib md5_dgst.obj 12 | -------------------------------------------------------------------------------- /auto/lib/openssl/makefile.bcc: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | all: 7 | cd $(OPENSSL) 8 | 9 | perl Configure BC-32 no-shared --prefix=openssl $(OPENSSL_OPT) 10 | 11 | ms\do_nasm 12 | 13 | $(MAKE) -f ms\bcb.mak 14 | $(MAKE) -f ms\bcb.mak install 15 | 16 | # Borland's make does not expand "[ch]" in 17 | # copy "inc32\openssl\*.[ch]" "openssl\include\openssl" 18 | copy inc32\openssl\*.h openssl\include\openssl 19 | -------------------------------------------------------------------------------- /auto/lib/openssl/makefile.msvc: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | all: 7 | cd $(OPENSSL) 8 | 9 | perl Configure VC-WIN32 no-shared --prefix=openssl $(OPENSSL_OPT) 10 | 11 | ms\do_ms 12 | 13 | $(MAKE) -f ms\nt.mak 14 | $(MAKE) -f ms\nt.mak install 15 | -------------------------------------------------------------------------------- /auto/lib/pcre/makefile.bcc: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | CFLAGS = -q -O2 -tWM -w-8004 $(CPU_OPT) 7 | PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 \ 8 | -DSUPPORT_PCRE8 -DHAVE_MEMMOVE 9 | 10 | 11 | pcre.lib: 12 | cd $(PCRE) 13 | 14 | bcc32 -c $(CFLAGS) -I. $(PCREFLAGS) pcre_*.c 15 | 16 | copy /y nul pcre.lst 17 | for %n in (*.obj) do @echo +%n ^^& >> pcre.lst 18 | echo + >> pcre.lst 19 | 20 | tlib pcre.lib @pcre.lst 21 | 22 | pcre.h: 23 | cd $(PCRE) 24 | 25 | copy /y pcre.h.generic pcre.h 26 | copy /y config.h.generic config.h 27 | copy /y pcre_chartables.c.dist pcre_chartables.c 28 | -------------------------------------------------------------------------------- /auto/lib/pcre/makefile.msvc: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | CFLAGS = -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT) 7 | PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 \ 8 | -DSUPPORT_PCRE8 -DHAVE_MEMMOVE 9 | 10 | 11 | pcre.lib: 12 | cd $(PCRE) 13 | 14 | cl -nologo -c $(CFLAGS) -I . $(PCREFLAGS) pcre_*.c 15 | 16 | link -lib -out:pcre.lib -verbose:lib pcre_*.obj 17 | 18 | pcre.h: 19 | cd $(PCRE) 20 | 21 | copy /y pcre.h.generic pcre.h 22 | copy /y config.h.generic config.h 23 | copy /y pcre_chartables.c.dist pcre_chartables.c 24 | -------------------------------------------------------------------------------- /auto/lib/pcre/makefile.owc: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(CPU_OPT) 7 | PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 & 8 | -DSUPPORT_PCRE8 -DHAVE_MEMMOVE 9 | 10 | 11 | pcre.lib: 12 | cd $(PCRE) 13 | 14 | wcl386 $(CFLAGS) -i=. $(PCREFLAGS) pcre_*.c 15 | 16 | dir /b *.obj > pcre.lst 17 | 18 | wlib -n pcre.lib @pcre.lst 19 | 20 | pcre.h: 21 | cd $(PCRE) 22 | 23 | copy /y pcre.h.generic pcre.h 24 | copy /y config.h.generic config.h 25 | copy /y pcre_chartables.c.dist pcre_chartables.c 26 | -------------------------------------------------------------------------------- /auto/lib/sha1/makefile.bcc: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | CFLAGS = -q -O2 -tWM $(CPU_OPT) -DL_ENDIAN 7 | 8 | !if "$(SHA1_ASM)" == "YES" 9 | 10 | sha1.lib: 11 | cd $(SHA1) 12 | bcc32 -c $(CFLAGS) -DSHA1_ASM sha1dgst.c 13 | tlib sha1.lib +sha1dgst.obj +"asm\s-win32.obj" 14 | 15 | !else 16 | 17 | sha1.lib: 18 | cd $(SHA1) 19 | bcc32 -c $(CFLAGS) sha1dgst.c 20 | tlib sha1.lib +sha1dgst.obj 21 | 22 | !endif 23 | -------------------------------------------------------------------------------- /auto/lib/sha1/makefile.msvc: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | CFLAGS = -nologo -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT) -D L_ENDIAN 7 | 8 | !IF "$(SHA1_ASM)" == "YES" 9 | 10 | sha1.lib: 11 | cd $(SHA1) 12 | cl -c $(CFLAGS) -D SHA1_ASM sha1dgst.c 13 | link -lib -out:sha1.lib sha1dgst.obj asm/s-win32.obj 14 | 15 | !ELSE 16 | 17 | sha1.lib: 18 | cd $(SHA1) 19 | cl -c $(CFLAGS) sha1dgst.c 20 | link -lib -out:sha1.lib sha1dgst.obj 21 | 22 | !ENDIF 23 | -------------------------------------------------------------------------------- /auto/lib/sha1/makefile.owc: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | CFLAGS = -zq -bt=nt -bm -ot -op -oi -oe -s $(CPU_OPT) 7 | 8 | sha1.lib: 9 | cd $(SHA1) 10 | wcl386 -c $(CFLAGS) -dL_ENDIAN sha1dgst.c 11 | wlib -n sha1.lib sha1dgst.obj 12 | -------------------------------------------------------------------------------- /auto/lib/test: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | echo $ngx_n "checking for $ngx_lib ...$ngx_c" 7 | 8 | cat << END >> $NGX_AUTOCONF_ERR 9 | 10 | ---------------------------------------- 11 | checking for $ngx_lib 12 | 13 | END 14 | 15 | ngx_found=no 16 | 17 | cat << END > $NGX_AUTOTEST.c 18 | 19 | $ngx_lib_incs 20 | 21 | int main() { 22 | $ngx_lib_test; 23 | return 0; 24 | } 25 | 26 | 27 | eval "$CC $cc_test_flags $ngx_lib_cflags \ 28 | -o $NGX_AUTOTEST $NGX_AUTOTEST.c $ngx_libs \ 29 | >> $NGX_ERR 2>&1" 30 | 31 | if [ -x $NGX_AUTOTEST ]; then 32 | echo " found" 33 | 34 | ngx_found=yes 35 | 36 | else 37 | echo " not found" 38 | fi 39 | 40 | rm -rf $NGX_AUTOTEST* 41 | -------------------------------------------------------------------------------- /auto/lib/zlib/makefile.bcc: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | CFLAGS = -q -O2 -tWM -w-8004 -w-8012 $(CPU_OPT) 7 | 8 | zlib.lib: 9 | cd $(ZLIB) 10 | 11 | bcc32 -c $(CFLAGS) adler32.c crc32.c deflate.c \ 12 | trees.c zutil.c compress.c \ 13 | inflate.c inffast.c inftrees.c 14 | 15 | tlib zlib.lib +adler32.obj +crc32.obj +deflate.obj \ 16 | +trees.obj +zutil.obj +compress.obj \ 17 | +inflate.obj +inffast.obj +inftrees.obj 18 | -------------------------------------------------------------------------------- /auto/lib/zlib/makefile.msvc: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | CFLAGS = -nologo -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT) 7 | 8 | zlib.lib: 9 | cd $(ZLIB) 10 | 11 | cl -c $(CFLAGS) adler32.c crc32.c deflate.c \ 12 | trees.c zutil.c compress.c \ 13 | inflate.c inffast.c inftrees.c 14 | 15 | link -lib -out:zlib.lib adler32.obj crc32.obj deflate.obj \ 16 | trees.obj zutil.obj compress.obj \ 17 | inflate.obj inffast.obj inftrees.obj 18 | -------------------------------------------------------------------------------- /auto/lib/zlib/makefile.owc: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | CFLAGS = -zq -bt=nt -ot -op -oi -oe -s -bm $(CPU_OPT) 7 | 8 | zlib.lib: 9 | cd $(ZLIB) 10 | 11 | wcl386 -c $(CFLAGS) adler32.c crc32.c deflate.c trees.c zutil.c & 12 | compress.c inflate.c inffast.c inftrees.c 13 | wlib -n zlib.lib adler32.obj crc32.obj deflate.obj trees.obj & 14 | zutil.obj compress.obj inflate.obj inffast.obj inftrees.obj 15 | -------------------------------------------------------------------------------- /auto/nohave: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | cat << END >> $NGX_AUTO_CONFIG_H 7 | 8 | #ifndef $have 9 | #define $have 0 10 | #endif 11 | 12 | END 13 | -------------------------------------------------------------------------------- /auto/stubs: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | have=NGX_SUPPRESS_WARN . auto/have 7 | 8 | have=NGX_SMP . auto/have 9 | -------------------------------------------------------------------------------- /auto/threads: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Nginx, Inc. 3 | 4 | 5 | if [ $USE_THREADS = YES ]; then 6 | 7 | if [ "$NGX_PLATFORM" = win32 ]; then 8 | cat << END 9 | 10 | $0: --with-threads is not supported on Windows 11 | 12 | END 13 | exit 1 14 | fi 15 | 16 | have=NGX_THREADS . auto/have 17 | CORE_DEPS="$CORE_DEPS $THREAD_POOL_DEPS" 18 | CORE_SRCS="$CORE_SRCS $THREAD_POOL_SRCS" 19 | CORE_LIBS="$CORE_LIBS -lpthread" 20 | fi 21 | -------------------------------------------------------------------------------- /auto/types/value: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) Igor Sysoev 3 | # Copyright (C) Nginx, Inc. 4 | 5 | 6 | cat << END >> $NGX_AUTO_CONFIG_H 7 | 8 | #ifndef $ngx_param 9 | #define $ngx_param $ngx_value 10 | #endif 11 | 12 | END 13 | -------------------------------------------------------------------------------- /conf/scgi_params: -------------------------------------------------------------------------------- 1 | 2 | scgi_param REQUEST_METHOD $request_method; 3 | scgi_param REQUEST_URI $request_uri; 4 | scgi_param QUERY_STRING $query_string; 5 | scgi_param CONTENT_TYPE $content_type; 6 | 7 | scgi_param DOCUMENT_URI $document_uri; 8 | scgi_param DOCUMENT_ROOT $document_root; 9 | scgi_param SCGI 1; 10 | scgi_param SERVER_PROTOCOL $server_protocol; 11 | scgi_param HTTPS $https if_not_empty; 12 | 13 | scgi_param REMOTE_ADDR $remote_addr; 14 | scgi_param REMOTE_PORT $remote_port; 15 | scgi_param SERVER_PORT $server_port; 16 | scgi_param SERVER_NAME $server_name; 17 | -------------------------------------------------------------------------------- /conf/uwsgi_params: -------------------------------------------------------------------------------- 1 | 2 | uwsgi_param QUERY_STRING $query_string; 3 | uwsgi_param REQUEST_METHOD $request_method; 4 | uwsgi_param CONTENT_TYPE $content_type; 5 | uwsgi_param CONTENT_LENGTH $content_length; 6 | 7 | uwsgi_param REQUEST_URI $request_uri; 8 | uwsgi_param PATH_INFO $document_uri; 9 | uwsgi_param DOCUMENT_ROOT $document_root; 10 | uwsgi_param SERVER_PROTOCOL $server_protocol; 11 | uwsgi_param HTTPS $https if_not_empty; 12 | 13 | uwsgi_param REMOTE_ADDR $remote_addr; 14 | uwsgi_param REMOTE_PORT $remote_port; 15 | uwsgi_param SERVER_PORT $server_port; 16 | uwsgi_param SERVER_NAME $server_name; 17 | -------------------------------------------------------------------------------- /contrib/README: -------------------------------------------------------------------------------- 1 | 2 | geo2nginx.pl by Andrei Nigmatulin 3 | 4 | The perl script to convert CSV geoip database ( free download 5 | at http://www.maxmind.com/app/geoip_country ) to format, suitable 6 | for use by the ngx_http_geo_module. 7 | 8 | 9 | unicode2nginx by Maxim Dounin 10 | 11 | The perl script to convert unicode mappings ( available 12 | at http://www.unicode.org/Public/MAPPINGS/ ) to the nginx 13 | configuration file format. 14 | Two generated full maps for windows-1251 and koi8-r. 15 | 16 | 17 | vim by Evan Miller 18 | 19 | Syntax highlighting of nginx configuration for vim, to be 20 | placed into ~/.vim/. 21 | 22 | -------------------------------------------------------------------------------- /contrib/spacekicker.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | 5 | open(IN, "$ARGV[0]") or die "Can't read file $ARGV[0]\n"; 6 | 7 | my @result; 8 | my $i = 1; 9 | my $red_bg = "\033[41m"; 10 | my $non = "\033[0m"; 11 | 12 | foreach () { 13 | if (s/^(.*\S)*( +)\n/$1\n/) { 14 | print "line $i: stripped out spaces: ".$1.$red_bg.$2.$non."\n"; 15 | } 16 | 17 | push @result, $_; 18 | 19 | $i++; 20 | } 21 | 22 | close(IN); 23 | 24 | open(OUT, ">$ARGV[0]") or die "Can't write file $ARGV[0]\n"; 25 | print OUT @result; 26 | close(OUT); 27 | -------------------------------------------------------------------------------- /contrib/vim/ftdetect/nginx.vim: -------------------------------------------------------------------------------- 1 | au BufRead,BufNewFile *.nginx set ft=nginx 2 | au BufRead,BufNewFile */etc/nginx/* set ft=nginx 3 | au BufRead,BufNewFile */usr/local/nginx/conf/* set ft=nginx 4 | au BufRead,BufNewFile nginx.conf set ft=nginx 5 | -------------------------------------------------------------------------------- /contrib/vim/indent/nginx.vim: -------------------------------------------------------------------------------- 1 | if exists("b:did_indent") 2 | finish 3 | endif 4 | let b:did_indent = 1 5 | 6 | setlocal indentexpr= 7 | 8 | " cindent actually works for nginx' simple file structure 9 | setlocal cindent 10 | " Just make sure that the comments are not reset as defs would be. 11 | setlocal cinkeys-=0# 12 | -------------------------------------------------------------------------------- /docs/dtd/change_log_conf.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/dtd/changes.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/html/50x.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Error 5 | 12 | 13 | 14 |

An error occurred.

15 |

Sorry, the page you are looking for is currently unavailable.
16 | Please try again later.

17 |

If you are the system administrator of this resource then you should check 18 | the error log for details.

19 |

Faithfully yours, nginx.

20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Welcome to nginx! 5 | 12 | 13 | 14 |

Welcome to nginx!

15 |

If you see this page, the nginx web server is successfully installed and 16 | working. Further configuration is required.

17 | 18 |

For online documentation and support please refer to 19 | nginx.org.
20 | Commercial support is available at 21 | nginx.com.

22 | 23 |

Thank you for using nginx.

24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/text/README: -------------------------------------------------------------------------------- 1 | 2 | Documentation is available at http://nginx.org 3 | 4 | -------------------------------------------------------------------------------- /html/50x.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Error 5 | 12 | 13 | 14 |

An error occurred.

15 |

Sorry, the page you are looking for is currently unavailable.
16 | Please try again later.

17 |

If you are the system administrator of this resource then you should check 18 | the error log for details.

19 |

Faithfully yours, nginx.

20 | 21 | 22 | -------------------------------------------------------------------------------- /html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Welcome to nginx! 5 | 12 | 13 | 14 |

Welcome to nginx!

15 |

If you see this page, the nginx web server is successfully installed and 16 | working. Further configuration is required.

17 | 18 |

For online documentation and support please refer to 19 | nginx.org.
20 | Commercial support is available at 21 | nginx.com.

22 | 23 |

Thank you for using nginx.

24 | 25 | 26 | -------------------------------------------------------------------------------- /html/senginx_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeusoftSecurity/SEnginx/d4b03e7a6f3fa288740089f203d6d1b10050d834/html/senginx_logo.png -------------------------------------------------------------------------------- /neusoft/ngx_http_cache_extend/config: -------------------------------------------------------------------------------- 1 | have=NGX_HTTP_CACHE_EXTEND . auto/have 2 | -------------------------------------------------------------------------------- /neusoft/ngx_http_cookie_poisoning/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_cookie_poisoning_module 2 | CORE_INCS="$CORE_INCS $ngx_addon_dir" 3 | CORE_DEPS="$CORE_DEPS $ngx_addon_dir/ngx_http_cookie_poisoning.h" 4 | HTTP_MODULES="$HTTP_MODULES ngx_http_cookie_poisoning_module" 5 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_cookie_poisoning.c" 6 | have=NGX_HTTP_COOKIE_POISONING . auto/have 7 | -------------------------------------------------------------------------------- /neusoft/ngx_http_dynamic_resolve/config: -------------------------------------------------------------------------------- 1 | have=NGX_DYNAMIC_RESOLVE . auto/have 2 | -------------------------------------------------------------------------------- /neusoft/ngx_http_if_extend/README: -------------------------------------------------------------------------------- 1 | ifall (condition1) (condition2) ... (conditionN) { 2 | 3 | } 4 | 5 | ifany (condition1) (condition2) ... (conditionN) { 6 | 7 | } 8 | 9 | >= <= !> !< 10 | -------------------------------------------------------------------------------- /neusoft/ngx_http_if_extend/config: -------------------------------------------------------------------------------- 1 | have=NGX_IF_EXTEND . auto/have 2 | -------------------------------------------------------------------------------- /neusoft/ngx_http_ip_behavior/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_ip_behavior_module 2 | NGX_ADDON_DEPS="$CORE_DEPS $ngx_addon_dir/ngx_http_ip_behavior.h" 3 | HTTP_MODULES="$HTTP_MODULES ngx_http_ip_behavior_module" 4 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_ip_behavior.c" 5 | have=NGX_HTTP_IP_BEHAVIOR . auto/have 6 | -------------------------------------------------------------------------------- /neusoft/ngx_http_ip_blacklist/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_ip_blacklist_module 2 | CORE_INCS="$CORE_INCS $ngx_addon_dir" 3 | CORE_DEPS="$CORE_DEPS $ngx_addon_dir/ngx_http_ip_blacklist.h" 4 | HTTP_MODULES="$HTTP_MODULES ngx_http_ip_blacklist_module" 5 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_ip_blacklist.c" 6 | have=NGX_HTTP_IP_BLACKLIST . auto/have 7 | -------------------------------------------------------------------------------- /neusoft/ngx_http_neteye_security/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_neteye_security_module 2 | CORE_INCS="$CORE_INCS $ngx_addon_dir" 3 | CORE_DEPS="$CORE_DEPS $ngx_addon_dir/ngx_http_neteye_security.h" 4 | HTTP_FILTER_MODULES=`echo $HTTP_FILTER_MODULES|sed "s/ngx_http_header_filter_module/ngx_http_header_filter_module ngx_http_neteye_security_module/"` 5 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_neteye_security.c" 6 | have=NGX_HTTP_NETEYE_SECURITY . auto/have 7 | -------------------------------------------------------------------------------- /neusoft/ngx_http_robot_mitigation/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_robot_mitigation_module 2 | CORE_INCS="$CORE_INCS $ngx_addon_dir" 3 | CORE_DEPS="$CORE_DEPS $ngx_addon_dir/ngx_http_robot_mitigation.h" 4 | HTTP_MODULES="$HTTP_MODULES ngx_http_robot_mitigation_module" 5 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_robot_mitigation.c $ngx_addon_dir/ngx_http_robot_mitigation_tpl.c" 6 | have=NGX_HTTP_ROBOT_MITIGATION_MODULE . auto/have 7 | 8 | gcc -o $ngx_addon_dir/tools/gen-tpl $ngx_addon_dir/tools/gen-random-js-tpl.c 9 | $ngx_addon_dir/tools/gen-tpl -s -n 100 > $ngx_addon_dir/ngx_http_robot_mitigation_tpl.c 10 | rm -f $ngx_addon_dir/tools/gen-tpl 11 | -------------------------------------------------------------------------------- /neusoft/ngx_http_session/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_session_module 2 | CORE_INCS="$CORE_INCS $ngx_addon_dir" 3 | CORE_DEPS="$CORE_DEPS $ngx_addon_dir/ngx_http_session.h" 4 | HTTP_MODULES="$HTTP_MODULES ngx_http_session_module" 5 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_session.c" 6 | have=NGX_HTTP_SESSION . auto/have 7 | -------------------------------------------------------------------------------- /neusoft/ngx_http_statistics/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_statisitcs_module 2 | CORE_INCS="$CORE_INCS $ngx_addon_dir" 3 | CORE_DEPS="$CORE_DEPS $ngx_addon_dir/ngx_http_statistics.h" 4 | HTTP_MODULES="$HTTP_MODULES ngx_http_statistics_module" 5 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_statistics.c" 6 | have=NGX_HTTP_STATISTICS . auto/have 7 | -------------------------------------------------------------------------------- /neusoft/ngx_http_status_page/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_status_page_module 2 | CORE_INCS="$CORE_INCS $ngx_addon_dir" 3 | CORE_DEPS="$CORE_DEPS $ngx_addon_dir/ngx_http_status_page.h" 4 | HTTP_MODULES="$HTTP_MODULES ngx_http_status_page_module" 5 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_status_page.c" 6 | have=NGX_HTTP_STATUS_PAGE . auto/have 7 | -------------------------------------------------------------------------------- /neusoft/ngx_http_upstream_fastest/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_upstream_fastest_module 2 | 3 | HTTP_MODULES="$HTTP_MODULES ngx_http_upstream_fastest_module" 4 | CORE_INCS="$CORE_INCS $ngx_addon_dir" 5 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_upstream_fastest.c" 6 | 7 | have=NGX_DYNAMIC_RESOLVE . auto/have 8 | -------------------------------------------------------------------------------- /neusoft/ngx_http_upstream_persistence/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_upstream_persistence_module 2 | 3 | HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES ngx_http_upstream_persistence_module" 4 | CORE_INCS="$CORE_INCS $ngx_addon_dir" 5 | CORE_DEPS="$CORE_DEPS $ngx_addon_dir/ngx_http_upstream_persistence.h" 6 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_upstream_persistence.c" 7 | have=NGX_HTTP_PERSISTENCE . auto/have 8 | -------------------------------------------------------------------------------- /neusoft/ngx_http_web_defacement/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_web_defacement_module 2 | CORE_INCS="$CORE_INCS $ngx_addon_dir" 3 | CORE_DEPS="$CORE_DEPS $ngx_addon_dir/ngx_http_web_defacement.h" 4 | HTTP_MODULES="$HTTP_MODULES ngx_http_web_defacement_module" 5 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_web_defacement.c" 6 | have=NGX_HTTP_WEB_DEFACEMENT . auto/have 7 | -------------------------------------------------------------------------------- /neusoft/ngx_http_web_defacement/kernel/Makefile: -------------------------------------------------------------------------------- 1 | MODULE_NAME = wdfp 2 | 3 | ifneq ($(KERNELRELEASE),) 4 | obj-m := $(MODULE_NAME).o 5 | $(MODULE_NAME)-objs := wdfp_main.o wdfp_proc.o 6 | else 7 | KERNELDIR ?= /lib/modules/$(shell uname -r)/build 8 | PWD := $(shell pwd) 9 | 10 | default: 11 | $(MAKE) -C $(KERNELDIR) M=$(PWD) modules 12 | endif 13 | 14 | clean: 15 | $(MAKE) -C $(KERNELDIR) M=$(PWD) clean 16 | install: 17 | $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install 18 | -------------------------------------------------------------------------------- /neusoft/ngx_http_web_defacement/kernel/wdfp_start.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | -------------------------------------------------------------------------------- /neusoft/ngx_http_web_defacement/kernel/wdfp_stop.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | -------------------------------------------------------------------------------- /neusoft/ngx_http_whitelist/config: -------------------------------------------------------------------------------- 1 | ngx_addon_name=ngx_http_whitelist_module 2 | CORE_INCS="$CORE_INCS $ngx_addon_dir" 3 | CORE_DEPS="$CORE_DEPS $ngx_addon_dir/ngx_http_whitelist.h" 4 | HTTP_MODULES="$HTTP_MODULES ngx_http_whitelist_module" 5 | NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_whitelist.c" 6 | have=NGX_HTTP_WHITELIST . auto/have 7 | -------------------------------------------------------------------------------- /src/core/nginx.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Igor Sysoev 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGINX_H_INCLUDED_ 9 | #define _NGINX_H_INCLUDED_ 10 | 11 | 12 | #define nginx_version 1010002 13 | #define NGINX_VERSION "1.7.0" 14 | #define NGINX_VER "SEnginx/" NGINX_VERSION 15 | 16 | #ifdef NGX_BUILD 17 | #define NGINX_VER_BUILD NGINX_VER " (" NGX_BUILD ")" 18 | #else 19 | #define NGINX_VER_BUILD NGINX_VER 20 | #endif 21 | 22 | #define NGINX_VAR "NGINX" 23 | #define NGX_OLDPID_EXT ".oldbin" 24 | 25 | 26 | #endif /* _NGINX_H_INCLUDED_ */ 27 | -------------------------------------------------------------------------------- /src/core/ngx_crc.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Igor Sysoev 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_CRC_H_INCLUDED_ 9 | #define _NGX_CRC_H_INCLUDED_ 10 | 11 | 12 | #include 13 | #include 14 | 15 | 16 | /* 32-bit crc16 */ 17 | 18 | static ngx_inline uint32_t 19 | ngx_crc(u_char *data, size_t len) 20 | { 21 | uint32_t sum; 22 | 23 | for (sum = 0; len; len--) { 24 | 25 | /* 26 | * gcc 2.95.2 x86 and icc 7.1.006 compile 27 | * that operator into the single "rol" opcode, 28 | * msvc 6.0sp2 compiles it into four opcodes. 29 | */ 30 | sum = sum >> 1 | sum << 31; 31 | 32 | sum += *data++; 33 | } 34 | 35 | return sum; 36 | } 37 | 38 | 39 | #endif /* _NGX_CRC_H_INCLUDED_ */ 40 | -------------------------------------------------------------------------------- /src/core/ngx_crypt.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Igor Sysoev 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_CRYPT_H_INCLUDED_ 9 | #define _NGX_CRYPT_H_INCLUDED_ 10 | 11 | 12 | #include 13 | #include 14 | 15 | 16 | ngx_int_t ngx_crypt(ngx_pool_t *pool, u_char *key, u_char *salt, 17 | u_char **encrypted); 18 | 19 | 20 | #endif /* _NGX_CRYPT_H_INCLUDED_ */ 21 | -------------------------------------------------------------------------------- /src/core/ngx_murmurhash.c: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Austin Appleby 4 | */ 5 | 6 | 7 | #include 8 | #include 9 | 10 | 11 | uint32_t 12 | ngx_murmur_hash2(u_char *data, size_t len) 13 | { 14 | uint32_t h, k; 15 | 16 | h = 0 ^ len; 17 | 18 | while (len >= 4) { 19 | k = data[0]; 20 | k |= data[1] << 8; 21 | k |= data[2] << 16; 22 | k |= data[3] << 24; 23 | 24 | k *= 0x5bd1e995; 25 | k ^= k >> 24; 26 | k *= 0x5bd1e995; 27 | 28 | h *= 0x5bd1e995; 29 | h ^= k; 30 | 31 | data += 4; 32 | len -= 4; 33 | } 34 | 35 | switch (len) { 36 | case 3: 37 | h ^= data[2] << 16; 38 | case 2: 39 | h ^= data[1] << 8; 40 | case 1: 41 | h ^= data[0]; 42 | h *= 0x5bd1e995; 43 | } 44 | 45 | h ^= h >> 13; 46 | h *= 0x5bd1e995; 47 | h ^= h >> 15; 48 | 49 | return h; 50 | } 51 | -------------------------------------------------------------------------------- /src/core/ngx_murmurhash.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Igor Sysoev 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_MURMURHASH_H_INCLUDED_ 9 | #define _NGX_MURMURHASH_H_INCLUDED_ 10 | 11 | 12 | #include 13 | #include 14 | 15 | 16 | uint32_t ngx_murmur_hash2(u_char *data, size_t len); 17 | 18 | 19 | #endif /* _NGX_MURMURHASH_H_INCLUDED_ */ 20 | -------------------------------------------------------------------------------- /src/core/ngx_parse.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Igor Sysoev 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_PARSE_H_INCLUDED_ 9 | #define _NGX_PARSE_H_INCLUDED_ 10 | 11 | 12 | #include 13 | #include 14 | 15 | 16 | ssize_t ngx_parse_size(ngx_str_t *line); 17 | off_t ngx_parse_offset(ngx_str_t *line); 18 | ngx_int_t ngx_parse_time(ngx_str_t *line, ngx_uint_t is_sec); 19 | 20 | 21 | #endif /* _NGX_PARSE_H_INCLUDED_ */ 22 | -------------------------------------------------------------------------------- /src/core/ngx_parse_time.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Igor Sysoev 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_PARSE_TIME_H_INCLUDED_ 9 | #define _NGX_PARSE_TIME_H_INCLUDED_ 10 | 11 | 12 | #include 13 | #include 14 | 15 | 16 | time_t ngx_parse_http_time(u_char *value, size_t len); 17 | 18 | /* compatibility */ 19 | #define ngx_http_parse_time(value, len) ngx_parse_http_time(value, len) 20 | 21 | 22 | #endif /* _NGX_PARSE_TIME_H_INCLUDED_ */ 23 | -------------------------------------------------------------------------------- /src/core/ngx_proxy_protocol.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Roman Arutyunyan 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_PROXY_PROTOCOL_H_INCLUDED_ 9 | #define _NGX_PROXY_PROTOCOL_H_INCLUDED_ 10 | 11 | 12 | #include 13 | #include 14 | 15 | 16 | #define NGX_PROXY_PROTOCOL_MAX_HEADER 107 17 | 18 | 19 | u_char *ngx_proxy_protocol_read(ngx_connection_t *c, u_char *buf, 20 | u_char *last); 21 | u_char *ngx_proxy_protocol_write(ngx_connection_t *c, u_char *buf, 22 | u_char *last); 23 | 24 | 25 | #endif /* _NGX_PROXY_PROTOCOL_H_INCLUDED_ */ 26 | -------------------------------------------------------------------------------- /src/core/ngx_rwlock.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Ruslan Ermilov 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_RWLOCK_H_INCLUDED_ 9 | #define _NGX_RWLOCK_H_INCLUDED_ 10 | 11 | 12 | #include 13 | #include 14 | 15 | 16 | void ngx_rwlock_wlock(ngx_atomic_t *lock); 17 | void ngx_rwlock_rlock(ngx_atomic_t *lock); 18 | void ngx_rwlock_unlock(ngx_atomic_t *lock); 19 | 20 | 21 | #endif /* _NGX_RWLOCK_H_INCLUDED_ */ 22 | -------------------------------------------------------------------------------- /src/core/ngx_sha1.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Igor Sysoev 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_SHA1_H_INCLUDED_ 9 | #define _NGX_SHA1_H_INCLUDED_ 10 | 11 | 12 | #include 13 | #include 14 | 15 | 16 | #if (NGX_HAVE_OPENSSL_SHA1_H) 17 | #include 18 | #else 19 | #include 20 | #endif 21 | 22 | 23 | typedef SHA_CTX ngx_sha1_t; 24 | 25 | 26 | #define ngx_sha1_init SHA1_Init 27 | #define ngx_sha1_update SHA1_Update 28 | #define ngx_sha1_final SHA1_Final 29 | 30 | 31 | #endif /* _NGX_SHA1_H_INCLUDED_ */ 32 | -------------------------------------------------------------------------------- /src/core/ngx_syslog.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Nginx, Inc. 4 | */ 5 | 6 | 7 | #ifndef _NGX_SYSLOG_H_INCLUDED_ 8 | #define _NGX_SYSLOG_H_INCLUDED_ 9 | 10 | 11 | typedef struct { 12 | ngx_pool_t *pool; 13 | ngx_uint_t facility; 14 | ngx_uint_t severity; 15 | ngx_str_t tag; 16 | 17 | ngx_addr_t server; 18 | ngx_connection_t conn; 19 | unsigned busy:1; 20 | unsigned nohostname:1; 21 | } ngx_syslog_peer_t; 22 | 23 | 24 | char *ngx_syslog_process_conf(ngx_conf_t *cf, ngx_syslog_peer_t *peer); 25 | u_char *ngx_syslog_add_header(ngx_syslog_peer_t *peer, u_char *buf); 26 | void ngx_syslog_writer(ngx_log_t *log, ngx_uint_t level, u_char *buf, 27 | size_t len); 28 | ssize_t ngx_syslog_send(ngx_syslog_peer_t *peer, u_char *buf, size_t len); 29 | 30 | 31 | #endif /* _NGX_SYSLOG_H_INCLUDED_ */ 32 | -------------------------------------------------------------------------------- /src/core/ngx_thread_pool.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Nginx, Inc. 4 | * Copyright (C) Valentin V. Bartenev 5 | */ 6 | 7 | 8 | #ifndef _NGX_THREAD_POOL_H_INCLUDED_ 9 | #define _NGX_THREAD_POOL_H_INCLUDED_ 10 | 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | 17 | struct ngx_thread_task_s { 18 | ngx_thread_task_t *next; 19 | ngx_uint_t id; 20 | void *ctx; 21 | void (*handler)(void *data, ngx_log_t *log); 22 | ngx_event_t event; 23 | }; 24 | 25 | 26 | typedef struct ngx_thread_pool_s ngx_thread_pool_t; 27 | 28 | 29 | ngx_thread_pool_t *ngx_thread_pool_add(ngx_conf_t *cf, ngx_str_t *name); 30 | ngx_thread_pool_t *ngx_thread_pool_get(ngx_cycle_t *cycle, ngx_str_t *name); 31 | 32 | ngx_thread_task_t *ngx_thread_task_alloc(ngx_pool_t *pool, size_t size); 33 | ngx_int_t ngx_thread_task_post(ngx_thread_pool_t *tp, ngx_thread_task_t *task); 34 | 35 | 36 | #endif /* _NGX_THREAD_POOL_H_INCLUDED_ */ 37 | -------------------------------------------------------------------------------- /src/event/modules/ngx_iocp_module.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Igor Sysoev 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_IOCP_MODULE_H_INCLUDED_ 9 | #define _NGX_IOCP_MODULE_H_INCLUDED_ 10 | 11 | 12 | typedef struct { 13 | int threads; 14 | int post_acceptex; 15 | int acceptex_read; 16 | } ngx_iocp_conf_t; 17 | 18 | 19 | extern ngx_module_t ngx_iocp_module; 20 | 21 | 22 | #endif /* _NGX_IOCP_MODULE_H_INCLUDED_ */ 23 | -------------------------------------------------------------------------------- /src/event/ngx_event_posted.c: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Igor Sysoev 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | 13 | ngx_queue_t ngx_posted_accept_events; 14 | ngx_queue_t ngx_posted_events; 15 | 16 | 17 | void 18 | ngx_event_process_posted(ngx_cycle_t *cycle, ngx_queue_t *posted) 19 | { 20 | ngx_queue_t *q; 21 | ngx_event_t *ev; 22 | 23 | while (!ngx_queue_empty(posted)) { 24 | 25 | q = ngx_queue_head(posted); 26 | ev = ngx_queue_data(q, ngx_event_t, queue); 27 | 28 | ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, 29 | "posted event %p", ev); 30 | 31 | ngx_delete_posted_event(ev); 32 | 33 | ev->handler(ev); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/http/modules/perl/typemap: -------------------------------------------------------------------------------- 1 | TYPEMAP 2 | 3 | nginx T_PTROBJ 4 | -------------------------------------------------------------------------------- /src/mail/ngx_mail_imap_module.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Igor Sysoev 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_MAIL_IMAP_MODULE_H_INCLUDED_ 9 | #define _NGX_MAIL_IMAP_MODULE_H_INCLUDED_ 10 | 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | 17 | typedef struct { 18 | size_t client_buffer_size; 19 | 20 | ngx_str_t capability; 21 | ngx_str_t starttls_capability; 22 | ngx_str_t starttls_only_capability; 23 | 24 | ngx_uint_t auth_methods; 25 | 26 | ngx_array_t capabilities; 27 | } ngx_mail_imap_srv_conf_t; 28 | 29 | 30 | void ngx_mail_imap_init_session(ngx_mail_session_t *s, ngx_connection_t *c); 31 | void ngx_mail_imap_init_protocol(ngx_event_t *rev); 32 | void ngx_mail_imap_auth_state(ngx_event_t *rev); 33 | ngx_int_t ngx_mail_imap_parse_command(ngx_mail_session_t *s); 34 | 35 | 36 | extern ngx_module_t ngx_mail_imap_module; 37 | 38 | 39 | #endif /* _NGX_MAIL_IMAP_MODULE_H_INCLUDED_ */ 40 | -------------------------------------------------------------------------------- /src/mail/ngx_mail_pop3_module.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Igor Sysoev 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_MAIL_POP3_MODULE_H_INCLUDED_ 9 | #define _NGX_MAIL_POP3_MODULE_H_INCLUDED_ 10 | 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | 17 | typedef struct { 18 | ngx_str_t capability; 19 | ngx_str_t starttls_capability; 20 | ngx_str_t starttls_only_capability; 21 | ngx_str_t auth_capability; 22 | 23 | ngx_uint_t auth_methods; 24 | 25 | ngx_array_t capabilities; 26 | } ngx_mail_pop3_srv_conf_t; 27 | 28 | 29 | void ngx_mail_pop3_init_session(ngx_mail_session_t *s, ngx_connection_t *c); 30 | void ngx_mail_pop3_init_protocol(ngx_event_t *rev); 31 | void ngx_mail_pop3_auth_state(ngx_event_t *rev); 32 | ngx_int_t ngx_mail_pop3_parse_command(ngx_mail_session_t *s); 33 | 34 | 35 | extern ngx_module_t ngx_mail_pop3_module; 36 | 37 | 38 | #endif /* _NGX_MAIL_POP3_MODULE_H_INCLUDED_ */ 39 | -------------------------------------------------------------------------------- /src/misc/ngx_cpp_test_module.cpp: -------------------------------------------------------------------------------- 1 | 2 | // stub module to test header files' C++ compatibility 3 | 4 | extern "C" { 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | } 18 | 19 | // nginx header files should go before other, because they define 64-bit off_t 20 | // #include 21 | 22 | 23 | void ngx_cpp_test_handler(void *data); 24 | 25 | void 26 | ngx_cpp_test_handler(void *data) 27 | { 28 | return; 29 | } 30 | -------------------------------------------------------------------------------- /src/os/unix/ngx_channel.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Igor Sysoev 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_CHANNEL_H_INCLUDED_ 9 | #define _NGX_CHANNEL_H_INCLUDED_ 10 | 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | 17 | typedef struct { 18 | ngx_uint_t command; 19 | ngx_pid_t pid; 20 | ngx_int_t slot; 21 | ngx_fd_t fd; 22 | } ngx_channel_t; 23 | 24 | 25 | ngx_int_t ngx_write_channel(ngx_socket_t s, ngx_channel_t *ch, size_t size, 26 | ngx_log_t *log); 27 | ngx_int_t ngx_read_channel(ngx_socket_t s, ngx_channel_t *ch, size_t size, 28 | ngx_log_t *log); 29 | ngx_int_t ngx_add_channel_event(ngx_cycle_t *cycle, ngx_fd_t fd, 30 | ngx_int_t event, ngx_event_handler_pt handler); 31 | void ngx_close_channel(ngx_fd_t *fd, ngx_log_t *log); 32 | 33 | 34 | #endif /* _NGX_CHANNEL_H_INCLUDED_ */ 35 | -------------------------------------------------------------------------------- /src/os/unix/ngx_darwin.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Igor Sysoev 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_DARWIN_H_INCLUDED_ 9 | #define _NGX_DARWIN_H_INCLUDED_ 10 | 11 | 12 | void ngx_debug_init(void); 13 | ngx_chain_t *ngx_darwin_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, 14 | off_t limit); 15 | 16 | extern int ngx_darwin_kern_osreldate; 17 | extern int ngx_darwin_hw_ncpu; 18 | extern u_long ngx_darwin_net_inet_tcp_sendspace; 19 | 20 | extern ngx_uint_t ngx_debug_malloc; 21 | 22 | 23 | #endif /* _NGX_DARWIN_H_INCLUDED_ */ 24 | -------------------------------------------------------------------------------- /src/os/unix/ngx_dlopen.c: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Maxim Dounin 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #include 9 | #include 10 | 11 | 12 | #if (NGX_HAVE_DLOPEN) 13 | 14 | char * 15 | ngx_dlerror(void) 16 | { 17 | char *err; 18 | 19 | err = (char *) dlerror(); 20 | 21 | if (err == NULL) { 22 | return ""; 23 | } 24 | 25 | return err; 26 | } 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /src/os/unix/ngx_dlopen.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Maxim Dounin 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_DLOPEN_H_INCLUDED_ 9 | #define _NGX_DLOPEN_H_INCLUDED_ 10 | 11 | 12 | #include 13 | #include 14 | 15 | 16 | #define ngx_dlopen(path) dlopen((char *) path, RTLD_NOW | RTLD_GLOBAL) 17 | #define ngx_dlopen_n "dlopen()" 18 | 19 | #define ngx_dlsym(handle, symbol) dlsym(handle, symbol) 20 | #define ngx_dlsym_n "dlsym()" 21 | 22 | #define ngx_dlclose(handle) dlclose(handle) 23 | #define ngx_dlclose_n "dlclose()" 24 | 25 | 26 | #if (NGX_HAVE_DLOPEN) 27 | char *ngx_dlerror(void); 28 | #endif 29 | 30 | 31 | #endif /* _NGX_DLOPEN_H_INCLUDED_ */ 32 | -------------------------------------------------------------------------------- /src/os/unix/ngx_freebsd.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Igor Sysoev 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_FREEBSD_H_INCLUDED_ 9 | #define _NGX_FREEBSD_H_INCLUDED_ 10 | 11 | 12 | void ngx_debug_init(void); 13 | ngx_chain_t *ngx_freebsd_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, 14 | off_t limit); 15 | 16 | extern int ngx_freebsd_kern_osreldate; 17 | extern int ngx_freebsd_hw_ncpu; 18 | extern u_long ngx_freebsd_net_inet_tcp_sendspace; 19 | 20 | extern ngx_uint_t ngx_freebsd_sendfile_nbytes_bug; 21 | extern ngx_uint_t ngx_freebsd_use_tcp_nopush; 22 | extern ngx_uint_t ngx_debug_malloc; 23 | 24 | 25 | #endif /* _NGX_FREEBSD_H_INCLUDED_ */ 26 | -------------------------------------------------------------------------------- /src/os/unix/ngx_linux.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Igor Sysoev 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_LINUX_H_INCLUDED_ 9 | #define _NGX_LINUX_H_INCLUDED_ 10 | 11 | 12 | ngx_chain_t *ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, 13 | off_t limit); 14 | 15 | 16 | #endif /* _NGX_LINUX_H_INCLUDED_ */ 17 | -------------------------------------------------------------------------------- /src/os/unix/ngx_setaffinity.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Nginx, Inc. 4 | */ 5 | 6 | #ifndef _NGX_SETAFFINITY_H_INCLUDED_ 7 | #define _NGX_SETAFFINITY_H_INCLUDED_ 8 | 9 | 10 | #if (NGX_HAVE_SCHED_SETAFFINITY || NGX_HAVE_CPUSET_SETAFFINITY) 11 | 12 | #define NGX_HAVE_CPU_AFFINITY 1 13 | 14 | #if (NGX_HAVE_SCHED_SETAFFINITY) 15 | 16 | typedef cpu_set_t ngx_cpuset_t; 17 | 18 | #elif (NGX_HAVE_CPUSET_SETAFFINITY) 19 | 20 | #include 21 | 22 | typedef cpuset_t ngx_cpuset_t; 23 | 24 | #endif 25 | 26 | void ngx_setaffinity(ngx_cpuset_t *cpu_affinity, ngx_log_t *log); 27 | 28 | #else 29 | 30 | #define ngx_setaffinity(cpu_affinity, log) 31 | 32 | typedef uint64_t ngx_cpuset_t; 33 | 34 | #endif 35 | 36 | 37 | #endif /* _NGX_SETAFFINITY_H_INCLUDED_ */ 38 | -------------------------------------------------------------------------------- /src/os/unix/ngx_shmem.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Igor Sysoev 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_SHMEM_H_INCLUDED_ 9 | #define _NGX_SHMEM_H_INCLUDED_ 10 | 11 | 12 | #include 13 | #include 14 | 15 | 16 | typedef struct { 17 | u_char *addr; 18 | size_t size; 19 | ngx_str_t name; 20 | ngx_log_t *log; 21 | ngx_uint_t exists; /* unsigned exists:1; */ 22 | } ngx_shm_t; 23 | 24 | 25 | ngx_int_t ngx_shm_alloc(ngx_shm_t *shm); 26 | void ngx_shm_free(ngx_shm_t *shm); 27 | 28 | 29 | #endif /* _NGX_SHMEM_H_INCLUDED_ */ 30 | -------------------------------------------------------------------------------- /src/os/unix/ngx_solaris.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Igor Sysoev 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_SOLARIS_H_INCLUDED_ 9 | #define _NGX_SOLARIS_H_INCLUDED_ 10 | 11 | 12 | ngx_chain_t *ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in, 13 | off_t limit); 14 | 15 | 16 | #endif /* _NGX_SOLARIS_H_INCLUDED_ */ 17 | -------------------------------------------------------------------------------- /src/os/unix/ngx_sunpro_sparc64.il: -------------------------------------------------------------------------------- 1 | / 2 | / Copyright (C) Igor Sysoev 3 | / Copyright (C) Nginx, Inc. 4 | / 5 | 6 | 7 | / "casa [%o2] 0x80, %o1, %o0" and 8 | / "casxa [%o2] 0x80, %o1, %o0" do the following: 9 | / 10 | / if ([%o2] == %o1) { 11 | / swap(%o0, [%o2]); 12 | / } else { 13 | / %o0 = [%o2]; 14 | / } 15 | 16 | 17 | / ngx_atomic_uint_t ngx_casa(ngx_atomic_uint_t set, ngx_atomic_uint_t old, 18 | / ngx_atomic_t *lock); 19 | / 20 | / the arguments are passed in the %o0, %o1, %o2 21 | / the result is returned in the %o0 22 | 23 | .inline ngx_casa,0 24 | casa [%o2] 0x80, %o1, %o0 25 | .end 26 | 27 | 28 | / ngx_atomic_uint_t ngx_casxa(ngx_atomic_uint_t set, ngx_atomic_uint_t old, 29 | / ngx_atomic_t *lock); 30 | / 31 | / the arguments are passed in the %o0, %o1, %o2 32 | / the result is returned in the %o0 33 | 34 | .inline ngx_casxa,0 35 | casxa [%o2] 0x80, %o1, %o0 36 | .end 37 | -------------------------------------------------------------------------------- /src/os/unix/ngx_user.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) Igor Sysoev 4 | * Copyright (C) Nginx, Inc. 5 | */ 6 | 7 | 8 | #ifndef _NGX_USER_H_INCLUDED_ 9 | #define _NGX_USER_H_INCLUDED_ 10 | 11 | 12 | #include 13 | #include 14 | 15 | 16 | typedef uid_t ngx_uid_t; 17 | typedef gid_t ngx_gid_t; 18 | 19 | 20 | ngx_int_t ngx_libc_crypt(ngx_pool_t *pool, u_char *key, u_char *salt, 21 | u_char **encrypted); 22 | 23 | 24 | #endif /* _NGX_USER_H_INCLUDED_ */ 25 | -------------------------------------------------------------------------------- /test/3rd-party/certs/client.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICWwIBAAKBgQDL+ZLXFAR2BP6Jmpp/RTBoGAVUCsQcoxQYtcwR2egBdC4ymyU6 3 | 4xVX/N5olfYPaigaCCpse6kXxmseGJn4QlpjOfGkes2BS9exWRMS5DoDDiDJMDMz 4 | ZHJF5+OH3P0uen2s6rY6ScDNJJhrJ+U26V7yGDAIdFSMX+oT3pH5O8HEPwIDAQAB 5 | AoGAf656fKfLIxV9QCXHEGP/KSngK/uRR1vN+KnUVFhTIpXXVVZIt9PuSGXB0zYM 6 | ERoigCkcZUwDTR6nbu93cjAW42ZC+2d9c10fF2Jz6vXAEBOMgrC3jcrxLi5XklW/ 7 | 8cpiI5V+AUUW6RWQCBm5JcNQH02N6tKw/EQWr7/iACJm/gECQQD/gn3Qhkpcjem6 8 | ttO9LUSKW+mHVEnvKE3e4ktIyGPf/SoYFlr1gnKGon0wsMk/NULduqVi0PHsrrTk 9 | yR86DY5tAkEAzF3EjZFUuNufq95cDAXrH1jnQ91S4Lo8h/hyNj0hmmCsaPrJvlOh 10 | 0+tcVQzks2leXoUCnYWBwcpsaeYBhHSB2wJAaSXwVNIO5AvateXrORzZ6f5tGi4L 11 | xwnVEfYaeTdOMq1il0sL36DxNIrF7jWye/qVK95VlVbbWEWFV+mUmjVd+QJAT3+y 12 | dDeys26MAHmxaOPsgPc+j4HLOax425PkKgFBzyIIL5ZPYIB8FUobUuJ/HOPCWBZ5 13 | 2/kRbudloRReRr5jvQJASxaETYpCEPBkX1Di7SIgVISyUP+uiO8vq6d3YVcSMkSj 14 | snw1WVlJP4ul0alBp9l2AFS6DYxUB0JBGSGp/j2rkg== 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /test/3rd-party/certs/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXAIBAAKBgQDFU7/Lecon1SnRtckTqFEE4kTqw0D6sOs9u8htBeV4hMamdEOR 3 | gJgMJDVsXQ0MpZ91/KU8GHUHG7NdpeWvXekZRnoQVePTKJytFqSuhBFj7mDzB5ZS 4 | gV4BgqcmnNtPXNB0PPYn84O2OYG54zXMB9fqK8qfj7eNQxZovAqATco80wIDAQAB 5 | AoGBALqvwE3OXI6Q4m6wMJtza6tWMuN0dN54USbnqPhUUsRRwesrJd3brn4WJ6Ds 6 | 6/KiIxoqO11+ugFOmMSptoLSMzt0/UvF4L3aP9z+SOs7yryStGYKSZYx9K+Xah8U 7 | HupVda2qms1I4ykhjpqwlsGERuQtRXN7G9JJCN1DNl65w0TxAkEA/dpLXvbZQAyb 8 | 8aIV96E5K2UigG32fSBil5VqlWW1C4JdgHiuLLeUeOC5El9x0YBHWy+Ip2s+yWGE 9 | pnIOkTKZuwJBAMb/DSs6ROE8OdRYct2tW+SXq7iAvC/tqeaIam4V7ocYbQT7dIBN 10 | 0pEWJTkXthyX3tjweHtXT/h8ZRkA15HVi8kCQFrZ6IWpNOF+YcVd7By+/7XvMSTj 11 | tgbcM0zq9cVYLC5dTtdu2W85mJKWYsYXkKWZEnCpF3BLqqHqG85yHZKLmIcCQCl4 12 | mev6VsSB4qNoU3fzWwVGvpjS62UpqJDMuTF8DJvG8WFqbhsXHNzzuootcNyAogag 13 | BtvdlGL6ua7+R+6yjFECQA/7zjS7Svks0qxFhbBkYQfzRwLNVZ0szmp/ABFhfyV8 14 | h8B1J27ODheXgYlmPIm4C6avK97Rv03YEsMyhN/4pbs= 15 | -----END RSA PRIVATE KEY----- 16 | --------------------------------------------------------------------------------