Merge lp:~mitya57/ubuntu/saucy/nginx/1.4.1 into lp:ubuntu/saucy/nginx
- Saucy (13.10)
- 1.4.1
- Merge into saucy
Proposed by
Dmitry Shachnev
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Merge reported by: | Sebastien Bacher | ||||||||
Merged at revision: | not available | ||||||||
Proposed branch: | lp:~mitya57/ubuntu/saucy/nginx/1.4.1 | ||||||||
Merge into: | lp:ubuntu/saucy/nginx | ||||||||
Diff against target: |
81676 lines (+46519/-17655) 416 files modified
.pc/perl-use-dpkg-buildflags.patch/src/http/modules/perl/Makefile.PL (+7/-16) .pc/ubuntu-branding.patch/src/core/nginx.h (+2/-2) CHANGES (+274/-37) CHANGES.ru (+280/-36) LICENSE (+2/-2) auto/cc/msvc (+0/-3) auto/lib/geoip/conf (+17/-2) auto/lib/libgd/conf (+1/-1) auto/lib/md5/conf (+3/-3) auto/lib/pcre/conf (+1/-0) auto/lib/perl/conf (+3/-1) auto/lib/perl/make (+21/-17) auto/lib/sha1/conf (+1/-1) auto/lib/zlib/conf (+4/-1) auto/modules (+25/-4) auto/options (+7/-1) auto/sources (+15/-1) auto/unix (+14/-0) debian/changelog (+89/-0) debian/conf/naxsi-ui.conf (+16/-0) debian/conf/sites-available/default (+1/-1) debian/control (+10/-6) debian/copyright (+18/-44) debian/logrotate (+1/-1) debian/modules/README.Modules-versions (+16/-11) debian/modules/chunkin-nginx-module/NginxHttpChunkinModule.wiki (+0/-412) debian/modules/chunkin-nginx-module/README (+0/-542) debian/modules/chunkin-nginx-module/README.markdown (+0/-440) debian/modules/chunkin-nginx-module/config (+0/-5) debian/modules/chunkin-nginx-module/doc/HttpChunkinModule.wiki (+0/-400) debian/modules/chunkin-nginx-module/misc/Makefile (+0/-6) debian/modules/chunkin-nginx-module/misc/README (+0/-10) debian/modules/chunkin-nginx-module/misc/chunked.rl (+0/-114) debian/modules/chunkin-nginx-module/src/chunked_parser.c (+0/-1395) debian/modules/chunkin-nginx-module/src/chunked_parser.h (+0/-14) debian/modules/chunkin-nginx-module/src/chunked_parser.rl (+0/-350) debian/modules/chunkin-nginx-module/src/ddebug.h (+0/-73) debian/modules/chunkin-nginx-module/src/ngx_http_chunkin_filter_module.c (+0/-363) debian/modules/chunkin-nginx-module/src/ngx_http_chunkin_filter_module.h (+0/-53) debian/modules/chunkin-nginx-module/src/ngx_http_chunkin_request_body.c (+0/-728) debian/modules/chunkin-nginx-module/src/ngx_http_chunkin_request_body.h (+0/-10) debian/modules/chunkin-nginx-module/src/ngx_http_chunkin_util.c (+0/-550) debian/modules/chunkin-nginx-module/src/ngx_http_chunkin_util.h (+0/-26) debian/modules/chunkin-nginx-module/t/bug.t (+0/-600) debian/modules/chunkin-nginx-module/t/error.t (+0/-305) debian/modules/chunkin-nginx-module/t/ext.t (+0/-107) debian/modules/chunkin-nginx-module/t/lib/Test/Nginx/LWP/Chunkin.pm (+0/-14) debian/modules/chunkin-nginx-module/t/lib/Test/Nginx/Socket/Chunkin.pm (+0/-14) debian/modules/chunkin-nginx-module/t/max_chunks.t (+0/-61) debian/modules/chunkin-nginx-module/t/pipelined.t (+0/-73) debian/modules/chunkin-nginx-module/t/pressure.t (+0/-180) debian/modules/chunkin-nginx-module/t/random.t (+0/-90) debian/modules/chunkin-nginx-module/t/sanity.t (+0/-452) debian/modules/chunkin-nginx-module/t/timeout.t (+0/-52) debian/modules/chunkin-nginx-module/util/build.sh (+0/-24) debian/modules/chunkin-nginx-module/util/releng (+0/-6) debian/modules/chunkin-nginx-module/util/update-readme.sh (+0/-4) debian/modules/chunkin-nginx-module/util/wiki2pod.pl (+0/-131) debian/modules/chunkin-nginx-module/valgrind.suppress (+0/-135) debian/modules/naxsi/naxsi_config/naxsi_core.rules (+8/-2) debian/modules/naxsi/naxsi_src/naxsi.h (+44/-9) debian/modules/naxsi/naxsi_src/naxsi_config.c (+4/-64) debian/modules/naxsi/naxsi_src/naxsi_runtime.c (+357/-241) debian/modules/naxsi/naxsi_src/naxsi_skeleton.c (+551/-248) debian/modules/naxsi/naxsi_src/naxsi_utils.c (+86/-0) debian/modules/naxsi/t/00naxsi_base.t (+4/-4) debian/modules/naxsi/t/04naxsi_files.t (+12/-12) debian/modules/naxsi/t/10naxsi_modifiers.t (+393/-0) debian/modules/naxsi/t/11naxsi_newstyle_config.t (+2289/-0) debian/modules/naxsi/t/12naxsi_argnames_extended.t (+63/-0) debian/modules/nginx-cache-purge/CHANGES (+5/-0) debian/modules/nginx-cache-purge/README.md (+2/-2) debian/modules/nginx-cache-purge/ngx_cache_purge_module.c (+16/-17) debian/modules/nginx-cache-purge/t/proxy.t (+3/-3) debian/modules/nginx-cache-purge/t/proxy2.t (+89/-13) debian/modules/nginx-echo/README (+16/-35) debian/modules/nginx-echo/README.markdown (+12/-31) debian/modules/nginx-echo/doc/HttpEchoModule.wiki (+10/-28) debian/modules/nginx-echo/src/ngx_http_echo_filter.c (+18/-26) debian/modules/nginx-echo/src/ngx_http_echo_request_info.c (+123/-36) debian/modules/nginx-echo/t/echo-after-body.t (+38/-9) debian/modules/nginx-echo/t/echo-timer.t (+1/-1) debian/modules/nginx-echo/t/mixed.t (+6/-6) debian/modules/nginx-echo/t/request-info.t (+341/-9) debian/modules/nginx-echo/util/build.sh (+1/-1) debian/modules/nginx-echo/valgrind.suppress (+2/-300) debian/modules/nginx-lua/README (+586/-250) debian/modules/nginx-lua/README.markdown (+539/-208) debian/modules/nginx-lua/config (+39/-2) debian/modules/nginx-lua/doc/HttpLuaModule.wiki (+521/-198) debian/modules/nginx-lua/src/api/ngx_http_lua_api.h (+10/-3) debian/modules/nginx-lua/src/ddebug.h (+14/-6) debian/modules/nginx-lua/src/ngx_http_lua_accessby.c (+24/-9) debian/modules/nginx-lua/src/ngx_http_lua_accessby.h (+11/-5) debian/modules/nginx-lua/src/ngx_http_lua_api.c (+6/-1) debian/modules/nginx-lua/src/ngx_http_lua_args.c (+23/-8) debian/modules/nginx-lua/src/ngx_http_lua_bodyfilterby.c (+75/-19) debian/modules/nginx-lua/src/ngx_http_lua_bodyfilterby.h (+17/-17) debian/modules/nginx-lua/src/ngx_http_lua_cache.c (+23/-19) debian/modules/nginx-lua/src/ngx_http_lua_cache.h (+18/-11) debian/modules/nginx-lua/src/ngx_http_lua_capturefilter.c (+19/-3) debian/modules/nginx-lua/src/ngx_http_lua_capturefilter.h (+11/-4) debian/modules/nginx-lua/src/ngx_http_lua_clfactory.c (+10/-1) debian/modules/nginx-lua/src/ngx_http_lua_clfactory.h (+16/-8) debian/modules/nginx-lua/src/ngx_http_lua_common.h (+58/-30) debian/modules/nginx-lua/src/ngx_http_lua_consts.c (+9/-1) debian/modules/nginx-lua/src/ngx_http_lua_contentby.c (+28/-13) debian/modules/nginx-lua/src/ngx_http_lua_contentby.h (+17/-8) debian/modules/nginx-lua/src/ngx_http_lua_control.c (+19/-7) debian/modules/nginx-lua/src/ngx_http_lua_control.h (+11/-3) debian/modules/nginx-lua/src/ngx_http_lua_coroutine.c (+16/-4) debian/modules/nginx-lua/src/ngx_http_lua_coroutine.h (+11/-5) debian/modules/nginx-lua/src/ngx_http_lua_ctx.c (+14/-4) debian/modules/nginx-lua/src/ngx_http_lua_ctx.h (+15/-7) debian/modules/nginx-lua/src/ngx_http_lua_directive.c (+20/-13) debian/modules/nginx-lua/src/ngx_http_lua_directive.h (+28/-33) debian/modules/nginx-lua/src/ngx_http_lua_exception.c (+8/-1) debian/modules/nginx-lua/src/ngx_http_lua_exception.h (+19/-7) debian/modules/nginx-lua/src/ngx_http_lua_headerfilterby.c (+15/-6) debian/modules/nginx-lua/src/ngx_http_lua_headerfilterby.h (+10/-5) debian/modules/nginx-lua/src/ngx_http_lua_headers.c (+324/-31) debian/modules/nginx-lua/src/ngx_http_lua_headers.h (+11/-3) debian/modules/nginx-lua/src/ngx_http_lua_headers_in.c (+34/-31) debian/modules/nginx-lua/src/ngx_http_lua_headers_in.h (+15/-9) debian/modules/nginx-lua/src/ngx_http_lua_headers_out.c (+42/-30) debian/modules/nginx-lua/src/ngx_http_lua_headers_out.h (+18/-13) debian/modules/nginx-lua/src/ngx_http_lua_initby.c (+12/-6) debian/modules/nginx-lua/src/ngx_http_lua_initby.h (+10/-3) debian/modules/nginx-lua/src/ngx_http_lua_log.c (+13/-6) debian/modules/nginx-lua/src/ngx_http_lua_log.h (+11/-3) debian/modules/nginx-lua/src/ngx_http_lua_logby.c (+16/-6) debian/modules/nginx-lua/src/ngx_http_lua_logby.h (+10/-6) debian/modules/nginx-lua/src/ngx_http_lua_misc.c (+24/-6) debian/modules/nginx-lua/src/ngx_http_lua_misc.h (+11/-3) debian/modules/nginx-lua/src/ngx_http_lua_module.c (+37/-4) debian/modules/nginx-lua/src/ngx_http_lua_ndk.c (+12/-11) debian/modules/nginx-lua/src/ngx_http_lua_ndk.h (+10/-3) debian/modules/nginx-lua/src/ngx_http_lua_output.c (+5/-2) debian/modules/nginx-lua/src/ngx_http_lua_output.h (+11/-3) debian/modules/nginx-lua/src/ngx_http_lua_pcrefix.c (+9/-2) debian/modules/nginx-lua/src/ngx_http_lua_pcrefix.h (+11/-4) debian/modules/nginx-lua/src/ngx_http_lua_phase.c (+11/-0) debian/modules/nginx-lua/src/ngx_http_lua_phase.h (+5/-3) debian/modules/nginx-lua/src/ngx_http_lua_probe.h (+3/-3) debian/modules/nginx-lua/src/ngx_http_lua_regex.c (+349/-149) debian/modules/nginx-lua/src/ngx_http_lua_regex.h (+10/-3) debian/modules/nginx-lua/src/ngx_http_lua_req_body.c (+118/-91) debian/modules/nginx-lua/src/ngx_http_lua_req_body.h (+11/-3) debian/modules/nginx-lua/src/ngx_http_lua_req_method.c (+12/-0) debian/modules/nginx-lua/src/ngx_http_lua_req_method.h (+10/-3) debian/modules/nginx-lua/src/ngx_http_lua_rewriteby.c (+24/-10) debian/modules/nginx-lua/src/ngx_http_lua_rewriteby.h (+11/-5) debian/modules/nginx-lua/src/ngx_http_lua_script.c (+49/-44) debian/modules/nginx-lua/src/ngx_http_lua_script.h (+11/-5) debian/modules/nginx-lua/src/ngx_http_lua_setby.c (+11/-4) debian/modules/nginx-lua/src/ngx_http_lua_setby.h (+6/-7) debian/modules/nginx-lua/src/ngx_http_lua_shdict.c (+70/-38) debian/modules/nginx-lua/src/ngx_http_lua_shdict.h (+14/-9) debian/modules/nginx-lua/src/ngx_http_lua_sleep.c (+12/-9) debian/modules/nginx-lua/src/ngx_http_lua_sleep.h (+12/-3) debian/modules/nginx-lua/src/ngx_http_lua_socket_tcp.c (+84/-31) debian/modules/nginx-lua/src/ngx_http_lua_socket_tcp.h (+10/-4) debian/modules/nginx-lua/src/ngx_http_lua_socket_udp.c (+74/-9) debian/modules/nginx-lua/src/ngx_http_lua_socket_udp.h (+11/-4) debian/modules/nginx-lua/src/ngx_http_lua_string.c (+17/-9) debian/modules/nginx-lua/src/ngx_http_lua_string.h (+11/-3) debian/modules/nginx-lua/src/ngx_http_lua_subrequest.c (+157/-53) debian/modules/nginx-lua/src/ngx_http_lua_subrequest.h (+12/-4) debian/modules/nginx-lua/src/ngx_http_lua_time.c (+16/-8) debian/modules/nginx-lua/src/ngx_http_lua_time.h (+12/-3) debian/modules/nginx-lua/src/ngx_http_lua_timer.c (+653/-0) debian/modules/nginx-lua/src/ngx_http_lua_timer.h (+20/-0) debian/modules/nginx-lua/src/ngx_http_lua_uri.c (+22/-11) debian/modules/nginx-lua/src/ngx_http_lua_uri.h (+11/-3) debian/modules/nginx-lua/src/ngx_http_lua_uthread.c (+9/-1) debian/modules/nginx-lua/src/ngx_http_lua_uthread.h (+10/-3) debian/modules/nginx-lua/src/ngx_http_lua_util.c (+288/-66) debian/modules/nginx-lua/src/ngx_http_lua_util.h (+34/-6) debian/modules/nginx-lua/src/ngx_http_lua_variable.c (+25/-19) debian/modules/nginx-lua/src/ngx_http_lua_variable.h (+11/-3) debian/modules/nginx-lua/t/000--init.t (+10/-1) debian/modules/nginx-lua/t/001-set.t (+2/-2) debian/modules/nginx-lua/t/005-exit.t (+2/-2) debian/modules/nginx-lua/t/010-request_body.t (+25/-2) debian/modules/nginx-lua/t/014-bugs.t (+91/-1) debian/modules/nginx-lua/t/015-status.t (+46/-1) debian/modules/nginx-lua/t/016-resp-header.t (+35/-4) debian/modules/nginx-lua/t/018-ndk.t (+27/-3) debian/modules/nginx-lua/t/020-subrequest.t (+589/-19) debian/modules/nginx-lua/t/022-redirect.t (+9/-9) debian/modules/nginx-lua/t/023-rewrite/client-abort.t (+3/-2) debian/modules/nginx-lua/t/023-rewrite/on-abort.t (+2/-1) debian/modules/nginx-lua/t/023-rewrite/req-body.t (+23/-1) debian/modules/nginx-lua/t/023-rewrite/request_body.t (+27/-3) debian/modules/nginx-lua/t/023-rewrite/tcp-socket-timeout.t (+5/-5) debian/modules/nginx-lua/t/023-rewrite/tcp-socket.t (+5/-5) debian/modules/nginx-lua/t/023-rewrite/uthread-exit.t (+49/-19) debian/modules/nginx-lua/t/023-rewrite/uthread-spawn.t (+1/-0) debian/modules/nginx-lua/t/024-access/client-abort.t (+3/-2) debian/modules/nginx-lua/t/024-access/on-abort.t (+1/-1) debian/modules/nginx-lua/t/024-access/req-body.t (+23/-1) debian/modules/nginx-lua/t/024-access/request_body.t (+27/-3) debian/modules/nginx-lua/t/024-access/uthread-exec.t (+1/-0) debian/modules/nginx-lua/t/024-access/uthread-exit.t (+31/-19) debian/modules/nginx-lua/t/024-access/uthread-spawn.t (+1/-0) debian/modules/nginx-lua/t/028-req-header.t (+37/-10) debian/modules/nginx-lua/t/030-uri-args.t (+235/-8) debian/modules/nginx-lua/t/034-match.t (+233/-14) debian/modules/nginx-lua/t/035-gmatch.t (+231/-1) debian/modules/nginx-lua/t/036-sub.t (+184/-43) debian/modules/nginx-lua/t/037-gsub.t (+68/-1) debian/modules/nginx-lua/t/038-match-o.t (+114/-8) debian/modules/nginx-lua/t/039-sub-o.t (+102/-46) debian/modules/nginx-lua/t/040-gsub-o.t (+21/-0) debian/modules/nginx-lua/t/043-shdict.t (+80/-1) debian/modules/nginx-lua/t/044-req-body.t (+144/-62) debian/modules/nginx-lua/t/045-ngx-var.t (+15/-0) debian/modules/nginx-lua/t/047-match-jit.t (+12/-8) debian/modules/nginx-lua/t/049-gmatch-jit.t (+6/-4) debian/modules/nginx-lua/t/050-gmatch-dfa.t (+6/-4) debian/modules/nginx-lua/t/051-sub-jit.t (+13/-9) debian/modules/nginx-lua/t/052-sub-dfa.t (+21/-7) debian/modules/nginx-lua/t/053-gsub-jit.t (+13/-9) debian/modules/nginx-lua/t/054-gsub-dfa.t (+18/-7) debian/modules/nginx-lua/t/058-tcp-socket.t (+111/-7) debian/modules/nginx-lua/t/062-count.t (+28/-8) debian/modules/nginx-lua/t/065-tcp-socket-timeout.t (+5/-5) debian/modules/nginx-lua/t/066-socket-receiveuntil.t (+3/-1) debian/modules/nginx-lua/t/067-req-socket.t (+180/-1) debian/modules/nginx-lua/t/077-sleep.t (+25/-1) debian/modules/nginx-lua/t/078-hup-vars.t (+1/-0) debian/modules/nginx-lua/t/079-unused-directives.t (+41/-40) debian/modules/nginx-lua/t/080-hup-shdict.t (+1/-0) debian/modules/nginx-lua/t/082-body-filter.t (+24/-0) debian/modules/nginx-lua/t/083-bad-sock-self.t (+4/-2) debian/modules/nginx-lua/t/087-udp-socket.t (+155/-3) debian/modules/nginx-lua/t/089-phase.t (+24/-1) debian/modules/nginx-lua/t/091-coroutine.t (+60/-3) debian/modules/nginx-lua/t/093-uthread-spawn.t (+1/-0) debian/modules/nginx-lua/t/094-uthread-exit.t (+33/-19) debian/modules/nginx-lua/t/096-uthread-redirect.t (+1/-0) debian/modules/nginx-lua/t/100-client-abort.t (+3/-2) debian/modules/nginx-lua/t/101-on-abort.t (+1/-0) debian/modules/nginx-lua/t/103-req-http-ver.t (+50/-0) debian/modules/nginx-lua/t/104-req-raw-header.t (+597/-0) debian/modules/nginx-lua/t/105-pressure.t (+55/-0) debian/modules/nginx-lua/t/106-timer.t (+2108/-0) debian/modules/nginx-lua/t/107-timer-errors.t (+1424/-0) debian/modules/nginx-lua/t/108-timer-safe.t (+1399/-0) debian/modules/nginx-lua/t/109-timer-hup.t (+216/-0) debian/modules/nginx-lua/t/110-etag.t (+85/-0) debian/modules/nginx-lua/t/StapThread.pm (+2/-0) debian/modules/nginx-lua/valgrind.suppress (+6/-346) debian/modules/nginx-upload-module/Changelog (+0/-91) debian/modules/nginx-upload-module/LICENCE (+0/-24) debian/modules/nginx-upload-module/LICENCE.ru (+0/-32) debian/modules/nginx-upload-module/README (+0/-11) debian/modules/nginx-upload-module/config (+0/-5) debian/modules/nginx-upload-module/example.php (+0/-47) debian/modules/nginx-upload-module/nginx.conf (+0/-49) debian/modules/nginx-upload-module/ngx_http_upload_module.c (+0/-3675) debian/modules/nginx-upload-module/upload.html (+0/-18) debian/modules/ngx-fancyindex/HACKING.rst (+33/-0) debian/modules/ngx-fancyindex/LICENSE (+20/-0) debian/modules/ngx-fancyindex/README.rst (+151/-0) debian/modules/ngx-fancyindex/config (+8/-0) debian/modules/ngx-fancyindex/nginx-0.6-support.patch (+23/-0) debian/modules/ngx-fancyindex/ngx_http_fancyindex_module.c (+1073/-0) debian/modules/ngx-fancyindex/template.awk (+52/-0) debian/modules/ngx-fancyindex/template.h (+98/-0) debian/modules/ngx-fancyindex/template.html (+99/-0) debian/modules/ngx_http_substitutions_filter_module/CHANGES (+32/-0) debian/modules/ngx_http_substitutions_filter_module/README (+123/-0) debian/modules/ngx_http_substitutions_filter_module/config (+3/-0) debian/modules/ngx_http_substitutions_filter_module/doc/README.google_code_home_page.wiki (+101/-0) debian/modules/ngx_http_substitutions_filter_module/doc/README.html (+169/-0) debian/modules/ngx_http_substitutions_filter_module/doc/README.wiki (+104/-0) debian/modules/ngx_http_substitutions_filter_module/ngx_http_subs_filter_module.c (+1267/-0) debian/modules/ngx_http_substitutions_filter_module/test/README (+275/-0) debian/modules/ngx_http_substitutions_filter_module/test/inc/Module/AutoInstall.pm (+820/-0) debian/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install.pm (+470/-0) debian/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/AutoInstall.pm (+82/-0) debian/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/Base.pm (+83/-0) debian/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/Can.pm (+81/-0) debian/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/Fetch.pm (+93/-0) debian/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/Include.pm (+34/-0) debian/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/Makefile.pm (+415/-0) debian/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/Metadata.pm (+716/-0) debian/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/TestBase.pm (+29/-0) debian/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/Win32.pm (+64/-0) debian/modules/ngx_http_substitutions_filter_module/test/inc/Module/Install/WriteAll.pm (+63/-0) debian/modules/ngx_http_substitutions_filter_module/test/inc/Spiffy.pm (+539/-0) debian/modules/ngx_http_substitutions_filter_module/test/inc/Test/Base.pm (+682/-0) debian/modules/ngx_http_substitutions_filter_module/test/inc/Test/Base/Filter.pm (+341/-0) debian/modules/ngx_http_substitutions_filter_module/test/inc/Test/Builder.pm (+1413/-0) debian/modules/ngx_http_substitutions_filter_module/test/inc/Test/Builder/Module.pm (+81/-0) debian/modules/ngx_http_substitutions_filter_module/test/inc/Test/More.pm (+735/-0) debian/modules/ngx_http_substitutions_filter_module/test/lib/Test/Nginx.pm (+315/-0) debian/modules/ngx_http_substitutions_filter_module/test/lib/Test/Nginx/LWP.pm (+524/-0) debian/modules/ngx_http_substitutions_filter_module/test/lib/Test/Nginx/Socket.pm (+1749/-0) debian/modules/ngx_http_substitutions_filter_module/test/lib/Test/Nginx/Util.pm (+874/-0) debian/modules/ngx_http_substitutions_filter_module/test/t/subs.t (+158/-0) debian/modules/ngx_http_substitutions_filter_module/test/t/subs_capture.t (+33/-0) debian/modules/ngx_http_substitutions_filter_module/test/t/subs_fix_string.t (+33/-0) debian/modules/ngx_http_substitutions_filter_module/test/t/subs_regex.t (+33/-0) debian/modules/ngx_http_substitutions_filter_module/test/t/subs_types.t (+59/-0) debian/modules/ngx_http_substitutions_filter_module/test/test.sh (+5/-0) debian/modules/ngx_http_substitutions_filter_module/util/update-readme.sh (+7/-0) debian/modules/ngx_http_substitutions_filter_module/util/wiki2google_code_homepage.pl (+29/-0) debian/modules/ngx_http_substitutions_filter_module/util/wiki2pod.pl (+129/-0) debian/nginx-naxsi-ui.config (+0/-23) debian/nginx-naxsi-ui.postinst (+0/-33) debian/nginx-naxsi-ui.postrm (+0/-33) debian/nginx-naxsi-ui.prerm (+0/-9) debian/nginx-naxsi-ui.templates (+0/-15) debian/patches/perl-use-dpkg-buildflags.patch (+1/-1) debian/patches/ubuntu-branding.patch (+7/-6) debian/rules (+10/-11) man/nginx.8 (+2/-2) src/core/nginx.c (+8/-2) src/core/nginx.h (+2/-2) src/core/ngx_array.c (+1/-7) src/core/ngx_array.h (+2/-2) src/core/ngx_conf_file.c (+5/-20) src/core/ngx_conf_file.h (+1/-10) src/core/ngx_connection.c (+15/-9) src/core/ngx_connection.h (+1/-2) src/core/ngx_core.h (+1/-2) src/core/ngx_crypt.c (+37/-0) src/core/ngx_cycle.c (+3/-20) src/core/ngx_cycle.h (+1/-1) src/core/ngx_file.c (+4/-4) src/core/ngx_inet.c (+228/-57) src/core/ngx_inet.h (+2/-2) src/core/ngx_radix_tree.c (+202/-5) src/core/ngx_radix_tree.h (+9/-0) src/event/modules/ngx_devpoll_module.c (+7/-1) src/event/modules/ngx_eventport_module.c (+1/-1) src/event/modules/ngx_poll_module.c (+2/-2) src/event/ngx_event.c (+9/-1) src/event/ngx_event.h (+1/-0) src/event/ngx_event_connect.c (+1/-1) src/event/ngx_event_openssl.c (+184/-24) src/event/ngx_event_openssl.h (+9/-0) src/event/ngx_event_openssl_stapling.c (+1749/-0) src/http/modules/ngx_http_addition_filter_module.c (+1/-0) src/http/modules/ngx_http_auth_basic_module.c (+38/-49) src/http/modules/ngx_http_autoindex_module.c (+5/-2) src/http/modules/ngx_http_chunked_filter_module.c (+1/-0) src/http/modules/ngx_http_fastcgi_module.c (+52/-62) src/http/modules/ngx_http_flv_module.c (+4/-0) src/http/modules/ngx_http_geo_module.c (+378/-172) src/http/modules/ngx_http_geoip_module.c (+152/-24) src/http/modules/ngx_http_gunzip_filter_module.c (+677/-0) src/http/modules/ngx_http_gzip_filter_module.c (+8/-1) src/http/modules/ngx_http_gzip_static_module.c (+36/-10) src/http/modules/ngx_http_headers_filter_module.c (+33/-14) src/http/modules/ngx_http_image_filter_module.c (+47/-20) src/http/modules/ngx_http_index_module.c (+5/-5) src/http/modules/ngx_http_limit_conn_module.c (+18/-2) src/http/modules/ngx_http_limit_req_module.c (+19/-2) src/http/modules/ngx_http_log_module.c (+398/-60) src/http/modules/ngx_http_map_module.c (+8/-1) src/http/modules/ngx_http_memcached_module.c (+60/-8) src/http/modules/ngx_http_mp4_module.c (+11/-8) src/http/modules/ngx_http_not_modified_filter_module.c (+134/-37) src/http/modules/ngx_http_proxy_module.c (+68/-308) src/http/modules/ngx_http_range_filter_module.c (+35/-7) src/http/modules/ngx_http_realip_module.c (+13/-12) src/http/modules/ngx_http_scgi_module.c (+33/-14) src/http/modules/ngx_http_secure_link_module.c (+15/-2) src/http/modules/ngx_http_split_clients_module.c (+2/-2) src/http/modules/ngx_http_ssi_filter_module.c (+1/-0) src/http/modules/ngx_http_ssl_module.c (+156/-6) src/http/modules/ngx_http_ssl_module.h (+6/-0) src/http/modules/ngx_http_static_module.c (+4/-0) src/http/modules/ngx_http_stub_status_module.c (+90/-3) src/http/modules/ngx_http_sub_filter_module.c (+3/-2) src/http/modules/ngx_http_upstream_ip_hash_module.c (+5/-0) src/http/modules/ngx_http_upstream_keepalive_module.c (+5/-11) src/http/modules/ngx_http_upstream_least_conn_module.c (+8/-5) src/http/modules/ngx_http_uwsgi_module.c (+15/-2) src/http/modules/ngx_http_xslt_filter_module.c (+3/-2) src/http/modules/perl/Makefile.PL (+7/-16) src/http/modules/perl/nginx.pm (+2/-2) src/http/modules/perl/nginx.xs (+36/-3) src/http/ngx_http.c (+24/-1) src/http/ngx_http.h (+28/-5) src/http/ngx_http_core_module.c (+138/-11) src/http/ngx_http_core_module.h (+38/-14) src/http/ngx_http_file_cache.c (+0/-2) src/http/ngx_http_header_filter_module.c (+9/-2) src/http/ngx_http_parse.c (+408/-0) src/http/ngx_http_request.c (+897/-573) src/http/ngx_http_request.h (+37/-25) src/http/ngx_http_request_body.c (+609/-180) src/http/ngx_http_script.c (+3/-7) src/http/ngx_http_spdy.c (+2882/-0) src/http/ngx_http_spdy.h (+235/-0) src/http/ngx_http_spdy_filter_module.c (+999/-0) src/http/ngx_http_spdy_module.c (+351/-0) src/http/ngx_http_spdy_module.h (+36/-0) src/http/ngx_http_special_response.c (+3/-1) src/http/ngx_http_upstream.c (+445/-38) src/http/ngx_http_upstream.h (+11/-1) src/http/ngx_http_upstream_round_robin.c (+5/-50) src/http/ngx_http_upstream_round_robin.h (+0/-2) src/http/ngx_http_variables.c (+186/-12) src/http/ngx_http_variables.h (+0/-3) src/http/ngx_http_write_filter_module.c (+1/-1) src/mail/ngx_mail.h (+2/-2) src/mail/ngx_mail_auth_http_module.c (+37/-27) src/mail/ngx_mail_core_module.c (+5/-1) src/os/unix/ngx_files.c (+1/-1) src/os/unix/ngx_process_cycle.c (+1/-1) src/os/unix/ngx_user.c (+13/-14) |
||||||||
To merge this branch: | bzr merge lp:~mitya57/ubuntu/saucy/nginx/1.4.1 | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu branches | Pending | ||
Review via email: mp+163095@code.launchpad.net |
Commit message
Description of the change
As the changelog reads:
* Merge with Debian unstable (LP: #1177919). Remaining changes:
- debian/
+ Modify default site configuration file to correct a typo
that prevented out-of-the-box usability (LP: #1162177).
- debian/
+ Add ubuntu branding to server_tokens.
* Refresh debian/
To post a comment you must log in.
- 65. By Dmitry Shachnev
-
Refresh debian/
patches/ perl-use- dpkg-buildflags .patch
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.pc/perl-use-dpkg-buildflags.patch/src/http/modules/perl/Makefile.PL' |
2 | --- .pc/perl-use-dpkg-buildflags.patch/src/http/modules/perl/Makefile.PL 2012-03-18 09:31:19 +0000 |
3 | +++ .pc/perl-use-dpkg-buildflags.patch/src/http/modules/perl/Makefile.PL 2013-05-11 11:28:27 +0000 |
4 | @@ -16,24 +16,15 @@ |
5 | CCFLAGS => "$ENV{NGX_PM_CFLAGS}", |
6 | OPTIMIZE => '-O', |
7 | |
8 | - INC => "-I ../../../../../src/core " . |
9 | - "-I ../../../../../src/event " . |
10 | - "-I ../../../../../src/os/unix " . |
11 | - "-I ../../../../../src/http " . |
12 | - "-I ../../../../../src/http/modules " . |
13 | - "-I ../../../../../src/http/modules/perl " . |
14 | - "-I ../../../../../$ENV{NGX_OBJS} " . |
15 | - ($ENV{NGX_PCRE} =~ /^(YES|NO)/ ? "" : |
16 | - ($ENV{NGX_PCRE} =~ m#^/# ? "-I $ENV{NGX_PCRE} " : |
17 | - "-I ../../../../../$ENV{NGX_PCRE} ")) . |
18 | - ($ENV{NGX_OPENSSL} =~ /^(YES|NO)/ ? "" : |
19 | - ($ENV{NGX_OPENSSL} =~ m#^/# ? |
20 | - "-I $ENV{NGX_OPENSSL}/.openssl/include " : |
21 | - "-I ../../../../../$ENV{NGX_OPENSSL}/.openssl/include ")), |
22 | + INC => join(" ", map { |
23 | + m#^/# ? "-I $_" : "-I ../../../../../$_" |
24 | + } (split /\s+/, $ENV{NGX_INCS})), |
25 | |
26 | depend => { |
27 | - 'nginx.c' => |
28 | - "../../../../../src/http/modules/perl/ngx_http_perl_module.h" |
29 | + 'nginx.c' => join(" ", map { |
30 | + m#^/# ? $_ : "../../../../../$_" |
31 | + } (split(/\s+/, $ENV{NGX_DEPS}), |
32 | + "src/http/modules/perl/ngx_http_perl_module.h")) |
33 | }, |
34 | |
35 | PM => { |
36 | |
37 | === modified file '.pc/ubuntu-branding.patch/src/core/nginx.h' |
38 | --- .pc/ubuntu-branding.patch/src/core/nginx.h 2013-04-09 10:23:26 +0000 |
39 | +++ .pc/ubuntu-branding.patch/src/core/nginx.h 2013-05-11 11:28:27 +0000 |
40 | @@ -9,8 +9,8 @@ |
41 | #define _NGINX_H_INCLUDED_ |
42 | |
43 | |
44 | -#define nginx_version 1002006 |
45 | -#define NGINX_VERSION "1.2.6" |
46 | +#define nginx_version 1004001 |
47 | +#define NGINX_VERSION "1.4.1" |
48 | #define NGINX_VER "nginx/" NGINX_VERSION |
49 | |
50 | #define NGINX_VAR "NGINX" |
51 | |
52 | === modified file 'CHANGES' |
53 | --- CHANGES 2012-12-18 10:29:18 +0000 |
54 | +++ CHANGES 2013-05-11 11:28:27 +0000 |
55 | @@ -1,5 +1,204 @@ |
56 | |
57 | -Changes with nginx 1.2.6 11 Dec 2012 |
58 | +Changes with nginx 1.4.1 07 May 2013 |
59 | + |
60 | + *) Security: a stack-based buffer overflow might occur in a worker |
61 | + process while handling a specially crafted request, potentially |
62 | + resulting in arbitrary code execution (CVE-2013-2028); the bug had |
63 | + appeared in 1.3.9. |
64 | + Thanks to Greg MacManus, iSIGHT Partners Labs. |
65 | + |
66 | + |
67 | +Changes with nginx 1.4.0 24 Apr 2013 |
68 | + |
69 | + *) Bugfix: nginx could not be built with the ngx_http_perl_module if the |
70 | + --with-openssl option was used; the bug had appeared in 1.3.16. |
71 | + |
72 | + *) Bugfix: in a request body handling in the ngx_http_perl_module; the |
73 | + bug had appeared in 1.3.9. |
74 | + |
75 | + |
76 | +Changes with nginx 1.3.16 16 Apr 2013 |
77 | + |
78 | + *) Bugfix: a segmentation fault might occur in a worker process if |
79 | + subrequests were used; the bug had appeared in 1.3.9. |
80 | + |
81 | + *) Bugfix: the "tcp_nodelay" directive caused an error if a WebSocket |
82 | + connection was proxied into a unix domain socket. |
83 | + |
84 | + *) Bugfix: the $upstream_response_length variable has an incorrect value |
85 | + "0" if buffering was not used. |
86 | + Thanks to Piotr Sikora. |
87 | + |
88 | + *) Bugfix: in the eventport and /dev/poll methods. |
89 | + |
90 | + |
91 | +Changes with nginx 1.3.15 26 Mar 2013 |
92 | + |
93 | + *) Change: opening and closing a connection without sending any data in |
94 | + it is no longer logged to access_log with error code 400. |
95 | + |
96 | + *) Feature: the ngx_http_spdy_module. |
97 | + Thanks to Automattic for sponsoring this work. |
98 | + |
99 | + *) Feature: the "limit_req_status" and "limit_conn_status" directives. |
100 | + Thanks to Nick Marden. |
101 | + |
102 | + *) Feature: the "image_filter_interlace" directive. |
103 | + Thanks to Ian Babrou. |
104 | + |
105 | + *) Feature: $connections_waiting variable in the |
106 | + ngx_http_stub_status_module. |
107 | + |
108 | + *) Feature: the mail proxy module now supports IPv6 backends. |
109 | + |
110 | + *) Bugfix: request body might be transmitted incorrectly when retrying a |
111 | + request to the next upstream server; the bug had appeared in 1.3.9. |
112 | + Thanks to Piotr Sikora. |
113 | + |
114 | + *) Bugfix: in the "client_body_in_file_only" directive; the bug had |
115 | + appeared in 1.3.9. |
116 | + |
117 | + *) Bugfix: responses might hang if subrequests were used and a DNS error |
118 | + happened during subrequest processing. |
119 | + Thanks to Lanshun Zhou. |
120 | + |
121 | + *) Bugfix: in backend usage accounting. |
122 | + |
123 | + |
124 | +Changes with nginx 1.3.14 05 Mar 2013 |
125 | + |
126 | + *) Feature: $connections_active, $connections_reading, and |
127 | + $connections_writing variables in the ngx_http_stub_status_module. |
128 | + |
129 | + *) Feature: support of WebSocket connections in the |
130 | + ngx_http_uwsgi_module and ngx_http_scgi_module. |
131 | + |
132 | + *) Bugfix: in virtual servers handling with SNI. |
133 | + |
134 | + *) Bugfix: new sessions were not always stored if the "ssl_session_cache |
135 | + shared" directive was used and there was no free space in shared |
136 | + memory. |
137 | + Thanks to Piotr Sikora. |
138 | + |
139 | + *) Bugfix: multiple X-Forwarded-For headers were handled incorrectly. |
140 | + Thanks to Neal Poole for sponsoring this work. |
141 | + |
142 | + *) Bugfix: in the ngx_http_mp4_module. |
143 | + Thanks to Gernot Vormayr. |
144 | + |
145 | + |
146 | +Changes with nginx 1.3.13 19 Feb 2013 |
147 | + |
148 | + *) Change: a compiler with name "cc" is now used by default. |
149 | + |
150 | + *) Feature: support for proxying of WebSocket connections. |
151 | + Thanks to Apcera and CloudBees for sponsoring this work. |
152 | + |
153 | + *) Feature: the "auth_basic_user_file" directive supports "{SHA}" |
154 | + password encryption method. |
155 | + Thanks to Louis Opter. |
156 | + |
157 | + |
158 | +Changes with nginx 1.3.12 05 Feb 2013 |
159 | + |
160 | + *) Feature: variables support in the "proxy_bind", "fastcgi_bind", |
161 | + "memcached_bind", "scgi_bind", and "uwsgi_bind" directives. |
162 | + |
163 | + *) Feature: the $pipe, $request_length, $time_iso8601, and $time_local |
164 | + variables can now be used not only in the "log_format" directive. |
165 | + Thanks to Kiril Kalchev. |
166 | + |
167 | + *) Feature: IPv6 support in the ngx_http_geoip_module. |
168 | + Thanks to Gregor Kališnik. |
169 | + |
170 | + *) Bugfix: in the "proxy_method" directive. |
171 | + |
172 | + *) Bugfix: a segmentation fault might occur in a worker process if |
173 | + resolver was used with the poll method. |
174 | + |
175 | + *) Bugfix: nginx might hog CPU during SSL handshake with a backend if |
176 | + the select, poll, or /dev/poll methods were used. |
177 | + |
178 | + *) Bugfix: the "[crit] SSL_write() failed (SSL:)" error. |
179 | + |
180 | + *) Bugfix: in the "client_body_in_file_only" directive; the bug had |
181 | + appeared in 1.3.9. |
182 | + |
183 | + *) Bugfix: in the "fastcgi_keep_conn" directive. |
184 | + |
185 | + |
186 | +Changes with nginx 1.3.11 10 Jan 2013 |
187 | + |
188 | + *) Bugfix: a segmentation fault might occur if logging was used; the bug |
189 | + had appeared in 1.3.10. |
190 | + |
191 | + *) Bugfix: the "proxy_pass" directive did not work with IP addresses |
192 | + without port specified; the bug had appeared in 1.3.10. |
193 | + |
194 | + *) Bugfix: a segmentation fault occurred on start or during |
195 | + reconfiguration if the "keepalive" directive was specified more than |
196 | + once in a single upstream block. |
197 | + |
198 | + *) Bugfix: parameter "default" of the "geo" directive did not set |
199 | + default value for IPv6 addresses. |
200 | + |
201 | + |
202 | +Changes with nginx 1.3.10 25 Dec 2012 |
203 | + |
204 | + *) Change: domain names specified in configuration file are now resolved |
205 | + to IPv6 addresses as well as IPv4 ones. |
206 | + |
207 | + *) Change: now if the "include" directive with mask is used on Unix |
208 | + systems, included files are sorted in alphabetical order. |
209 | + |
210 | + *) Change: the "add_header" directive adds headers to 201 responses. |
211 | + |
212 | + *) Feature: the "geo" directive now supports IPv6 addresses in CIDR |
213 | + notation. |
214 | + |
215 | + *) Feature: the "flush" and "gzip" parameters of the "access_log" |
216 | + directive. |
217 | + |
218 | + *) Feature: variables support in the "auth_basic" directive. |
219 | + |
220 | + *) Bugfix: nginx could not be built with the ngx_http_perl_module in |
221 | + some cases. |
222 | + |
223 | + *) Bugfix: a segmentation fault might occur in a worker process if the |
224 | + ngx_http_xslt_module was used. |
225 | + |
226 | + *) Bugfix: nginx could not be built on MacOSX in some cases. |
227 | + Thanks to Piotr Sikora. |
228 | + |
229 | + *) Bugfix: the "limit_rate" directive with high rates might result in |
230 | + truncated responses on 32-bit platforms. |
231 | + Thanks to Alexey Antropov. |
232 | + |
233 | + *) Bugfix: a segmentation fault might occur in a worker process if the |
234 | + "if" directive was used. |
235 | + Thanks to Piotr Sikora. |
236 | + |
237 | + *) Bugfix: a "100 Continue" response was issued with "413 Request Entity |
238 | + Too Large" responses. |
239 | + |
240 | + *) Bugfix: the "image_filter", "image_filter_jpeg_quality" and |
241 | + "image_filter_sharpen" directives might be inherited incorrectly. |
242 | + Thanks to Ian Babrou. |
243 | + |
244 | + *) Bugfix: "crypt_r() failed" errors might appear if the "auth_basic" |
245 | + directive was used on Linux. |
246 | + |
247 | + *) Bugfix: in backup servers handling. |
248 | + Thanks to Thomas Chen. |
249 | + |
250 | + *) Bugfix: proxied HEAD requests might return incorrect response if the |
251 | + "gzip" directive was used. |
252 | + |
253 | + |
254 | +Changes with nginx 1.3.9 27 Nov 2012 |
255 | + |
256 | + *) Feature: support for chunked transfer encoding while reading client |
257 | + request body. |
258 | |
259 | *) Feature: the $request_time and $msec variables can now be used not |
260 | only in the "log_format" directive. |
261 | @@ -10,7 +209,7 @@ |
262 | *) Bugfix: in the ngx_http_dav_module. |
263 | |
264 | |
265 | -Changes with nginx 1.2.5 13 Nov 2012 |
266 | +Changes with nginx 1.3.8 30 Oct 2012 |
267 | |
268 | *) Feature: the "optional_no_ca" parameter of the "ssl_verify_client" |
269 | directive. |
270 | @@ -20,17 +219,35 @@ |
271 | variables can now be used not only in the "log_format" directive. |
272 | Thanks to Benjamin Grössing. |
273 | |
274 | + *) Feature: the "auto" parameter of the "worker_processes" directive. |
275 | + |
276 | + *) Bugfix: "cache file ... has md5 collision" alert. |
277 | + |
278 | + *) Bugfix: in the ngx_http_gunzip_filter_module. |
279 | + |
280 | + *) Bugfix: in the "ssl_stapling" directive. |
281 | + |
282 | + |
283 | +Changes with nginx 1.3.7 02 Oct 2012 |
284 | + |
285 | + *) Feature: OCSP stapling support. |
286 | + Thanks to Comodo, DigiCert and GlobalSign for sponsoring this work. |
287 | + |
288 | + *) Feature: the "ssl_trusted_certificate" directive. |
289 | + |
290 | *) Feature: resolver now randomly rotates addresses returned from cache. |
291 | Thanks to Anton Jouline. |
292 | |
293 | - *) Feature: the "auto" parameter of the "worker_processes" directive. |
294 | - |
295 | - *) Bugfix: "cache file ... has md5 collision" alert. |
296 | - |
297 | *) Bugfix: OpenSSL 0.9.7 compatibility. |
298 | |
299 | |
300 | -Changes with nginx 1.2.4 25 Sep 2012 |
301 | +Changes with nginx 1.3.6 12 Sep 2012 |
302 | + |
303 | + *) Feature: the ngx_http_gunzip_filter_module. |
304 | + |
305 | + *) Feature: the "memcached_gzip_flag" directive. |
306 | + |
307 | + *) Feature: the "always" parameter of the "gzip_static" directive. |
308 | |
309 | *) Bugfix: in the "limit_req" directive; the bug had appeared in 1.1.14. |
310 | Thanks to Charles Chen. |
311 | @@ -38,6 +255,12 @@ |
312 | *) Bugfix: nginx could not be built by gcc 4.7 with -O2 optimization if |
313 | the --with-ipv6 option was used. |
314 | |
315 | + |
316 | +Changes with nginx 1.3.5 21 Aug 2012 |
317 | + |
318 | + *) Change: the ngx_http_mp4_module module no longer skips tracks in |
319 | + formats other than H.264 and AAC. |
320 | + |
321 | *) Bugfix: a segmentation fault might occur in a worker process if the |
322 | "map" directive was used with variables as values. |
323 | |
324 | @@ -58,7 +281,10 @@ |
325 | Thanks to HAYASHI Kentaro. |
326 | |
327 | |
328 | -Changes with nginx 1.2.3 07 Aug 2012 |
329 | +Changes with nginx 1.3.4 31 Jul 2012 |
330 | + |
331 | + *) Change: the "ipv6only" parameter is now turned on by default for |
332 | + listening IPv6 sockets. |
333 | |
334 | *) Feature: the Clang compiler support. |
335 | |
336 | @@ -74,6 +300,11 @@ |
337 | "fastcgi_hide_header", "scgi_hide_header", and "uwsgi_hide_header" |
338 | directives might be inherited incorrectly. |
339 | |
340 | + |
341 | +Changes with nginx 1.3.3 10 Jul 2012 |
342 | + |
343 | + *) Feature: entity tags support and the "etag" directive. |
344 | + |
345 | *) Bugfix: trailing dot in a source value was not ignored if the "map" |
346 | directive was used with the "hostnames" parameter. |
347 | |
348 | @@ -82,7 +313,7 @@ |
349 | to a named location. |
350 | |
351 | |
352 | -Changes with nginx 1.2.2 03 Jul 2012 |
353 | +Changes with nginx 1.3.2 26 Jun 2012 |
354 | |
355 | *) Change: the "single" parameter of the "keepalive" directive is now |
356 | ignored. |
357 | @@ -90,6 +321,36 @@ |
358 | *) Change: SSL compression is now disabled when using all versions of |
359 | OpenSSL, including ones prior to 1.0.0. |
360 | |
361 | + *) Feature: it is now possible to use the "ip_hash" directive to balance |
362 | + IPv6 clients. |
363 | + |
364 | + *) Feature: the $status variable can now be used not only in the |
365 | + "log_format" directive. |
366 | + |
367 | + *) Bugfix: a segmentation fault might occur in a worker process on |
368 | + shutdown if the "resolver" directive was used. |
369 | + |
370 | + *) Bugfix: a segmentation fault might occur in a worker process if the |
371 | + ngx_http_mp4_module was used. |
372 | + |
373 | + *) Bugfix: in the ngx_http_mp4_module. |
374 | + |
375 | + *) Bugfix: a segmentation fault might occur in a worker process if |
376 | + conflicting wildcard server names were used. |
377 | + |
378 | + *) Bugfix: nginx might be terminated abnormally on a SIGBUS signal on |
379 | + ARM platform. |
380 | + |
381 | + *) Bugfix: an alert "sendmsg() failed (9: Bad file number)" on HP-UX |
382 | + while reconfiguration. |
383 | + |
384 | + |
385 | +Changes with nginx 1.3.1 05 Jun 2012 |
386 | + |
387 | + *) Security: now nginx/Windows ignores trailing dot in URI path |
388 | + component, and does not allow URIs with ":$" in it. |
389 | + Thanks to Vladimir Kochetkov, Positive Research Center. |
390 | + |
391 | *) Feature: the "proxy_pass", "fastcgi_pass", "scgi_pass", "uwsgi_pass" |
392 | directives, and the "server" directive inside the "upstream" block, |
393 | now support IPv6 addresses. |
394 | @@ -102,11 +363,8 @@ |
395 | *) Feature: it is now possible to specify a weight for servers while |
396 | using the "ip_hash" directive. |
397 | |
398 | - *) Feature: it is now possible to use the "ip_hash" directive to balance |
399 | - IPv6 clients. |
400 | - |
401 | - *) Feature: the $status variable can now be used not only in the |
402 | - "log_format" directive. |
403 | + *) Bugfix: a segmentation fault might occur in a worker process if the |
404 | + "image_filter" directive was used; the bug had appeared in 1.3.0. |
405 | |
406 | *) Bugfix: nginx could not be built with ngx_cpp_test_module; the bug |
407 | had appeared in 1.1.12. |
408 | @@ -124,29 +382,8 @@ |
409 | *) Bugfix: in the "proxy_cookie_domain" and "proxy_cookie_path" |
410 | directives. |
411 | |
412 | - *) Bugfix: a segmentation fault might occur in a worker process on |
413 | - shutdown if the "resolver" directive was used. |
414 | - |
415 | - *) Bugfix: a segmentation fault might occur in a worker process if the |
416 | - ngx_http_mp4_module was used. |
417 | - |
418 | - *) Bugfix: in the ngx_http_mp4_module. |
419 | - |
420 | - *) Bugfix: a segmentation fault might occur in a worker process if |
421 | - conflicting wildcard server names were used. |
422 | - |
423 | - *) Bugfix: nginx might be terminated abnormally on a SIGBUS signal on |
424 | - ARM platform. |
425 | - |
426 | - *) Bugfix: an alert "sendmsg() failed (9: Bad file number)" on HP-UX |
427 | - while reconfiguration. |
428 | - |
429 | - |
430 | -Changes with nginx 1.2.1 05 Jun 2012 |
431 | - |
432 | - *) Security: now nginx/Windows ignores trailing dot in URI path |
433 | - component, and does not allow URIs with ":$" in it. |
434 | - Thanks to Vladimir Kochetkov, Positive Research Center. |
435 | + |
436 | +Changes with nginx 1.3.0 15 May 2012 |
437 | |
438 | *) Feature: the "debug_connection" directive now supports IPv6 addresses |
439 | and the "unix:" parameter. |
440 | |
441 | === modified file 'CHANGES.ru' |
442 | --- CHANGES.ru 2012-12-18 10:29:18 +0000 |
443 | +++ CHANGES.ru 2013-05-11 11:28:27 +0000 |
444 | @@ -1,5 +1,211 @@ |
445 | |
446 | -Изменения в nginx 1.2.6 11.12.2012 |
447 | +Изменения в nginx 1.4.1 07.05.2013 |
448 | + |
449 | + *) Безопасность: при обработке специально созданного запроса мог |
450 | + перезаписываться стек рабочего процесса, что могло приводить к |
451 | + выполнению произвольного кода (CVE-2013-2028); ошибка появилась в |
452 | + 1.3.9. |
453 | + Спасибо Greg MacManus, iSIGHT Partners Labs. |
454 | + |
455 | + |
456 | +Изменения в nginx 1.4.0 24.04.2013 |
457 | + |
458 | + *) Исправление: nginx не собирался с модулем ngx_http_perl_module, если |
459 | + использовался параметр --with-openssl; ошибка появилась в 1.3.16. |
460 | + |
461 | + *) Исправление: в работе с телом запроса из модуля ngx_http_perl_module; |
462 | + ошибка появилась в 1.3.9. |
463 | + |
464 | + |
465 | +Изменения в nginx 1.3.16 16.04.2013 |
466 | + |
467 | + *) Исправление: в рабочем процессе мог произойти segmentation fault, |
468 | + если использовались подзапросы; ошибка появилась в 1.3.9. |
469 | + |
470 | + *) Исправление: директива tcp_nodelay вызывала ошибку при проксировании |
471 | + WebSocket-соединений в unix domain сокет. |
472 | + |
473 | + *) Исправление: переменная $upstream_response_length возвращала значение |
474 | + "0", если не использовалась буферизация. |
475 | + Спасибо Piotr Sikora. |
476 | + |
477 | + *) Исправление: в методах обработки соединений eventport и /dev/poll. |
478 | + |
479 | + |
480 | +Изменения в nginx 1.3.15 26.03.2013 |
481 | + |
482 | + *) Изменение: открытие и закрытие соединения без отправки в нём |
483 | + каких-либо данных больше не записывается в access_log с кодом ошибки |
484 | + 400. |
485 | + |
486 | + *) Добавление: модуль ngx_http_spdy_module. |
487 | + Спасибо Automattic за спонсирование разработки. |
488 | + |
489 | + *) Добавление: директивы limit_req_status и limit_conn_status. |
490 | + Спасибо Nick Marden. |
491 | + |
492 | + *) Добавление: директива image_filter_interlace. |
493 | + Спасибо Ивану Боброву. |
494 | + |
495 | + *) Добавление: переменная $connections_waiting в модуле |
496 | + ngx_http_stub_status_module. |
497 | + |
498 | + *) Добавление: теперь почтовый прокси-сервер поддерживает IPv6-бэкенды. |
499 | + |
500 | + *) Исправление: при повторной отправке запроса на бэкенд тело запроса |
501 | + могло передаваться неправильно; ошибка появилась в 1.3.9. |
502 | + Спасибо Piotr Sikora. |
503 | + |
504 | + *) Исправление: в директиве client_body_in_file_only; ошибка появилась в |
505 | + 1.3.9. |
506 | + |
507 | + *) Исправление: ответы могли зависать, если использовались подзапросы и |
508 | + при обработке подзапроса происходила DNS-ошибка. |
509 | + Спасибо Lanshun Zhou. |
510 | + |
511 | + *) Исправление: в процедуре учёта использования бэкендов. |
512 | + |
513 | + |
514 | +Изменения в nginx 1.3.14 05.03.2013 |
515 | + |
516 | + *) Добавление: переменные $connections_active, $connections_reading и |
517 | + $connections_writing в модуле ngx_http_stub_status_module. |
518 | + |
519 | + *) Добавление: поддержка WebSocket-соединений в модулях |
520 | + ngx_http_uwsgi_module и ngx_http_scgi_module. |
521 | + |
522 | + *) Исправление: в обработке виртуальных серверов при использовании SNI. |
523 | + |
524 | + *) Исправление: при использовании директивы "ssl_session_cache shared" |
525 | + новые сессии могли не сохраняться, если заканчивалось место в |
526 | + разделяемой памяти. |
527 | + Спасибо Piotr Sikora. |
528 | + |
529 | + *) Исправление: несколько заголовков X-Forwarded-For обрабатывались |
530 | + неправильно. |
531 | + Спасибо Neal Poole за спонсирование разработки. |
532 | + |
533 | + *) Исправление: в модуле ngx_http_mp4_module. |
534 | + Спасибо Gernot Vormayr. |
535 | + |
536 | + |
537 | +Изменения в nginx 1.3.13 19.02.2013 |
538 | + |
539 | + *) Изменение: теперь для сборки по умолчанию используется компилятор с |
540 | + именем "cc". |
541 | + |
542 | + *) Добавление: поддержка проксирования WebSocket-соединений. |
543 | + Спасибо Apcera и CloudBees за спонсирование разработки. |
544 | + |
545 | + *) Добавление: директива auth_basic_user_file поддерживает шифрование |
546 | + паролей методом "{SHA}". |
547 | + Спасибо Louis Opter. |
548 | + |
549 | + |
550 | +Изменения в nginx 1.3.12 05.02.2013 |
551 | + |
552 | + *) Добавление: директивы proxy_bind, fastcgi_bind, memcached_bind, |
553 | + scgi_bind и uwsgi_bind поддерживают переменные. |
554 | + |
555 | + *) Добавление: переменные $pipe, $request_length, $time_iso8601 и |
556 | + $time_local теперь можно использовать не только в директиве |
557 | + log_format. |
558 | + Спасибо Kiril Kalchev. |
559 | + |
560 | + *) Добавление: поддержка IPv6 в модуле ngx_http_geoip_module. |
561 | + Спасибо Gregor Kališnik. |
562 | + |
563 | + *) Исправление: директива proxy_method работала неверно, если была |
564 | + указана на уровне http. |
565 | + |
566 | + *) Исправление: в рабочем процессе мог произойти segmentation fault, |
567 | + если использовался resolver и метод poll. |
568 | + |
569 | + *) Исправление: nginx мог нагружать процессор во время SSL handshake с |
570 | + бэкендом при использовании методов обработки соединений select, poll |
571 | + и /dev/poll. |
572 | + |
573 | + *) Исправление: ошибка "[crit] SSL_write() failed (SSL:)". |
574 | + |
575 | + *) Исправление: в директиве client_body_in_file_only; ошибка появилась в |
576 | + 1.3.9. |
577 | + |
578 | + *) Исправление: в директиве fastcgi_keep_conn. |
579 | + |
580 | + |
581 | +Изменения в nginx 1.3.11 10.01.2013 |
582 | + |
583 | + *) Исправление: при записи в лог мог происходить segmentation fault; |
584 | + ошибка появилась в 1.3.10. |
585 | + |
586 | + *) Исправление: директива proxy_pass не работала с IP-адресами без |
587 | + явного указания порта; ошибка появилась в 1.3.10. |
588 | + |
589 | + *) Исправление: на старте или во время переконфигурации происходил |
590 | + segmentation fault, если директива keepalive была указана несколько |
591 | + раз в одном блоке upstream. |
592 | + |
593 | + *) Исправление: параметр default директивы geo не определял значение по |
594 | + умолчанию для IPv6-адресов. |
595 | + |
596 | + |
597 | +Изменения в nginx 1.3.10 25.12.2012 |
598 | + |
599 | + *) Изменение: для указанных в конфигурационном файле доменных имён |
600 | + теперь используются не только IPv4, но и IPv6 адреса. |
601 | + |
602 | + *) Изменение: теперь при использовании директивы include с маской на |
603 | + Unix-системах включаемые файлы сортируются в алфавитном порядке. |
604 | + |
605 | + *) Изменение: директива add_header добавляет строки в ответы с кодом |
606 | + 201. |
607 | + |
608 | + *) Добавление: директива geo теперь поддерживает IPv6 адреса в формате |
609 | + CIDR. |
610 | + |
611 | + *) Добавление: параметры flush и gzip в директиве access_log. |
612 | + |
613 | + *) Добавление: директива auth_basic поддерживает переменные. |
614 | + |
615 | + *) Исправление: nginx в некоторых случаях не собирался с модулем |
616 | + ngx_http_perl_module. |
617 | + |
618 | + *) Исправление: в рабочем процессе мог произойти segmentation fault, |
619 | + если использовался модуль ngx_http_xslt_module. |
620 | + |
621 | + *) Исправление: nginx мог не собираться на MacOSX. |
622 | + Спасибо Piotr Sikora. |
623 | + |
624 | + *) Исправление: при использовании директивы limit_rate с большими |
625 | + значениями скорости на 32-битных системах ответ мог возвращаться не |
626 | + целиком. |
627 | + Спасибо Алексею Антропову. |
628 | + |
629 | + *) Исправление: в рабочем процессе мог произойти segmentation fault, |
630 | + если использовалась директива if. |
631 | + Спасибо Piotr Sikora. |
632 | + |
633 | + *) Исправление: ответ "100 Continue" выдавался вместе с ответом "413 |
634 | + Request Entity Too Large". |
635 | + |
636 | + *) Исправление: директивы image_filter, image_filter_jpeg_quality и |
637 | + image_filter_sharpen могли наследоваться некорректно. |
638 | + Спасибо Ивану Боброву. |
639 | + |
640 | + *) Исправление: при использовании директивы auth_basic под Linux могли |
641 | + возникать ошибки "crypt_r() failed". |
642 | + |
643 | + *) Исправление: в обработке backup-серверов. |
644 | + Спасибо Thomas Chen. |
645 | + |
646 | + *) Исправление: при проксировании HEAD-запросов мог возвращаться |
647 | + некорректный ответ, если использовалась директива gzip. |
648 | + |
649 | + |
650 | +Изменения в nginx 1.3.9 27.11.2012 |
651 | + |
652 | + *) Добавление: поддержка chunked transfer encoding при получении тела |
653 | + запроса. |
654 | |
655 | *) Добавление: переменные $request_time и $msec теперь можно |
656 | использовать не только в директиве log_format. |
657 | @@ -10,7 +216,7 @@ |
658 | *) Исправление: в модуле ngx_http_dav_module. |
659 | |
660 | |
661 | -Изменения в nginx 1.2.5 13.11.2012 |
662 | +Изменения в nginx 1.3.8 30.10.2012 |
663 | |
664 | *) Добавление: параметр optional_no_ca директивы ssl_verify_client. |
665 | Спасибо Михаилу Казанцеву и Eric O'Connor. |
666 | @@ -20,18 +226,36 @@ |
667 | log_format. |
668 | Спасибо Benjamin Grössing. |
669 | |
670 | + *) Добавление: параметр auto директивы worker_processes. |
671 | + |
672 | + *) Исправление: сообщения "cache file ... has md5 collision". |
673 | + |
674 | + *) Исправление: в модуле ngx_http_gunzip_filter_module. |
675 | + |
676 | + *) Исправление: в директиве ssl_stapling. |
677 | + |
678 | + |
679 | +Изменения в nginx 1.3.7 02.10.2012 |
680 | + |
681 | + *) Добавление: поддержка OCSP stapling. |
682 | + Спасибо Comodo, DigiCert и GlobalSign за спонсирование разработки. |
683 | + |
684 | + *) Добавление: директива ssl_trusted_certificate. |
685 | + |
686 | *) Добавление: теперь resolver случайным образом меняет порядок |
687 | возвращаемых закэшированных адресов. |
688 | Спасибо Антону Жулину. |
689 | |
690 | - *) Добавление: параметр auto директивы worker_processes. |
691 | - |
692 | - *) Исправление: сообщения "cache file ... has md5 collision". |
693 | - |
694 | *) Исправление: совместимость с OpenSSL 0.9.7. |
695 | |
696 | |
697 | -Изменения в nginx 1.2.4 25.09.2012 |
698 | +Изменения в nginx 1.3.6 12.09.2012 |
699 | + |
700 | + *) Добавление: модуль ngx_http_gunzip_filter_module. |
701 | + |
702 | + *) Добавление: директива memcached_gzip_flag. |
703 | + |
704 | + *) Добавление: параметр always директивы gzip_static. |
705 | |
706 | *) Исправление: в директиве "limit_req"; ошибка появилась в 1.1.14. |
707 | Спасибо Charles Chen. |
708 | @@ -39,6 +263,12 @@ |
709 | *) Исправление: nginx не собирался gcc 4.7 с оптимизацией -O2 если |
710 | использовался параметр --with-ipv6. |
711 | |
712 | + |
713 | +Изменения в nginx 1.3.5 21.08.2012 |
714 | + |
715 | + *) Изменение: модуль ngx_http_mp4_module больше не отфильтровывает |
716 | + дорожки в форматах, отличных от H.264 и AAC. |
717 | + |
718 | *) Исправление: в рабочем процессе мог произойти segmentation fault, |
719 | если в директиве map в качестве значений использовались переменные. |
720 | |
721 | @@ -58,7 +288,10 @@ |
722 | Спасибо HAYASHI Kentaro. |
723 | |
724 | |
725 | -Изменения в nginx 1.2.3 07.08.2012 |
726 | +Изменения в nginx 1.3.4 31.07.2012 |
727 | + |
728 | + *) Изменение: теперь на слушающих IPv6-сокетах параметр ipv6only включён |
729 | + по умолчанию. |
730 | |
731 | *) Добавление: поддержка компилятора Clang. |
732 | |
733 | @@ -74,6 +307,11 @@ |
734 | fastcgi_hide_header, scgi_hide_header и uwsgi_hide_header могли |
735 | наследоваться некорректно. |
736 | |
737 | + |
738 | +Изменения в nginx 1.3.3 10.07.2012 |
739 | + |
740 | + *) Добавление: поддержка entity tags и директива etag. |
741 | + |
742 | *) Исправление: при использовании директивы map с параметром hostnames |
743 | не игнорировалась конечная точка в исходном значении. |
744 | |
745 | @@ -82,45 +320,19 @@ |
746 | изменения URI с помощью директивы rewrite. |
747 | |
748 | |
749 | -Изменения в nginx 1.2.2 03.07.2012 |
750 | +Изменения в nginx 1.3.2 26.06.2012 |
751 | |
752 | *) Изменение: параметр single директивы keepalive теперь игнорируется. |
753 | |
754 | *) Изменение: сжатие SSL теперь отключено в том числе при использовании |
755 | OpenSSL cтарее 1.0.0. |
756 | |
757 | - *) Добавление: директивы proxy_pass, fastcgi_pass, scgi_pass, uwsgi_pass |
758 | - и директива server в блоке upstream теперь поддерживают IPv6-адреса. |
759 | - |
760 | - *) Добавление: в директиве resolver теперь можно указывать порт и |
761 | - задавать IPv6-адреса DNS-серверов. |
762 | - |
763 | - *) Добавление: директива least_conn в блоке upstream. |
764 | - |
765 | - *) Добавление: при использовании директивы ip_hash теперь можно задавать |
766 | - веса серверов. |
767 | - |
768 | *) Добавление: директиву "ip_hash" теперь можно использовать для |
769 | балансировки IPv6 клиентов. |
770 | |
771 | *) Добавление: переменную $status теперь можно использовать не только в |
772 | директиве log_format. |
773 | |
774 | - *) Исправление: nginx не собирался с модулем ngx_cpp_test_module; ошибка |
775 | - появилась в 1.1.12. |
776 | - |
777 | - *) Исправление: доступ к переменным из SSI и встроенного перла мог не |
778 | - работать после переконфигурации. |
779 | - Спасибо Yichun Zhang. |
780 | - |
781 | - *) Исправление: в модуле ngx_http_xslt_filter_module. |
782 | - Спасибо Kuramoto Eiji. |
783 | - |
784 | - *) Исправление: утечки памяти при использовании переменной $geoip_org. |
785 | - Спасибо Денису Латыпову. |
786 | - |
787 | - *) Исправление: в директивах proxy_cookie_domain и proxy_cookie_path. |
788 | - |
789 | *) Исправление: при завершении рабочего процесса мог произойти |
790 | segmentation fault, если использовалась директива resolver. |
791 | |
792 | @@ -139,13 +351,45 @@ |
793 | alert "sendmsg() failed (9: Bad file number)". |
794 | |
795 | |
796 | -Изменения в nginx 1.2.1 05.06.2012 |
797 | +Изменения в nginx 1.3.1 05.06.2012 |
798 | |
799 | *) Безопасность: теперь nginx/Windows игнорирует точку в конце |
800 | компонента URI и не разрешает URI, содержащие последовательность |
801 | ":$". |
802 | Спасибо Владимиру Кочеткову, Positive Research Center. |
803 | |
804 | + *) Добавление: директивы proxy_pass, fastcgi_pass, scgi_pass, uwsgi_pass |
805 | + и директива server в блоке upstream теперь поддерживают IPv6-адреса. |
806 | + |
807 | + *) Добавление: в директиве resolver теперь можно указывать порт и |
808 | + задавать IPv6-адреса DNS-серверов. |
809 | + |
810 | + *) Добавление: директива least_conn в блоке upstream. |
811 | + |
812 | + *) Добавление: при использовании директивы ip_hash теперь можно задавать |
813 | + веса серверов. |
814 | + |
815 | + *) Исправление: в рабочем процессе мог произойти segmentation fault, |
816 | + если использовалась директива image_filter; ошибка появилась в 1.3.0. |
817 | + |
818 | + *) Исправление: nginx не собирался с модулем ngx_cpp_test_module; ошибка |
819 | + появилась в 1.1.12. |
820 | + |
821 | + *) Исправление: доступ к переменным из SSI и встроенного перла мог не |
822 | + работать после переконфигурации. |
823 | + Спасибо Yichun Zhang. |
824 | + |
825 | + *) Исправление: в модуле ngx_http_xslt_filter_module. |
826 | + Спасибо Kuramoto Eiji. |
827 | + |
828 | + *) Исправление: утечки памяти при использовании переменной $geoip_org. |
829 | + Спасибо Денису Латыпову. |
830 | + |
831 | + *) Исправление: в директивах proxy_cookie_domain и proxy_cookie_path. |
832 | + |
833 | + |
834 | +Изменения в nginx 1.3.0 15.05.2012 |
835 | + |
836 | *) Добавление: директива debug_connection теперь поддерживает |
837 | IPv6-адреса и параметр "unix:". |
838 | |
839 | |
840 | === modified file 'LICENSE' |
841 | --- LICENSE 2012-10-30 10:10:34 +0000 |
842 | +++ LICENSE 2013-05-11 11:28:27 +0000 |
843 | @@ -1,6 +1,6 @@ |
844 | /* |
845 | - * Copyright (C) 2002-2012 Igor Sysoev |
846 | - * Copyright (C) 2011,2012 Nginx, Inc. |
847 | + * Copyright (C) 2002-2013 Igor Sysoev |
848 | + * Copyright (C) 2011-2013 Nginx, Inc. |
849 | * All rights reserved. |
850 | * |
851 | * Redistribution and use in source and binary forms, with or without |
852 | |
853 | === modified file 'auto/cc/msvc' |
854 | --- auto/cc/msvc 2012-02-01 17:50:05 +0000 |
855 | +++ auto/cc/msvc 2013-05-11 11:28:27 +0000 |
856 | @@ -73,9 +73,6 @@ |
857 | # disable logo |
858 | CFLAGS="$CFLAGS -nologo" |
859 | |
860 | - |
861 | -LINK="\$(CC)" |
862 | - |
863 | # the link flags |
864 | CORE_LINK="$CORE_LINK -link -verbose:lib" |
865 | |
866 | |
867 | === modified file 'auto/lib/geoip/conf' |
868 | --- auto/lib/geoip/conf 2012-02-01 17:50:05 +0000 |
869 | +++ auto/lib/geoip/conf 2013-05-11 11:28:27 +0000 |
870 | @@ -6,7 +6,7 @@ |
871 | ngx_feature="GeoIP library" |
872 | ngx_feature_name= |
873 | ngx_feature_run=no |
874 | - ngx_feature_incs= |
875 | + ngx_feature_incs="#include <GeoIP.h>" |
876 | ngx_feature_path= |
877 | ngx_feature_libs="-lGeoIP" |
878 | ngx_feature_test="GeoIP_open(NULL, 0)" |
879 | @@ -18,6 +18,7 @@ |
880 | # FreeBSD port |
881 | |
882 | ngx_feature="GeoIP library in /usr/local/" |
883 | + ngx_feature_path="/usr/local/include" |
884 | |
885 | if [ $NGX_RPATH = YES ]; then |
886 | ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lGeoIP" |
887 | @@ -34,7 +35,7 @@ |
888 | # NetBSD port |
889 | |
890 | ngx_feature="GeoIP library in /usr/pkg/" |
891 | - ngx_feature_path="/usr/pkg/include/" |
892 | + ngx_feature_path="/usr/pkg/include" |
893 | |
894 | if [ $NGX_RPATH = YES ]; then |
895 | ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lGeoIP" |
896 | @@ -64,8 +65,22 @@ |
897 | |
898 | |
899 | if [ $ngx_found = yes ]; then |
900 | + |
901 | + CORE_INCS="$CORE_INCS $ngx_feature_path" |
902 | CORE_LIBS="$CORE_LIBS $ngx_feature_libs" |
903 | |
904 | + if [ $NGX_IPV6 = YES ]; then |
905 | + ngx_feature="GeoIP IPv6 support" |
906 | + ngx_feature_name="NGX_HAVE_GEOIP_V6" |
907 | + ngx_feature_run=no |
908 | + ngx_feature_incs="#include <stdio.h> |
909 | + #include <GeoIP.h>" |
910 | + #ngx_feature_path= |
911 | + #ngx_feature_libs= |
912 | + ngx_feature_test="printf(\"%d\", GEOIP_CITY_EDITION_REV0_V6);" |
913 | + . auto/feature |
914 | + fi |
915 | + |
916 | else |
917 | |
918 | cat << END |
919 | |
920 | === modified file 'auto/lib/libgd/conf' |
921 | --- auto/lib/libgd/conf 2012-02-01 17:50:05 +0000 |
922 | +++ auto/lib/libgd/conf 2013-05-11 11:28:27 +0000 |
923 | @@ -35,7 +35,7 @@ |
924 | # NetBSD port |
925 | |
926 | ngx_feature="GD library in /usr/pkg/" |
927 | - ngx_feature_path="/usr/pkg/include/" |
928 | + ngx_feature_path="/usr/pkg/include" |
929 | |
930 | if [ $NGX_RPATH = YES ]; then |
931 | ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lgd" |
932 | |
933 | === modified file 'auto/lib/md5/conf' |
934 | --- auto/lib/md5/conf 2012-02-01 17:50:05 +0000 |
935 | +++ auto/lib/md5/conf 2013-05-11 11:28:27 +0000 |
936 | @@ -52,7 +52,7 @@ |
937 | |
938 | # FreeBSD, Solaris 10 |
939 | |
940 | - ngx_feature="system md library" |
941 | + ngx_feature="md5 in system md library" |
942 | ngx_feature_name=NGX_HAVE_MD5 |
943 | ngx_feature_run=no |
944 | ngx_feature_incs="#include <md5.h>" |
945 | @@ -67,7 +67,7 @@ |
946 | |
947 | # Solaris 8/9 |
948 | |
949 | - ngx_feature="system md5 library" |
950 | + ngx_feature="md5 in system md5 library" |
951 | ngx_feature_libs="-lmd5" |
952 | . auto/feature |
953 | |
954 | @@ -78,7 +78,7 @@ |
955 | |
956 | # OpenSSL crypto library |
957 | |
958 | - ngx_feature="OpenSSL md5 crypto library" |
959 | + ngx_feature="md5 in system OpenSSL crypto library" |
960 | ngx_feature_name="NGX_OPENSSL_MD5" |
961 | ngx_feature_incs="#include <openssl/md5.h>" |
962 | ngx_feature_libs="-lcrypto" |
963 | |
964 | === modified file 'auto/lib/pcre/conf' |
965 | --- auto/lib/pcre/conf 2012-04-13 16:58:59 +0000 |
966 | +++ auto/lib/pcre/conf 2013-05-11 11:28:27 +0000 |
967 | @@ -172,6 +172,7 @@ |
968 | ngx_feature="PCRE JIT support" |
969 | ngx_feature_name="NGX_HAVE_PCRE_JIT" |
970 | ngx_feature_test="int jit = 0; |
971 | + pcre_free_study(NULL); |
972 | pcre_config(PCRE_CONFIG_JIT, &jit); |
973 | if (jit != 1) return 1;" |
974 | . auto/feature |
975 | |
976 | === modified file 'auto/lib/perl/conf' |
977 | --- auto/lib/perl/conf 2012-12-18 10:29:18 +0000 |
978 | +++ auto/lib/perl/conf 2013-05-11 11:28:27 +0000 |
979 | @@ -40,6 +40,8 @@ |
980 | |
981 | ngx_perl_ldopts=`$NGX_PERL -MExtUtils::Embed -e ldopts` |
982 | |
983 | + ngx_perl_dlext=`$NGX_PERL -MConfig -e 'print $Config{dlext}'` |
984 | + |
985 | if $NGX_PERL -V:usemultiplicity | grep define > /dev/null; then |
986 | have=NGX_HAVE_PERL_MULTIPLICITY . auto/have |
987 | echo " + perl interpreter multiplicity found" |
988 | @@ -51,7 +53,7 @@ |
989 | fi |
990 | |
991 | CORE_LINK="$CORE_LINK $ngx_perl_ldopts" |
992 | - LINK_DEPS="$LINK_DEPS $NGX_OBJS/src/http/modules/perl/blib/arch/auto/nginx/nginx.so" |
993 | + LINK_DEPS="$LINK_DEPS $NGX_OBJS/src/http/modules/perl/blib/arch/auto/nginx/nginx.$ngx_perl_dlext" |
994 | |
995 | if test -n "$NGX_PERL_MODULES"; then |
996 | have=NGX_PERL_MODULES value="(u_char *) \"$NGX_PERL_MODULES\"" |
997 | |
998 | === modified file 'auto/lib/perl/make' |
999 | --- auto/lib/perl/make 2012-10-30 10:10:34 +0000 |
1000 | +++ auto/lib/perl/make 2013-05-11 11:28:27 +0000 |
1001 | @@ -3,34 +3,38 @@ |
1002 | # Copyright (C) Nginx, Inc. |
1003 | |
1004 | |
1005 | +v=`grep 'define NGINX_VERSION' src/core/nginx.h | sed -e 's/^.*"\(.*\)".*/\1/'` |
1006 | + |
1007 | + |
1008 | cat << END >> $NGX_MAKEFILE |
1009 | |
1010 | -$NGX_OBJS/src/http/modules/perl/blib/arch/auto/nginx/nginx.so: \ |
1011 | - src/http/modules/perl/nginx.pm \ |
1012 | - src/http/modules/perl/nginx.xs \ |
1013 | - src/http/modules/perl/ngx_http_perl_module.h \ |
1014 | +$NGX_OBJS/src/http/modules/perl/blib/arch/auto/nginx/nginx.$ngx_perl_dlext: \\ |
1015 | + \$(CORE_DEPS) \$(HTTP_DEPS) \\ |
1016 | + src/http/modules/perl/ngx_http_perl_module.h \\ |
1017 | $NGX_OBJS/src/http/modules/perl/Makefile |
1018 | - cp -p src/http/modules/perl/nginx.* $NGX_OBJS/src/http/modules/perl/ |
1019 | - |
1020 | cd $NGX_OBJS/src/http/modules/perl && \$(MAKE) |
1021 | |
1022 | rm -rf $NGX_OBJS/install_perl |
1023 | |
1024 | |
1025 | -$NGX_OBJS/src/http/modules/perl/Makefile: \ |
1026 | - src/http/modules/perl/Makefile.PL \ |
1027 | - src/http/modules/perl/nginx.pm |
1028 | - cp -p src/http/modules/perl/nginx.* $NGX_OBJS/src/http/modules/perl/ |
1029 | +$NGX_OBJS/src/http/modules/perl/Makefile: \\ |
1030 | + src/core/nginx.h \\ |
1031 | + src/http/modules/perl/Makefile.PL \\ |
1032 | + src/http/modules/perl/nginx.pm \\ |
1033 | + src/http/modules/perl/nginx.xs \\ |
1034 | + src/http/modules/perl/typemap |
1035 | + sed "s/%%VERSION%%/$v/" src/http/modules/perl/nginx.pm > \\ |
1036 | + $NGX_OBJS/src/http/modules/perl/nginx.pm |
1037 | + cp -p src/http/modules/perl/nginx.xs $NGX_OBJS/src/http/modules/perl/ |
1038 | cp -p src/http/modules/perl/typemap $NGX_OBJS/src/http/modules/perl/ |
1039 | cp -p src/http/modules/perl/Makefile.PL $NGX_OBJS/src/http/modules/perl/ |
1040 | |
1041 | - cd $NGX_OBJS/src/http/modules/perl \ |
1042 | - && NGX_PM_CFLAGS="\$(NGX_PM_CFLAGS) -g $NGX_CC_OPT" \ |
1043 | - NGX_PCRE=$PCRE \ |
1044 | - NGX_OBJS=$NGX_OBJS \ |
1045 | - NGX_OPENSSL=$OPENSSL \ |
1046 | - $NGX_PERL Makefile.PL \ |
1047 | - LIB=$NGX_PERL_MODULES \ |
1048 | + cd $NGX_OBJS/src/http/modules/perl \\ |
1049 | + && NGX_PM_CFLAGS="\$(NGX_PM_CFLAGS) -g $NGX_CC_OPT" \\ |
1050 | + NGX_INCS="$CORE_INCS $NGX_OBJS $HTTP_INCS" \\ |
1051 | + NGX_DEPS="\$(CORE_DEPS) \$(HTTP_DEPS)" \\ |
1052 | + $NGX_PERL Makefile.PL \\ |
1053 | + LIB=$NGX_PERL_MODULES \\ |
1054 | INSTALLSITEMAN3DIR=$NGX_PERL_MODULES_MAN |
1055 | |
1056 | END |
1057 | |
1058 | === modified file 'auto/lib/sha1/conf' |
1059 | --- auto/lib/sha1/conf 2012-02-01 17:50:05 +0000 |
1060 | +++ auto/lib/sha1/conf 2013-05-11 11:28:27 +0000 |
1061 | @@ -57,7 +57,7 @@ |
1062 | |
1063 | # OpenSSL crypto library |
1064 | |
1065 | - ngx_feature="OpenSSL sha1 crypto library" |
1066 | + ngx_feature="sha1 in system OpenSSL crypto library" |
1067 | ngx_feature_incs="#include <openssl/sha.h>" |
1068 | ngx_feature_libs="-lcrypto" |
1069 | . auto/feature |
1070 | |
1071 | === modified file 'auto/lib/zlib/conf' |
1072 | --- auto/lib/zlib/conf 2012-02-01 17:50:05 +0000 |
1073 | +++ auto/lib/zlib/conf 2013-05-11 11:28:27 +0000 |
1074 | @@ -9,11 +9,13 @@ |
1075 | case "$NGX_CC_NAME" in |
1076 | |
1077 | msvc* | owc* | bcc) |
1078 | + have=NGX_ZLIB . auto/have |
1079 | LINK_DEPS="$LINK_DEPS $ZLIB/zlib.lib" |
1080 | CORE_LIBS="$CORE_LIBS $ZLIB/zlib.lib" |
1081 | ;; |
1082 | |
1083 | icc*) |
1084 | + have=NGX_ZLIB . auto/have |
1085 | LINK_DEPS="$LINK_DEPS $ZLIB/libz.a" |
1086 | |
1087 | # to allow -ipo optimization we link with the *.o but not library |
1088 | @@ -30,6 +32,7 @@ |
1089 | ;; |
1090 | |
1091 | *) |
1092 | + have=NGX_ZLIB . auto/have |
1093 | LINK_DEPS="$LINK_DEPS $ZLIB/libz.a" |
1094 | CORE_LIBS="$CORE_LIBS $ZLIB/libz.a" |
1095 | #CORE_LIBS="$CORE_LIBS -L $ZLIB -lz" |
1096 | @@ -45,7 +48,7 @@ |
1097 | # FreeBSD, Solaris, Linux |
1098 | |
1099 | ngx_feature="zlib library" |
1100 | - ngx_feature_name= |
1101 | + ngx_feature_name="NGX_ZLIB" |
1102 | ngx_feature_run=no |
1103 | ngx_feature_incs="#include <zlib.h>" |
1104 | ngx_feature_path= |
1105 | |
1106 | === modified file 'auto/modules' |
1107 | --- auto/modules 2012-10-30 10:10:34 +0000 |
1108 | +++ auto/modules 2013-05-11 11:28:27 +0000 |
1109 | @@ -100,6 +100,7 @@ |
1110 | # ngx_http_write_filter |
1111 | # ngx_http_header_filter |
1112 | # ngx_http_chunked_filter |
1113 | +# ngx_http_spdy_filter |
1114 | # ngx_http_range_header_filter |
1115 | # ngx_http_gzip_filter |
1116 | # ngx_http_postpone_filter |
1117 | @@ -109,6 +110,7 @@ |
1118 | # ngx_http_image_filter |
1119 | # ngx_http_sub_filter |
1120 | # ngx_http_addition_filter |
1121 | +# ngx_http_gunzip_filter |
1122 | # ngx_http_userid_filter |
1123 | # ngx_http_headers_filter |
1124 | # ngx_http_copy_filter |
1125 | @@ -117,8 +119,13 @@ |
1126 | |
1127 | HTTP_FILTER_MODULES="$HTTP_WRITE_FILTER_MODULE \ |
1128 | $HTTP_HEADER_FILTER_MODULE \ |
1129 | - $HTTP_CHUNKED_FILTER_MODULE \ |
1130 | - $HTTP_RANGE_HEADER_FILTER_MODULE" |
1131 | + $HTTP_CHUNKED_FILTER_MODULE" |
1132 | + |
1133 | +if [ $HTTP_SPDY = YES ]; then |
1134 | + HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_SPDY_FILTER_MODULE" |
1135 | +fi |
1136 | + |
1137 | +HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_RANGE_HEADER_FILTER_MODULE" |
1138 | |
1139 | if [ $HTTP_GZIP = YES ]; then |
1140 | have=NGX_HTTP_GZIP . auto/have |
1141 | @@ -166,11 +173,27 @@ |
1142 | HTTP_SRCS="$HTTP_SRCS $HTTP_ADDITION_SRCS" |
1143 | fi |
1144 | |
1145 | +if [ $HTTP_GUNZIP = YES ]; then |
1146 | + have=NGX_HTTP_GZIP . auto/have |
1147 | + USE_ZLIB=YES |
1148 | + HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_GUNZIP_FILTER_MODULE" |
1149 | + HTTP_SRCS="$HTTP_SRCS $HTTP_GUNZIP_SRCS" |
1150 | +fi |
1151 | + |
1152 | if [ $HTTP_USERID = YES ]; then |
1153 | HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_USERID_FILTER_MODULE" |
1154 | HTTP_SRCS="$HTTP_SRCS $HTTP_USERID_SRCS" |
1155 | fi |
1156 | |
1157 | + |
1158 | +if [ $HTTP_SPDY = YES ]; then |
1159 | + have=NGX_HTTP_SPDY . auto/have |
1160 | + USE_ZLIB=YES |
1161 | + HTTP_MODULES="$HTTP_MODULES $HTTP_SPDY_MODULE" |
1162 | + HTTP_DEPS="$HTTP_DEPS $HTTP_SPDY_DEPS" |
1163 | + HTTP_SRCS="$HTTP_SRCS $HTTP_SPDY_SRCS" |
1164 | +fi |
1165 | + |
1166 | HTTP_MODULES="$HTTP_MODULES $HTTP_STATIC_MODULE" |
1167 | |
1168 | if [ $HTTP_GZIP_STATIC = YES ]; then |
1169 | @@ -234,7 +257,6 @@ |
1170 | fi |
1171 | |
1172 | if [ $HTTP_GEO = YES ]; then |
1173 | - have=NGX_HTTP_GEO . auto/have |
1174 | have=NGX_HTTP_X_FORWARDED_FOR . auto/have |
1175 | HTTP_MODULES="$HTTP_MODULES $HTTP_GEO_MODULE" |
1176 | HTTP_SRCS="$HTTP_SRCS $HTTP_GEO_SRCS" |
1177 | @@ -276,7 +298,6 @@ |
1178 | fi |
1179 | |
1180 | if [ $HTTP_PROXY = YES ]; then |
1181 | - have=NGX_HTTP_PROXY . auto/have |
1182 | have=NGX_HTTP_X_FORWARDED_FOR . auto/have |
1183 | #USE_MD5=YES |
1184 | HTTP_MODULES="$HTTP_MODULES $HTTP_PROXY_MODULE" |
1185 | |
1186 | === modified file 'auto/options' |
1187 | --- auto/options 2012-12-18 10:29:18 +0000 |
1188 | +++ auto/options 2013-05-11 11:28:27 +0000 |
1189 | @@ -15,7 +15,7 @@ |
1190 | NGX_USER= |
1191 | NGX_GROUP= |
1192 | |
1193 | -CC=${CC:-gcc} |
1194 | +CC=${CC:-cc} |
1195 | CPP= |
1196 | NGX_OBJS=objs |
1197 | |
1198 | @@ -60,6 +60,7 @@ |
1199 | HTTP_CHARSET=YES |
1200 | HTTP_GZIP=YES |
1201 | HTTP_SSL=NO |
1202 | +HTTP_SPDY=NO |
1203 | HTTP_SSI=YES |
1204 | HTTP_POSTPONE=NO |
1205 | HTTP_REALIP=NO |
1206 | @@ -94,6 +95,7 @@ |
1207 | HTTP_DEGRADATION=NO |
1208 | HTTP_FLV=NO |
1209 | HTTP_MP4=NO |
1210 | +HTTP_GUNZIP=NO |
1211 | HTTP_GZIP_STATIC=NO |
1212 | HTTP_UPSTREAM_IP_HASH=YES |
1213 | HTTP_UPSTREAM_LEAST_CONN=YES |
1214 | @@ -201,6 +203,7 @@ |
1215 | --http-scgi-temp-path=*) NGX_HTTP_SCGI_TEMP_PATH="$value" ;; |
1216 | |
1217 | --with-http_ssl_module) HTTP_SSL=YES ;; |
1218 | + --with-http_spdy_module) HTTP_SPDY=YES ;; |
1219 | --with-http_realip_module) HTTP_REALIP=YES ;; |
1220 | --with-http_addition_module) HTTP_ADDITION=YES ;; |
1221 | --with-http_xslt_module) HTTP_XSLT=YES ;; |
1222 | @@ -210,6 +213,7 @@ |
1223 | --with-http_dav_module) HTTP_DAV=YES ;; |
1224 | --with-http_flv_module) HTTP_FLV=YES ;; |
1225 | --with-http_mp4_module) HTTP_MP4=YES ;; |
1226 | + --with-http_gunzip_module) HTTP_GUNZIP=YES ;; |
1227 | --with-http_gzip_static_module) HTTP_GZIP_STATIC=YES ;; |
1228 | --with-http_random_index_module) HTTP_RANDOM_INDEX=YES ;; |
1229 | --with-http_secure_link_module) HTTP_SECURE_LINK=YES ;; |
1230 | @@ -347,6 +351,7 @@ |
1231 | --with-ipv6 enable IPv6 support |
1232 | |
1233 | --with-http_ssl_module enable ngx_http_ssl_module |
1234 | + --with-http_spdy_module enable ngx_http_spdy_module |
1235 | --with-http_realip_module enable ngx_http_realip_module |
1236 | --with-http_addition_module enable ngx_http_addition_module |
1237 | --with-http_xslt_module enable ngx_http_xslt_module |
1238 | @@ -356,6 +361,7 @@ |
1239 | --with-http_dav_module enable ngx_http_dav_module |
1240 | --with-http_flv_module enable ngx_http_flv_module |
1241 | --with-http_mp4_module enable ngx_http_mp4_module |
1242 | + --with-http_gunzip_module enable ngx_http_gunzip_module |
1243 | --with-http_gzip_static_module enable ngx_http_gzip_static_module |
1244 | --with-http_random_index_module enable ngx_http_random_index_module |
1245 | --with-http_secure_link_module enable ngx_http_secure_link_module |
1246 | |
1247 | === modified file 'auto/sources' |
1248 | --- auto/sources 2012-10-30 10:10:34 +0000 |
1249 | +++ auto/sources 2013-05-11 11:28:27 +0000 |
1250 | @@ -77,7 +77,8 @@ |
1251 | |
1252 | OPENSSL_MODULE=ngx_openssl_module |
1253 | OPENSSL_DEPS=src/event/ngx_event_openssl.h |
1254 | -OPENSSL_SRCS=src/event/ngx_event_openssl.c |
1255 | +OPENSSL_SRCS="src/event/ngx_event_openssl.c \ |
1256 | + src/event/ngx_event_openssl_stapling.c" |
1257 | |
1258 | |
1259 | EVENT_MODULES="ngx_events_module ngx_event_core_module" |
1260 | @@ -323,6 +324,15 @@ |
1261 | HTTP_FILE_CACHE_SRCS=src/http/ngx_http_file_cache.c |
1262 | |
1263 | |
1264 | +HTTP_SPDY_MODULE=ngx_http_spdy_module |
1265 | +HTTP_SPDY_FILTER_MODULE=ngx_http_spdy_filter_module |
1266 | +HTTP_SPDY_DEPS="src/http/ngx_http_spdy.h \ |
1267 | + src/http/ngx_http_spdy_module.h" |
1268 | +HTTP_SPDY_SRCS="src/http/ngx_http_spdy.c \ |
1269 | + src/http/ngx_http_spdy_module.c \ |
1270 | + src/http/ngx_http_spdy_filter_module.c" |
1271 | + |
1272 | + |
1273 | HTTP_CHARSET_FILTER_MODULE=ngx_http_charset_filter_module |
1274 | HTTP_CHARSET_SRCS=src/http/modules/ngx_http_charset_filter_module.c |
1275 | |
1276 | @@ -331,6 +341,10 @@ |
1277 | HTTP_GZIP_SRCS=src/http/modules/ngx_http_gzip_filter_module.c |
1278 | |
1279 | |
1280 | +HTTP_GUNZIP_FILTER_MODULE=ngx_http_gunzip_filter_module |
1281 | +HTTP_GUNZIP_SRCS=src/http/modules/ngx_http_gunzip_filter_module.c |
1282 | + |
1283 | + |
1284 | HTTP_SSI_FILTER_MODULE=ngx_http_ssi_filter_module |
1285 | HTTP_SSI_DEPS=src/http/modules/ngx_http_ssi_filter_module.h |
1286 | HTTP_SSI_SRCS=src/http/modules/ngx_http_ssi_filter_module.c |
1287 | |
1288 | === modified file 'auto/unix' |
1289 | --- auto/unix 2012-10-30 10:10:34 +0000 |
1290 | +++ auto/unix 2013-05-11 11:28:27 +0000 |
1291 | @@ -778,3 +778,17 @@ |
1292 | openat(AT_FDCWD, \".\", O_RDONLY|O_NOFOLLOW); |
1293 | fstatat(AT_FDCWD, \".\", &sb, AT_SYMLINK_NOFOLLOW);" |
1294 | . auto/feature |
1295 | + |
1296 | + |
1297 | +ngx_feature="getaddrinfo()" |
1298 | +ngx_feature_name="NGX_HAVE_GETADDRINFO" |
1299 | +ngx_feature_run=no |
1300 | +ngx_feature_incs="#include <sys/types.h> |
1301 | + #include <sys/socket.h> |
1302 | + #include <netdb.h>" |
1303 | +ngx_feature_path= |
1304 | +ngx_feature_libs= |
1305 | +ngx_feature_test='struct addrinfo *res; |
1306 | + if (getaddrinfo("localhost", NULL, NULL, &res) != 0) return 1; |
1307 | + freeaddrinfo(res)' |
1308 | +. auto/feature |
1309 | |
1310 | === modified file 'debian/changelog' |
1311 | --- debian/changelog 2013-05-09 11:50:52 +0000 |
1312 | +++ debian/changelog 2013-05-11 11:28:27 +0000 |
1313 | @@ -1,3 +1,92 @@ |
1314 | +nginx (1.4.1-1ubuntu1) saucy; urgency=low |
1315 | + |
1316 | + * Merge with Debian unstable (LP: #1177919). Remaining changes: |
1317 | + - debian/conf/sites-available/default: |
1318 | + + Modify default site configuration file to correct a typo |
1319 | + that prevented out-of-the-box usability (LP: #1162177). |
1320 | + - debian/patches/ubuntu-branding.patch: |
1321 | + + Add ubuntu branding to server_tokens. |
1322 | + * Refresh all patches. |
1323 | + |
1324 | + -- Dmitry Shachnev <mitya57@ubuntu.com> Sat, 11 May 2013 14:47:53 +0400 |
1325 | + |
1326 | +nginx (1.4.1-1) unstable; urgency=low |
1327 | + |
1328 | + * New upstream release: |
1329 | + + Fixes arbitrary code execution (CVE-2013-2028). |
1330 | + * Uploaded to unstable. |
1331 | + * debian/control: |
1332 | + + Updated Standards-Version to 3.9.4 |
1333 | + |
1334 | + -- Kartik Mistry <kartik@debian.org> Tue, 07 May 2013 19:53:46 +0530 |
1335 | + |
1336 | +nginx (1.4.0-2) experimental; urgency=low |
1337 | + |
1338 | + [ Ondřej Surý ] |
1339 | + * debian/modules/: |
1340 | + + Updated nginx-echo, nginx-cache-purge and naxsi modules. |
1341 | + + Removed useless .gitignore, .gitmodules files. |
1342 | + |
1343 | + [ Kartik Mistry ] |
1344 | + * debian/modules/nginx-upload: |
1345 | + + This module no longer works with 1.3.x and above. Removed as of now. |
1346 | + * debian/modules/ngx-fancyindex: |
1347 | + + Added Fancy Indexes module (Closes: #704210) |
1348 | + * debian/copyright: |
1349 | + + Fixed path for modules in Files: field. |
1350 | + + Updated copyright for debian/* |
1351 | + * debian/rules: |
1352 | + + Enabled spdy module (Closes: #706195). |
1353 | + * debian/control: |
1354 | + + Suggests: fcgiwrap (Closes: #701508). |
1355 | + |
1356 | + [ Cyril Lavier ] |
1357 | + * debian/conf/naxsi-ui.conf: |
1358 | + + Added configuration file for nginx-naxsi-ui using SQLite |
1359 | + (Closes: #699678). |
1360 | + * debian/nginx-naxsi-ui.config, debian/nginx-naxsi-ui.postinst, |
1361 | + debian/nginx-naxsi-ui.postrm, debian/nginx-naxsi-ui.prerm, |
1362 | + debian/nginx-naxsi-ui.templates: |
1363 | + + Removed these files as they are not necessary anymore with the |
1364 | + database engine switching from MySQL to SQLite. |
1365 | + * debian/control: |
1366 | + + Removed dependencies against MySQL. |
1367 | + * debian/rules, debian/modules/ngx_http_substitutions_filter_module, |
1368 | + debian/README.Modules-versions: |
1369 | + + Added http_substitutions_filter module. (Closes: #706456) |
1370 | + |
1371 | + -- Kartik Mistry <kartik@debian.org> Wed, 01 May 2013 10:48:43 +0530 |
1372 | + |
1373 | +nginx (1.4.0-1) experimental; urgency=low |
1374 | + |
1375 | + [ Kartik Mistry ] |
1376 | + * New upstream release (Closes: #706127). |
1377 | + * debian/rules, debian/modules/: |
1378 | + + Removed chunkin-nginx-module as it no longer supported for nginx 1.3.9+ |
1379 | + + Updated nginx-lua module to 0.8.0 |
1380 | + + Patched nginx-upload module as described in modules/README file. |
1381 | + * Refreshed debian/patches/perl-use-dpkg-buildflags.patch |
1382 | + * debian/logrotate: |
1383 | + + Set default log to keep for 52 weeks instead of 52 days. Thanks to |
1384 | + RjY <rjy@users.sourceforge.net> for patch (Closes: #696440) |
1385 | + * debian/rules: |
1386 | + + Added cache purge module to nginx-extras. |
1387 | + * debian/control: |
1388 | + + Suggests: nginx-docs. Thanks to colliar <colliar4ever@aol.com> for |
1389 | + reporting bug (Closes: #702923) |
1390 | + * debian/copyright: |
1391 | + + Updated copyright year. |
1392 | + + Fixed broken license text. |
1393 | + |
1394 | + [ Michael Lustfield ] |
1395 | + * debian/conf/sites-available/default: |
1396 | + + Added ipv6_only=on to default server block. (Closes: #700857) |
1397 | + + Added default_server to ipv4 default server block. Now matches ipv6. |
1398 | + * debian/rules: |
1399 | + + Removed obsolete --with-md5 and --with-sha1 |
1400 | + |
1401 | + -- Kartik Mistry <kartik@debian.org> Thu, 25 Apr 2013 12:51:45 +0530 |
1402 | + |
1403 | nginx (1.2.6-1ubuntu4) saucy; urgency=low |
1404 | |
1405 | * debian/patches/ubuntu-branding.patch: Move Ubuntu branding from |
1406 | |
1407 | === added file 'debian/conf/naxsi-ui.conf' |
1408 | --- debian/conf/naxsi-ui.conf 1970-01-01 00:00:00 +0000 |
1409 | +++ debian/conf/naxsi-ui.conf 2013-05-11 11:28:27 +0000 |
1410 | @@ -0,0 +1,16 @@ |
1411 | +[nx_extract] |
1412 | +username = naxsi_web |
1413 | +password = test |
1414 | +port = 8081 |
1415 | +rules_path = /etc/nginx/naxsi_core.rules |
1416 | + |
1417 | +[nx_intercept] |
1418 | +port = 8080 |
1419 | + |
1420 | +[sql] |
1421 | +dbtype = sqlite |
1422 | +username = root |
1423 | +password = |
1424 | +hostname = 127.0.0.1 |
1425 | +dbname = naxsi_sig |
1426 | + |
1427 | |
1428 | === modified file 'debian/conf/sites-available/default' |
1429 | --- debian/conf/sites-available/default 2013-04-05 20:22:38 +0000 |
1430 | +++ debian/conf/sites-available/default 2013-05-11 11:28:27 +0000 |
1431 | @@ -18,7 +18,7 @@ |
1432 | ## |
1433 | |
1434 | server { |
1435 | - listen 80; |
1436 | + listen 80 default_server; |
1437 | listen [::]:80 default_server ipv6only=on; |
1438 | |
1439 | root /usr/share/nginx/html; |
1440 | |
1441 | === modified file 'debian/control' |
1442 | --- debian/control 2013-03-12 00:23:02 +0000 |
1443 | +++ debian/control 2013-05-11 11:28:27 +0000 |
1444 | @@ -23,7 +23,7 @@ |
1445 | libxslt1-dev, |
1446 | po-debconf, |
1447 | zlib1g-dev |
1448 | -Standards-Version: 3.9.3 |
1449 | +Standards-Version: 3.9.4 |
1450 | Homepage: http://nginx.net |
1451 | Vcs-Git: git://anonscm.debian.org/collab-maint/nginx.git |
1452 | Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/nginx.git;a=summary |
1453 | @@ -64,6 +64,7 @@ |
1454 | nginx-extras (<< 0.8.54-4), |
1455 | nginx-full (<< 0.8.54-4), |
1456 | nginx-light (<< 0.8.54-4) |
1457 | +Suggests: nginx-doc, fcgiwrap |
1458 | Description: small, powerful, scalable web/proxy server - common files |
1459 | Nginx ("engine X") is a high-performance web and reverse proxy server |
1460 | created by Igor Sysoev. It can be used both as a standalone web server |
1461 | @@ -82,6 +83,7 @@ |
1462 | Conflicts: nginx-extras, |
1463 | nginx-light, |
1464 | nginx-naxsi |
1465 | +Suggests: nginx-doc (= ${source:Version}) |
1466 | Description: nginx web/proxy server (standard version) |
1467 | Nginx ("engine X") is a high-performance web and reverse proxy server |
1468 | created by Igor Sysoev. It can be used both as a standalone web server |
1469 | @@ -102,7 +104,8 @@ |
1470 | . |
1471 | MAIL MODULES: Mail Core, IMAP, POP3, SMTP, SSL. |
1472 | . |
1473 | - THIRD PARTY MODULES: Auth PAM, DAV Ext, Echo, Upstream Fair Queue. |
1474 | + THIRD PARTY MODULES: Auth PAM, DAV Ext, Echo, HTTP Substitution Filter, |
1475 | + Upstream Fair Queue. |
1476 | |
1477 | Package: nginx-full-dbg |
1478 | Architecture: any |
1479 | @@ -132,6 +135,7 @@ |
1480 | Conflicts: nginx-extras, |
1481 | nginx-full, |
1482 | nginx-naxsi |
1483 | +Suggests: nginx-doc (= ${source:Version}) |
1484 | Description: nginx web/proxy server (basic version) |
1485 | Nginx ("engine X") is a high-performance web and reverse proxy server |
1486 | created by Igor Sysoev. It can be used both as a standalone web server |
1487 | @@ -177,6 +181,7 @@ |
1488 | Conflicts: nginx-full, |
1489 | nginx-light, |
1490 | nginx-naxsi |
1491 | +Suggests: nginx-doc (= ${source:Version}) |
1492 | Description: nginx web/proxy server (extended version) |
1493 | Nginx ("engine X") is a high-performance web and reverse proxy server |
1494 | created by Igor Sysoev. It can be used both as a standalone web server |
1495 | @@ -198,8 +203,9 @@ |
1496 | MAIL MODULES: Mail Core, IMAP, POP3, SMTP, SSL. |
1497 | . |
1498 | THIRD PARTY MODULES: Auth PAM, Chunkin, DAV Ext, Echo, Embedded Lua, |
1499 | - HttpHeadersMore, http push, Nginx Development Kit, Upload module, |
1500 | - Upload Progress, Upstream Fair Queue. |
1501 | + Fancy Index, HttpHeadersMore, HTTP Substitution Filter, http push, |
1502 | + Nginx Development Kit, Upload module, Upload Progress, |
1503 | + Upstream Fair Queue. |
1504 | |
1505 | Package: nginx-extras-dbg |
1506 | Architecture: any |
1507 | @@ -271,10 +277,8 @@ |
1508 | Depends: daemon, |
1509 | dbconfig-common, |
1510 | nginx-naxsi (>= ${source:Version}), |
1511 | - python-mysqldb, |
1512 | python-twisted-web, |
1513 | ${misc:Depends} |
1514 | -Recommends: mysql-server |
1515 | Provides: httpd, |
1516 | naxsi, |
1517 | nginx |
1518 | |
1519 | === modified file 'debian/copyright' |
1520 | --- debian/copyright 2012-10-30 10:10:34 +0000 |
1521 | +++ debian/copyright 2013-05-11 11:28:27 +0000 |
1522 | @@ -4,8 +4,8 @@ |
1523 | Upstream-Contact: Igor Sysoev <igor@sysoev.ru> |
1524 | |
1525 | Files: * |
1526 | -Copyright: 2002-2012 Igor Sysoev |
1527 | - 2011,2012 Nginx, Inc. |
1528 | +Copyright: 2002-2013 Igor Sysoev |
1529 | + 2011-2013 Nginx, Inc. |
1530 | License: |
1531 | Redistribution and use in source and binary forms, with or without |
1532 | modification, are permitted provided that the following conditions are met: |
1533 | @@ -25,88 +25,62 @@ |
1534 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
1535 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
1536 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
1537 | + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
1538 | |
1539 | Files: contrib/geo2nginx.pl |
1540 | Copyright: 2005, Andrei Nigmatulin |
1541 | License: |
1542 | Same as upstream license. |
1543 | |
1544 | -Files: modules/nginx-upstream-fair/ngx_http_upstream_fair_module.c |
1545 | +Files: debian/modules/nginx-upstream-fair/ngx_http_upstream_fair_module.c |
1546 | Copyright: 2007, Igor Sysoev, Grzegorz Nosek |
1547 | License: |
1548 | Same as upstream license. |
1549 | |
1550 | -Files: modules/nginx-development-kit/* |
1551 | +Files: debian/modules/nginx-development-kit/* |
1552 | Copyright: Marcus Clyne |
1553 | License: |
1554 | Same as upstream license. |
1555 | |
1556 | -Files: modules/nginx-http-push/* |
1557 | +Files: debian/modules/nginx-http-push/* |
1558 | Copyright: 2009, Leo Ponomarev |
1559 | License: |
1560 | Same as upstream license. |
1561 | |
1562 | -Files: modules/nginx-upload-progress/ngx_http_uploadprogress_module.c |
1563 | +Files: debian/modules/nginx-upload-progress/ngx_http_uploadprogress_module.c |
1564 | Copyright: 2007, Brice Figureau |
1565 | 2002-2007, Igor Sysoev |
1566 | License: |
1567 | Same as upstream license. |
1568 | |
1569 | -Files: modules/agentzh-chunkin-nginx-module-*/* |
1570 | - modules/agentzh-headers-more-nginx-module-*/* |
1571 | +Files: debian/modules/agentzh-chunkin-nginx-module-*/* |
1572 | + debian/modules/agentzh-headers-more-nginx-module-*/* |
1573 | Copyright: 2009, Taobao Inc., Alibaba Group <http://www.taobao.com>. |
1574 | 2009-2011, Zhang "agentzh" Yichun (章亦春) <agentzh@gmail.com>. |
1575 | License: |
1576 | Same as upstream license. |
1577 | |
1578 | -Files: modules/nginx-auth-pam/* |
1579 | +Files: debian/modules/nginx-auth-pam/* |
1580 | Copyright: 2008-2010, Sergio Talens Oliag <sto@iti.upv.es> |
1581 | License: |
1582 | Same as upstream license. |
1583 | |
1584 | -Files: modules/nginx-cache-purge |
1585 | +Files: debian/modules/nginx-cache-purge |
1586 | Copyright: 2009-2011, FRiCKLE <info@frickle.com>, |
1587 | 2009-2011, Piotr Sikora <piotr.sikora@frickle.com> |
1588 | License: |
1589 | Same as upstream license. |
1590 | |
1591 | -Files: modules/nginx-dav-ext-module |
1592 | +Files: debian/modules/nginx-dav-ext-module |
1593 | Copyright: 2012, Arutyunyan Roman <arut@qip.ru> |
1594 | License: |
1595 | Same as upstream license. |
1596 | |
1597 | -Files: modules/nginx-upload-module |
1598 | -Copyright: 2006, 2008, Valery Kholodkov |
1599 | -License: |
1600 | - All rights reserved. |
1601 | - . |
1602 | - Redistribution and use in source and binary forms, with or without |
1603 | - modification, are permitted provided that the following conditions are met: |
1604 | - * Redistributions of source code must retain the above copyright |
1605 | - notice, this list of conditions and the following disclaimer. |
1606 | - * Redistributions in binary form must reproduce the above copyright |
1607 | - notice, this list of conditions and the following disclaimer in the |
1608 | - documentation and/or other materials provided with the distribution. |
1609 | - * Neither the name of the Valery Kholodkov nor the |
1610 | - names of its contributors may be used to endorse or promote products |
1611 | - derived from this software without specific prior written permission. |
1612 | - . |
1613 | - THIS SOFTWARE IS PROVIDED BY VALERY KHOLODKOV ''AS IS'' AND ANY |
1614 | - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
1615 | - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
1616 | - DISCLAIMED. IN NO EVENT SHALL VALERY KHOLODKOV BE LIABLE FOR ANY |
1617 | - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
1618 | - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
1619 | - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
1620 | - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
1621 | - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
1622 | - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
1623 | - |
1624 | -Files: modules/naxsi |
1625 | +Files: debian/modules/naxsi |
1626 | Copyright: 2012, Thibault Koechlin |
1627 | License: GPL-2+ with OpenSSL exception |
1628 | |
1629 | -Files: modules/naxsi/contrib/fp-reporter/fp-reporter.php |
1630 | +Files: debian/modules/naxsi/contrib/fp-reporter/fp-reporter.php |
1631 | Copyright: 2011, Thibault 'bui' Koechlin, Didier Conchaudron |
1632 | License: GPL-2+ with OpenSSL exception |
1633 | |
1634 | @@ -145,9 +119,9 @@ |
1635 | Files: debian/* |
1636 | Copyright: 2006-2010, Jose Parrella <joseparrella@cantv.net>, |
1637 | Fabio Tranchitella <kobold@debian.org>, |
1638 | - 2009-2012, Kartik Mistry <kartik@debian.org>, |
1639 | - 2012, Michael Lustfield <michael@lustfield.net>, |
1640 | - Dmitry E. Oboukhov <unera@debian.org>, |
1641 | - Cyril Lavier <cyril.lavier@davromaniak.eu>. |
1642 | + 2009-2013, Kartik Mistry <kartik@debian.org>, |
1643 | + 2012-2013, Michael Lustfield <michael@lustfield.net>, |
1644 | + Dmitry E. Oboukhov <unera@debian.org>, |
1645 | + Cyril Lavier <cyril.lavier@davromaniak.eu>. |
1646 | License: |
1647 | Same as upstream license. |
1648 | |
1649 | === modified file 'debian/logrotate' |
1650 | --- debian/logrotate 2012-10-30 10:10:34 +0000 |
1651 | +++ debian/logrotate 2013-05-11 11:28:27 +0000 |
1652 | @@ -1,5 +1,5 @@ |
1653 | /var/log/nginx/*.log { |
1654 | - daily |
1655 | + weekly |
1656 | missingok |
1657 | rotate 52 |
1658 | compress |
1659 | |
1660 | === modified file 'debian/modules/README.Modules-versions' |
1661 | --- debian/modules/README.Modules-versions 2012-12-18 10:29:18 +0000 |
1662 | +++ debian/modules/README.Modules-versions 2013-05-11 11:28:27 +0000 |
1663 | @@ -4,10 +4,6 @@ |
1664 | This file lists third party modules built with nginx in Debian, homepage and |
1665 | version. |
1666 | |
1667 | - chunkin-nginx-module |
1668 | - https://github.com/agentzh/chunkin-nginx-module |
1669 | - Version: v0.23rc2-3-g85eca98 |
1670 | - |
1671 | headers-more-nginx-module |
1672 | https://github.com/agentzh/headers-more-nginx-module |
1673 | Version: v0.19 |
1674 | @@ -22,12 +18,12 @@ |
1675 | |
1676 | nginx-echo |
1677 | https://github.com/agentzh/echo-nginx-module |
1678 | - Version: v0.41 |
1679 | + Version: v0.45 |
1680 | |
1681 | nginx-lua |
1682 | Homepage: https://github.com/chaoslawful/lua-nginx-module |
1683 | https://github.com/chaoslawful/lua-nginx-module.git |
1684 | - Version: v0.7.8 |
1685 | + Version: v0.8.0 |
1686 | |
1687 | nginx-upstream-fair |
1688 | Homepage: https://github.com/gnosek/nginx-upstream-fair |
1689 | @@ -38,9 +34,10 @@ |
1690 | http://pushmodule.slact.net/downloads/nginx_http_push_module-0.692.tar.gz |
1691 | Version: 0.692 |
1692 | |
1693 | - nginx-upload |
1694 | - Homepage: https://github.com/vkholodkov/nginx-upload-module |
1695 | - Version: 2.2.0 |
1696 | + #Removed as it no longer works with 1.3.x and above. |
1697 | + #nginx-upload |
1698 | + # Homepage: https://github.com/vkholodkov/nginx-upload-module |
1699 | + # Version: 2.2.0 + Patch for: https://github.com/vkholodkov/nginx-upload-module/issues/45 |
1700 | |
1701 | nginx-upload-progress |
1702 | Homepage: https://github.com/masterzen/nginx-upload-progress-module |
1703 | @@ -50,12 +47,20 @@ |
1704 | |
1705 | naxsi |
1706 | Homepage: http://code.google.com/p/naxsi/ |
1707 | - Version: 0.48 |
1708 | + Version: 0.50 |
1709 | |
1710 | nginx-cache-purge |
1711 | Homepage: http://labs.frickle.com/nginx_ngx_cache_purge/ |
1712 | - Version: 2.0 |
1713 | + Version: 2.1 |
1714 | |
1715 | nginx-dav-ext-module |
1716 | Homepage: https://github.com/arut/nginx-dav-ext-module |
1717 | Version: v0.0.2-2-g54cebc1.tar.gz |
1718 | + |
1719 | + ngx-fancyindex |
1720 | + Homepage: https://github.com/aperezdc/ngx-fancyindex |
1721 | + Version: fd3950172a |
1722 | + |
1723 | + ngx_http_substitutions_filter_module |
1724 | + Homepage: https://github.com/yaoweibin/ngx_http_substitutions_filter_module |
1725 | + Version: 0573ab3b59 |
1726 | |
1727 | === removed directory 'debian/modules/chunkin-nginx-module' |
1728 | === removed file 'debian/modules/chunkin-nginx-module/NginxHttpChunkinModule.wiki' |
1729 | --- debian/modules/chunkin-nginx-module/NginxHttpChunkinModule.wiki 2011-11-24 14:16:50 +0000 |
1730 | +++ debian/modules/chunkin-nginx-module/NginxHttpChunkinModule.wiki 1970-01-01 00:00:00 +0000 |
1731 | @@ -1,412 +0,0 @@ |
1732 | -= Name = |
1733 | - |
1734 | -'''chunkin-nginx-module''' - HTTP 1.1 chunked-encoding request body support for Nginx. |
1735 | - |
1736 | -''This module is not distributed with the Nginx source.'' See [[#Installation|the installation instructions]]. |
1737 | - |
1738 | -= Status = |
1739 | - |
1740 | -This module is considered production ready. |
1741 | - |
1742 | -= Version = |
1743 | - |
1744 | -This document describes chunkin-nginx-module [http://github.com/agentzh/chunkin-nginx-module/tarball/v0.21 v0.21] released on August 3, 2010. |
1745 | - |
1746 | -= Synopsis = |
1747 | - |
1748 | -<geshi lang="nginx"> |
1749 | - chunkin on; |
1750 | - |
1751 | - error_page 411 = @my_411_error; |
1752 | - location @my_411_error { |
1753 | - chunkin_resume; |
1754 | - } |
1755 | - |
1756 | - location /foo { |
1757 | - # your fastcgi_pass/proxy_pass/set/if and |
1758 | - # any other config directives go here... |
1759 | - } |
1760 | - ... |
1761 | -</geshi> |
1762 | - |
1763 | -<geshi lang="nginx"> |
1764 | - chunkin on; |
1765 | - |
1766 | - error_page 411 = @my_411_error; |
1767 | - location @my_411_error { |
1768 | - chunkin_resume; |
1769 | - } |
1770 | - |
1771 | - location /bar { |
1772 | - chunkin_keepalive on; # WARNING: too experimental! |
1773 | - |
1774 | - # your fastcgi_pass/proxy_pass/set/if and |
1775 | - # any other config directives go here... |
1776 | - } |
1777 | -</geshi> |
1778 | - |
1779 | -= Description = |
1780 | - |
1781 | -This module adds [http://tools.ietf.org/html/rfc2616#section-3.6.1 HTTP 1.1 chunked] input support for Nginx without the need of patching the Nginx core. |
1782 | - |
1783 | -Behind the scene, it registers an access-phase handler that will eagerly read and decode incoming request bodies when a <code>Transfer-Encoding: chunked</code> header triggers a <code>411</code> error page in Nginx. For requests that are not in the <code>chunked</code> transfer encoding, this module is a "no-op". |
1784 | - |
1785 | -To enable the magic, just turn on the [[#chunkin|chunkin]] config option and define a custom <code>411 error_page</code> using [[#chunkin_resume|chunkin_resume]], like this: |
1786 | - |
1787 | -<geshi lang="nginx"> |
1788 | - server { |
1789 | - chunkin on; |
1790 | - |
1791 | - error_page 411 = @my_411_error; |
1792 | - location @my_411_error { |
1793 | - chunkin_resume; |
1794 | - } |
1795 | - |
1796 | - ... |
1797 | - } |
1798 | -</geshi> |
1799 | - |
1800 | -No other modification is required in your nginx.conf file and everything should work out of the box including the standard [[NginxHttpProxyModule|proxy module]] (except for those [[#Known Issues|known issues]]). Note that the [[#chunkin|chunkin]] directive is not allowed in the location block while the [[#chunkin_resume|chunkin_resume]] directive is only allowed on in <code>locations</code>. |
1801 | - |
1802 | -The core module's [[NginxHttpCoreModule#client_body_buffer_size|client_body_buffer_size]], [[NginxHttpCoreModule#client_max_body_size|client_max_body_size]], and [[NginxHttpCoreModule#client_body_timeout|client_body_timeout]] directive settings are honored. Note that, the "body sizes" here always indicate chunked-encoded body, not the data that has already been decoded. Basically, the |
1803 | -chunked-encoded body will always be slightly larger than the original data that is not encoded. |
1804 | - |
1805 | -The [[NginxHttpCoreModule#client_body_in_file_only|client_body_in_file_only]] and [[NginxHttpCoreModule#client_body_in_single_buffer|client_body_in_single_buffer]] settings are followed partially. See [[#Known Issues|Know Issues]]. |
1806 | - |
1807 | -This module is not supposed to be merged into the Nginx core because I've used [http://www.complang.org/ragel/ Ragel] to generate the chunked encoding parser for joy :) |
1808 | - |
1809 | -== How it works == |
1810 | - |
1811 | -Nginx explicitly checks chunked <code>Transfer-Encoding</code> headers and absent content length header in its very |
1812 | -early phase. Well, as early as the <code>ngx_http_process_request_header</code> |
1813 | -function. So this module takes a rather tricky approach. That is, use an output filter to intercept the <code>411 Length Required</code> error page response issued by <code>ngx_http_process_request_header</code>, |
1814 | -fix things and finally issue an internal redirect to the current location, |
1815 | -thus starting from those phases we all know and love, this time |
1816 | -bypassing the horrible <code>ngx_http_process_request_header</code> function. |
1817 | - |
1818 | -In the <code>rewrite</code> phase of the newly created request, this module eagerly reads in the chunked request body in a way similar to that of the standard <code>ngx_http_read_client_request_body</code> function, but using its own chunked parser generated by Ragel. The decoded request body will be put into <code>r->request_body->bufs</code> and a corresponding <code>Content-Length</code> header will be inserted into <code>r->headers_in</code>. |
1819 | - |
1820 | -Those modules using the standard <code>ngx_http_read_client_request_body</code> function to read the request body will just work out of box because <code>ngx_http_read_client_request_body</code> returns immediately when it sees <code>r->request_body->bufs</code> already exists. |
1821 | - |
1822 | -Special efforts have been made to reduce data copying and dynamic memory allocation. |
1823 | - |
1824 | -= Directives = |
1825 | - |
1826 | -== chunkin == |
1827 | -'''syntax:''' ''chunkin on|off'' |
1828 | - |
1829 | -'''default:''' ''off'' |
1830 | - |
1831 | -'''context:''' ''http, server'' |
1832 | - |
1833 | -Enables or disables this module's hooks. |
1834 | - |
1835 | -== chunkin_resume == |
1836 | -'''syntax:''' ''chunkin_resume'' |
1837 | - |
1838 | -'''default:''' ''none'' |
1839 | - |
1840 | -'''context:''' ''location'' |
1841 | - |
1842 | -This directive must be used in your custom <code>411 error page</code> location to help this module work correctly. For example: |
1843 | - |
1844 | -<geshi lang="nginx"> |
1845 | - error_page 411 = @my_error; |
1846 | - location @my_error { |
1847 | - chunkin_resume; |
1848 | - } |
1849 | -</geshi> |
1850 | - |
1851 | -For the technical reason behind the necessity of this directive, please read the <code>nginx-devel</code> thread [http://nginx.org/pipermail/nginx-devel/2009-December/000041.html Content-Length is not ignored for chunked requests: Nginx violates RFC 2616]. |
1852 | - |
1853 | -This directive was first introduced in the [[#v0.17|v0.17]] release. |
1854 | - |
1855 | -== chunkin_max_chunks_per_buf == |
1856 | -'''syntax:''' ''chunkin_max_chunks_per_buf <number>'' |
1857 | - |
1858 | -'''default:''' ''512'' |
1859 | - |
1860 | -'''context:''' ''http, server, location'' |
1861 | - |
1862 | -Set the max chunk count threshold for the buffer determined by the [[NginxHttpCoreModule#client_body_buffer_size|client_body_buffer_size]] directive. |
1863 | -If the average chunk size is <code>1 KB</code> and your [[NginxHttpCoreModule#client_body_buffer_size|client_body_buffer_size]] setting |
1864 | -is 1 meta bytes, then you should set this threshold to <code>1024</code> or <code>2048</code>. |
1865 | - |
1866 | -When the raw body size is exceeding [[NginxHttpCoreModule#client_body_buffer_size|client_body_buffer_size]] ''or'' the chunk counter is exceeding this <code>chunkin_max_chunks_per_buf</code> setting, the decoded data will be temporarily buffered into disk files, and then the main buffer gets cleared and the chunk counter gets reset back to 0 (or <code>1</code> if there's a "pending chunk"). |
1867 | - |
1868 | -This directive was first introduced in the [[#v0.17|v0.17]] release. |
1869 | - |
1870 | -== chunkin_keepalive == |
1871 | -'''syntax:''' ''chunkin_keepalive on|off'' |
1872 | - |
1873 | -'''default:''' ''off'' |
1874 | - |
1875 | -'''context:''' ''http, server, location, if'' |
1876 | - |
1877 | -Turns on or turns off HTTP 1.1 keep-alive and HTTP 1.1 pipelining support. |
1878 | - |
1879 | -Keep-alive without pipelining should be quite stable but pipelining support is very preliminary, limited, and almost untested. |
1880 | - |
1881 | -This directive was first introduced in the [[#v0.07|v0.07 release]]. |
1882 | - |
1883 | -'''Technical note on the HTTP 1.1 pipeling support''' |
1884 | - |
1885 | -The basic idea is to copy the bytes left by my chunked parser in |
1886 | -<code>r->request_body->buf</code> over into <code>r->header_in</code> so that nginx's |
1887 | -<code>ngx_http_set_keepalive</code> and <code>ngx_http_init_request</code> functions will pick |
1888 | -it up for the subsequent pipelined requests. When the request body is |
1889 | -small enough to be completely preread into the <code>r->header_in</code> buffer, |
1890 | -then no data copy is needed here -- just setting <code>r->header_in->pos</code> |
1891 | -correctly will suffice. |
1892 | - |
1893 | -The only issue that remains is how to enlarge <code>r->header_in</code> when the |
1894 | -data left in <code>r->request_body->buf</code> is just too large to be hold in the |
1895 | -remaining room between <code>r->header_in->pos</code> and <code>r->header_in->end</code>. For |
1896 | -now, this module will just give up and simply turn off <code>r->keepalive</code>. |
1897 | - |
1898 | -I know we can always use exactly the remaining room in <code>r->header_in</code> as |
1899 | -the buffer size when reading data from <code>c->recv</code>, but's suboptimal when |
1900 | -the remaining room in <code>r->header_in</code> happens to be very small while |
1901 | -<code>r->request_body->buf</code> is quite large. |
1902 | - |
1903 | -I haven't fully grokked all the details among <code>r->header_in</code>, <code>c->buffer</code>, |
1904 | -busy/free lists and those so-called "large header buffers". Is there a |
1905 | -clean and safe way to reallocate or extend the <code>r->header_in</code> buffer? |
1906 | - |
1907 | -= Trouble Shooting = |
1908 | - |
1909 | -When combining this module with ngx_proxy and ngx_fastcgi, nginx sends a "Transfer-Encoding: " header which is invalid and not being treated well by some webservers on backend, for example, riak. So a work-around for now is to use the [http://wiki.nginx.org/NginxHttpHeadersMoreModule ngx_headers_more] module to remove the <code>Transfer-Encoding</code> completely, as in |
1910 | - |
1911 | -<geshi lang="nginx"> |
1912 | -chunkin on; |
1913 | - |
1914 | -error_page 411 = @my_411_error; |
1915 | - location @my_411_error { |
1916 | - chunkin_resume; |
1917 | -} |
1918 | - |
1919 | -location / { |
1920 | - more_clear_input_headers 'Transfer-Encoding'; |
1921 | - proxy_pass http://riak; |
1922 | -} |
1923 | -</geshi> |
1924 | - |
1925 | -Thanks [http://github.com/hoodoos hoodoos] for sharing this trick :) |
1926 | - |
1927 | -= Installation = |
1928 | - |
1929 | -Grab the nginx source code from [http://nginx.net/ nginx.net], for example, |
1930 | -the version 0.8.41 (see [[#Compatibility|nginx compatibility]]), and then build the source with this module: |
1931 | - |
1932 | -<geshi lang="bash"> |
1933 | - $ wget 'http://sysoev.ru/nginx/nginx-0.8.41.tar.gz' |
1934 | - $ tar -xzvf nginx-0.8.41.tar.gz |
1935 | - $ cd nginx-0.8.41/ |
1936 | - |
1937 | - # Here we assume you would install you nginx under /opt/nginx/. |
1938 | - $ ./configure --prefix=/opt/nginx \ |
1939 | - --add-module=/path/to/chunkin-nginx-module |
1940 | - |
1941 | - $ make -j2 |
1942 | - $ make install |
1943 | -</geshi> |
1944 | - |
1945 | -Download the latest version of the release tarball of this module from [http://github.com/agentzh/chunkin-nginx-module/downloads chunkin-nginx-module file list]. |
1946 | - |
1947 | -== For Developers == |
1948 | - |
1949 | -The chunked parser is generated by [http://www.complang.org/ragel/ Ragel]. If you want to |
1950 | -regenerate the parser's C file, i.e., [http://github.com/agentzh/chunkin-nginx-module/blob/master/src/chunked_parser.c src/chunked_parser.c], use |
1951 | -the following command from the root of the chunkin module's source tree: |
1952 | - |
1953 | -<geshi lang="bash"> |
1954 | - $ ragel -G2 src/chunked_parser.rl |
1955 | -</geshi> |
1956 | - |
1957 | -= Packages from users = |
1958 | - |
1959 | -== Fedora 13 RPM files == |
1960 | - |
1961 | -The following source and binary rpm files are contributed by Ernest Folch, with nginx 0.8.54, ngx_chunkin v0.21 and ngx_headers_more v0.13: |
1962 | - |
1963 | -* [http://agentzh.org/misc/nginx/ernest/nginx-0.8.54-1.fc13.src.rpm nginx-0.8.54-1.fc13.src.rpm] |
1964 | -* [http://agentzh.org/misc/nginx/ernest/nginx-0.8.54-1.fc13.x86_64.rpm nginx-0.8.54-1.fc13.x86_64.rpm] |
1965 | - |
1966 | -= Compatibility = |
1967 | - |
1968 | -The following versions of Nginx should work with this module: |
1969 | - |
1970 | -* '''1.0.x''' (last tested: 1.0.2) |
1971 | -* '''0.8.x''' (last tested: 0.8.54) |
1972 | -* '''0.7.x >= 0.7.21''' (last tested: 0.7.67) |
1973 | - |
1974 | -Earlier versions of Nginx like 0.6.x and 0.5.x will ''not'' work. |
1975 | - |
1976 | -If you find that any particular version of Nginx above 0.7.21 does not work with this module, please consider [[#Report Bugs|reporting a bug]]. |
1977 | - |
1978 | -= Report Bugs = |
1979 | - |
1980 | -Although a lot of effort has been put into testing and code tuning, there must be some serious bugs lurking somewhere in this module. So whenever you are bitten by any quirks, please don't hesitate to |
1981 | - |
1982 | -# send a bug report or even patches to <agentzh@gmail.com>, |
1983 | -# or create a ticket on the [http://github.com/agentzh/chunkin-nginx-module/issues issue tracking interface] provided by GitHub. |
1984 | - |
1985 | -= Source Repository = |
1986 | - |
1987 | -Available on github at [http://github.com/agentzh/chunkin-nginx-module agentzh/chunkin-nginx-module]. |
1988 | - |
1989 | -= ChangeLog = |
1990 | - |
1991 | -== v0.21 == |
1992 | -* applied a patch from Gong Kaihui (龚开晖) to always call <code>post_handler</code> in <code>ngx_http_chunkin_read_chunked_request_body</code>. |
1993 | - |
1994 | -== v0.20 == |
1995 | -* fixed a bug that may read incomplete chunked body. thanks Gong Kaihui (龚开晖). |
1996 | -* fixed various memory issues in the implementation which may cause nginx processes to crash. |
1997 | -* added support for chunked PUT requests. |
1998 | -* now we always require "error_page 411 @resume" and no default (buggy) magic any more. thanks Gong Kaihui (龚开晖). |
1999 | - |
2000 | -== v0.19 == |
2001 | -* we now use ragel -G2 to generate the chunked parser and we're 36% faster. |
2002 | -* we now eagerly read the data octets in the chunked parser and we're 43% faster. |
2003 | - |
2004 | -== v0.18 == |
2005 | -* added support for <code>chunk-extension</code> to the chunked parser as per [http://tools.ietf.org/html/rfc2616#section-3.6.1 RFC 2616], but we just ignore them (if any) because we don't understand them. |
2006 | -* added more diagnostic information for certian error messages. |
2007 | - |
2008 | -== v0.17 == |
2009 | -* implemented the [[#chunkin_max_chunks_per_buf|chunkin_max_chunks_per_buf]] directive to allow overriding the default <code>512</code> setting. |
2010 | -* we now bypass nginx's [http://nginx.org/pipermail/nginx-devel/2009-December/000041.html discard requesty body bug] by requiring our users to define explicit <code>411 error_page</code> with [[#chunkin_resume|chunkin_resume]] in the error page location. Thanks J for reporting related bugs. |
2011 | -* fixed <code>r->phase_handler</code> in our post read handler. our handler may run one more time before :P |
2012 | -* the chunkin handler now returns <code>NGX_DECLINED</code> rather than <code>NGX_OK</code> when our <code>ngx_http_chunkin_read_chunked_request_body</code> function returns <code>NGX_OK</code>, to avoid bypassing other access-phase handlers. |
2013 | - |
2014 | -== v0.16 == |
2015 | -* turned off ddebug in the previous release. thanks J for reporting it. |
2016 | - |
2017 | -== v0.15 == |
2018 | -* fixed a regression that ctx->chunks_count never incremented in earlier versions. |
2019 | - |
2020 | -== v0.14 == |
2021 | -* now we no longer skip those operations between the (interrupted) ngx_http_process_request_header and the server rewrite phase. this fixed the security issues regarding the [[NginxHttpCoreModule#internal|internal]] directive as well as SSL sessions. |
2022 | -* try to ignore CR/LF/SP/HT at the begining of the chunked body. |
2023 | -* now we allow HT as padding spaces and ignore leading CRLFs. |
2024 | -* improved diagnostic info in the error.log messages when parsefail occurs. |
2025 | - |
2026 | -== v0.11 == |
2027 | -* added a random valid-chunked-request generator in t/random.t. |
2028 | -* fixed a new connection leak issue caught by t/random.t. |
2029 | - |
2030 | -== v0.10 == |
2031 | -* fixed a serious bug in the chunked parser grammer: there would be ambiguity when CRLF appears in the chunked data sections. Thanks J for reporting it. |
2032 | - |
2033 | -== v0.08 == |
2034 | -* fixed gcc compilation errors on x86_64, thanks J for reporting it. |
2035 | -* used the latest Ragel 6.6 to generate the <code>chunked_parser.c</code> file in the source tree. |
2036 | - |
2037 | -== v0.07 == |
2038 | - |
2039 | -* marked the disgarded 411 error page's output chain bufs as consumed by setting <code>buf->pos = buf->last</code>. (See [http://nginx.org/pipermail/nginx-devel/2009-December/000025.html this nginx-devel thread] for more details.) |
2040 | -* added the [[#chunkin_keepalive|chunkin_keepalive]] directive which can enable HTTP 1.1 keep-alive and HTTP 1.1 pipelining, and defaults to <code>off</code>. |
2041 | -* fixed the <code>alphtype</code> bug in the Ragel parser spec; which caused rejection of non-ascii octets in the chunked data. Thanks J for his bug report. |
2042 | -* added <code>Test::Nginx::Socket</code> to test our nginx module on the socket level. Thanks J for his bug report. |
2043 | -* rewrote the bufs recycling part and preread-buf-to-rb-buf transition part, also refactored the Ragel parser spec, thus eliminating lots of serious bugs. |
2044 | -* provided better diagnostics in the error log message for "bad chunked body" parsefails in the chunked parser. For example: |
2045 | - |
2046 | -<geshi lang="log"> |
2047 | - 2009/12/02 17:35:52 [error] 32244#0: *1 bad chunked body (offset 7, near "4^M |
2048 | - hell <-- HERE o^M |
2049 | - 0^M |
2050 | - ^M |
2051 | - ", marked by " <-- HERE "). |
2052 | - , client: 127.0.0.1, server: localhost, request: "POST /main |
2053 | -HTTP/1.1", host: "localhost" |
2054 | -</geshi> |
2055 | - |
2056 | -* added some code to let the chunked parser handle special 0-size chunks that are not the last chunk. |
2057 | -* fixed a connection leak bug regarding incorrect <code>r->main->count</code> reference counter handling for nginx 0.8.11+ (well, the <code>ngx_http_read_client_request_body</code> function in the nginx core also has this issue, I'll report it later.) |
2058 | - |
2059 | -== v0.06 == |
2060 | -* minor optimization: we won't traverse the output chain link if the chain count is not large enough. |
2061 | - |
2062 | -= Test Suite = |
2063 | - |
2064 | -This module comes with a Perl-driven test suite. The [http://github.com/agentzh/chunkin-nginx-module/tree/master/test/t/ test cases] are |
2065 | -[http://github.com/agentzh/chunkin-nginx-module/blob/master/test/t/sanity.t declarative] too. Thanks to the [http://search.cpan.org/perldoc?Test::Base Test::Base] module in the Perl world. |
2066 | - |
2067 | -To run it on your side: |
2068 | - |
2069 | -<geshi lang="bash"> |
2070 | - $ cd test |
2071 | - $ PATH=/path/to/your/nginx-with-chunkin-module:$PATH prove -r t |
2072 | -</geshi> |
2073 | - |
2074 | -You need to terminate any Nginx processes before running the test suite if you have changed the Nginx server binary. |
2075 | - |
2076 | -At the moment, [http://search.cpan.org/perldoc?LWP::UserAgent LWP::UserAgent] is used by the [http://github.com/agentzh/chunkin-nginx-module/blob/master/test/lib/Test/Nginx/LWP.pm test scaffold] for simplicity. |
2077 | - |
2078 | -Because a single nginx server (by default, <code>localhost:1984</code>) is used across all the test scripts (<code>.t</code> files), it's meaningless to run the test suite in parallel by specifying <code>-jN</code> when invoking the <code>prove</code> utility. |
2079 | - |
2080 | -Some parts of the test suite requires modules [[NginxHttpProxyModule|proxy]] and [[NginxHttpEchoModule|echo]] to be enabled as well when building Nginx. |
2081 | - |
2082 | -= Known Issues = |
2083 | - |
2084 | -* May not work with certain 3rd party modules like the [http://www.grid.net.ru/nginx/upload.en.html upload module] because it implements its own request body reading mechanism. |
2085 | -* "client_body_in_single_buffer on" may *not* be obeyed for short contents and fast network. |
2086 | -* "client_body_in_file_only on" may *not* be obeyed for short contents and fast network. |
2087 | -* HTTP 1.1 pipelining may not fully work yet. |
2088 | - |
2089 | -= TODO = |
2090 | - |
2091 | -* make the chunkin handler run at the end of the <code>access phase</code> rather than beginning. |
2092 | -* add support for <code>trailers</code> as specified in the [http://tools.ietf.org/html/rfc2616#section-3.6.1 RFC 2616]. |
2093 | -* fix the [[#Known Issues|known issues]]. |
2094 | - |
2095 | -= Getting involved = |
2096 | - |
2097 | -You'll be very welcomed to submit patches to the [[#Author|author]] or just ask for a commit bit to the [[#Source Repository|source repository]] on GitHub. |
2098 | - |
2099 | -= Author = |
2100 | - |
2101 | -agentzh (章亦春) ''<agentzh@gmail.com>'' |
2102 | - |
2103 | -This wiki page is also maintained by the author himself, and everybody is encouraged to improve this page as well. |
2104 | - |
2105 | -= Copyright & License = |
2106 | - |
2107 | -The basic client request body reading code is based on the <code>ngx_http_read_client_request_body</code> function and its utility functions in the Nginx 0.8.20 core. This part of code is copyrighted by Igor Sysoev. |
2108 | - |
2109 | -Copyright (c) 2009, Taobao Inc., Alibaba Group ( http://www.taobao.com ). |
2110 | - |
2111 | -Copyright (c) 2009, agentzh <agentzh@gmail.com>. |
2112 | - |
2113 | -This module is licensed under the terms of the BSD license. |
2114 | - |
2115 | -Redistribution and use in source and binary forms, with or without |
2116 | -modification, are permitted provided that the following conditions |
2117 | -are met: |
2118 | - |
2119 | -* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
2120 | -* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
2121 | -* Neither the name of the Taobao Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. |
2122 | - |
2123 | -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
2124 | -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
2125 | -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
2126 | -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
2127 | -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
2128 | -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED |
2129 | -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
2130 | -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
2131 | -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
2132 | -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
2133 | -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
2134 | - |
2135 | -= See Also = |
2136 | - |
2137 | -* The original thread on the Nginx mailing list that inspires this module's development: [http://forum.nginx.org/read.php?2,4453,20543 "'Content-Length' header for POSTs"]. |
2138 | -* The orginal announcement thread on the Nginx mailing list: [http://forum.nginx.org/read.php?2,22967 "The chunkin module: Experimental chunked input support for Nginx"]. |
2139 | -* The original [http://agentzh.spaces.live.com/blog/cns!FF3A735632E41548!481.entry blog post] about this module's initial development. |
2140 | -* The thread discussing chunked input support on the nginx-devel mailing list: [http://nginx.org/pipermail/nginx-devel/2009-December/000021.html "Chunked request body and HTTP header parser"]. |
2141 | -* The [[NginxHttpEchoModule|echo module]] for Nginx module's automated testing. |
2142 | -* [http://tools.ietf.org/html/rfc2616#section-3.6.1 RFC 2616 - Chunked Transfer Coding]. |
2143 | - |
2144 | |
2145 | === removed file 'debian/modules/chunkin-nginx-module/README' |
2146 | --- debian/modules/chunkin-nginx-module/README 2012-05-14 11:15:00 +0000 |
2147 | +++ debian/modules/chunkin-nginx-module/README 1970-01-01 00:00:00 +0000 |
2148 | @@ -1,542 +0,0 @@ |
2149 | -Name |
2150 | - ngx_chunkin - HTTP 1.1 chunked-encoding request body support for Nginx. |
2151 | - |
2152 | - *This module is not distributed with the Nginx source.* See the |
2153 | - installation instructions. |
2154 | - |
2155 | -Status |
2156 | - This module is considered production ready. |
2157 | - |
2158 | -Version |
2159 | - This document describes ngx_chunkin v0.23rc2 |
2160 | - (<http://github.com/agentzh/chunkin-nginx-module/tags>) released on |
2161 | - November 24, 2011. |
2162 | - |
2163 | -Synopsis |
2164 | - chunkin on; |
2165 | - |
2166 | - error_page 411 = @my_411_error; |
2167 | - location @my_411_error { |
2168 | - chunkin_resume; |
2169 | - } |
2170 | - |
2171 | - location /foo { |
2172 | - # your fastcgi_pass/proxy_pass/set/if and |
2173 | - # any other config directives go here... |
2174 | - } |
2175 | - ... |
2176 | - |
2177 | - chunkin on; |
2178 | - |
2179 | - error_page 411 = @my_411_error; |
2180 | - location @my_411_error { |
2181 | - chunkin_resume; |
2182 | - } |
2183 | - |
2184 | - location /bar { |
2185 | - chunkin_keepalive on; # WARNING: too experimental! |
2186 | - |
2187 | - # your fastcgi_pass/proxy_pass/set/if and |
2188 | - # any other config directives go here... |
2189 | - } |
2190 | - |
2191 | -Description |
2192 | - This module adds HTTP 1.1 chunked |
2193 | - (<http://tools.ietf.org/html/rfc2616#section-3.6.1>) input support for |
2194 | - Nginx without the need of patching the Nginx core. |
2195 | - |
2196 | - Behind the scene, it registers an access-phase handler that will eagerly |
2197 | - read and decode incoming request bodies when a "Transfer-Encoding: |
2198 | - chunked" header triggers a 411 error page in Nginx. For requests that |
2199 | - are not in the "chunked" transfer encoding, this module is a "no-op". |
2200 | - |
2201 | - To enable the magic, just turn on the chunkin config option and define a |
2202 | - custom "411 error_page" using chunkin_resume, like this: |
2203 | - |
2204 | - server { |
2205 | - chunkin on; |
2206 | - |
2207 | - error_page 411 = @my_411_error; |
2208 | - location @my_411_error { |
2209 | - chunkin_resume; |
2210 | - } |
2211 | - |
2212 | - ... |
2213 | - } |
2214 | - |
2215 | - No other modification is required in your nginx.conf file and everything |
2216 | - should work out of the box including the standard [module |
2217 | - (HttpProxyModule)] (except for those known issues). Note that the |
2218 | - chunkin directive is not allowed in the location block while the |
2219 | - chunkin_resume directive is only allowed on in "locations". |
2220 | - |
2221 | - The core module's client_body_buffer_size, client_max_body_size, and |
2222 | - client_body_timeout directive settings are honored. Note that, the "body |
2223 | - sizes" here always indicate chunked-encoded body, not the data that has |
2224 | - already been decoded. Basically, the chunked-encoded body will always be |
2225 | - slightly larger than the original data that is not encoded. |
2226 | - |
2227 | - The client_body_in_file_only and client_body_in_single_buffer settings |
2228 | - are followed partially. See Know Issues. |
2229 | - |
2230 | - This module is not supposed to be merged into the Nginx core because |
2231 | - I've used Ragel (<http://www.complang.org/ragel/>) to generate the |
2232 | - chunked encoding parser for joy :) |
2233 | - |
2234 | - How it works |
2235 | - Nginx explicitly checks chunked "Transfer-Encoding" headers and absent |
2236 | - content length header in its very early phase. Well, as early as the |
2237 | - "ngx_http_process_request_header" function. So this module takes a |
2238 | - rather tricky approach. That is, use an output filter to intercept the |
2239 | - "411 Length Required" error page response issued by |
2240 | - "ngx_http_process_request_header", fix things and finally issue an |
2241 | - internal redirect to the current location, thus starting from those |
2242 | - phases we all know and love, this time bypassing the horrible |
2243 | - "ngx_http_process_request_header" function. |
2244 | - |
2245 | - In the "rewrite" phase of the newly created request, this module eagerly |
2246 | - reads in the chunked request body in a way similar to that of the |
2247 | - standard "ngx_http_read_client_request_body" function, but using its own |
2248 | - chunked parser generated by Ragel. The decoded request body will be put |
2249 | - into "r->request_body->bufs" and a corresponding "Content-Length" header |
2250 | - will be inserted into "r->headers_in". |
2251 | - |
2252 | - Those modules using the standard "ngx_http_read_client_request_body" |
2253 | - function to read the request body will just work out of box because |
2254 | - "ngx_http_read_client_request_body" returns immediately when it sees |
2255 | - "r->request_body->bufs" already exists. |
2256 | - |
2257 | - Special efforts have been made to reduce data copying and dynamic memory |
2258 | - allocation. |
2259 | - |
2260 | -Directives |
2261 | - chunkin |
2262 | - syntax: *chunkin on|off* |
2263 | - |
2264 | - default: *off* |
2265 | - |
2266 | - context: *http, server* |
2267 | - |
2268 | - phase: *access* |
2269 | - |
2270 | - Enables or disables this module's hooks. |
2271 | - |
2272 | - chunkin_resume |
2273 | - syntax: *chunkin_resume* |
2274 | - |
2275 | - default: *no* |
2276 | - |
2277 | - context: *location* |
2278 | - |
2279 | - phase: *content* |
2280 | - |
2281 | - This directive must be used in your custom "411 error page" location to |
2282 | - help this module work correctly. For example: |
2283 | - |
2284 | - error_page 411 = @my_error; |
2285 | - location @my_error { |
2286 | - chunkin_resume; |
2287 | - } |
2288 | - |
2289 | - For the technical reason behind the necessity of this directive, please |
2290 | - read the "nginx-devel" thread Content-Length is not ignored for chunked |
2291 | - requests: Nginx violates RFC 2616 |
2292 | - (<http://nginx.org/pipermail/nginx-devel/2009-December/000041.html>). |
2293 | - |
2294 | - This directive was first introduced in the v0.17 release. |
2295 | - |
2296 | - chunkin_max_chunks_per_buf |
2297 | - syntax: *chunkin_max_chunks_per_buf <number>* |
2298 | - |
2299 | - default: *512* |
2300 | - |
2301 | - context: *http, server, location* |
2302 | - |
2303 | - Set the max chunk count threshold for the buffer determined by the |
2304 | - client_body_buffer_size directive. If the average chunk size is "1 KB" |
2305 | - and your client_body_buffer_size setting is 1 meta bytes, then you |
2306 | - should set this threshold to 1024 or 2048. |
2307 | - |
2308 | - When the raw body size is exceeding client_body_buffer_size *or* the |
2309 | - chunk counter is exceeding this "chunkin_max_chunks_per_buf" setting, |
2310 | - the decoded data will be temporarily buffered into disk files, and then |
2311 | - the main buffer gets cleared and the chunk counter gets reset back to 0 |
2312 | - (or 1 if there's a "pending chunk"). |
2313 | - |
2314 | - This directive was first introduced in the v0.17 release. |
2315 | - |
2316 | - chunkin_keepalive |
2317 | - syntax: *chunkin_keepalive on|off* |
2318 | - |
2319 | - default: *off* |
2320 | - |
2321 | - context: *http, server, location, if* |
2322 | - |
2323 | - Turns on or turns off HTTP 1.1 keep-alive and HTTP 1.1 pipelining |
2324 | - support. |
2325 | - |
2326 | - Keep-alive without pipelining should be quite stable but pipelining |
2327 | - support is very preliminary, limited, and almost untested. |
2328 | - |
2329 | - This directive was first introduced in the v0.07 release. |
2330 | - |
2331 | - Technical note on the HTTP 1.1 pipeling support |
2332 | - |
2333 | - The basic idea is to copy the bytes left by my chunked parser in |
2334 | - "r->request_body->buf" over into "r->header_in" so that nginx's |
2335 | - "ngx_http_set_keepalive" and "ngx_http_init_request" functions will pick |
2336 | - it up for the subsequent pipelined requests. When the request body is |
2337 | - small enough to be completely preread into the "r->header_in" buffer, |
2338 | - then no data copy is needed here -- just setting "r->header_in->pos" |
2339 | - correctly will suffice. |
2340 | - |
2341 | - The only issue that remains is how to enlarge "r->header_in" when the |
2342 | - data left in "r->request_body->buf" is just too large to be hold in the |
2343 | - remaining room between "r->header_in->pos" and "r->header_in->end". For |
2344 | - now, this module will just give up and simply turn off "r->keepalive". |
2345 | - |
2346 | - I know we can always use exactly the remaining room in "r->header_in" as |
2347 | - the buffer size when reading data from "c->recv", but's suboptimal when |
2348 | - the remaining room in "r->header_in" happens to be very small while |
2349 | - "r->request_body->buf" is quite large. |
2350 | - |
2351 | - I haven't fully grokked all the details among "r->header_in", |
2352 | - "c->buffer", busy/free lists and those so-called "large header buffers". |
2353 | - Is there a clean and safe way to reallocate or extend the "r->header_in" |
2354 | - buffer? |
2355 | - |
2356 | -Installation |
2357 | - Grab the nginx source code from nginx.org (<http://nginx.org/>), for |
2358 | - example, the version 1.0.8 (see nginx compatibility), and then build the |
2359 | - source with this module: |
2360 | - |
2361 | - wget 'http://nginx.org/download/nginx-1.0.8.tar.gz' |
2362 | - tar -xzvf nginx-1.0.8.tar.gz |
2363 | - cd nginx-1.0.8/ |
2364 | - |
2365 | - # Here we assume you would install you nginx under /opt/nginx/. |
2366 | - ./configure --prefix=/opt/nginx \ |
2367 | - --add-module=/path/to/chunkin-nginx-module |
2368 | - |
2369 | - make -j2 |
2370 | - make install |
2371 | - |
2372 | - Download the latest version of the release tarball of this module from |
2373 | - chunkin-nginx-module file list |
2374 | - (<http://github.com/agentzh/chunkin-nginx-module/tags>). |
2375 | - |
2376 | - For Developers |
2377 | - The chunked parser is generated by Ragel |
2378 | - (<http://www.complang.org/ragel/>). If you want to regenerate the |
2379 | - parser's C file, i.e., src/chunked_parser.c |
2380 | - (<http://github.com/agentzh/chunkin-nginx-module/blob/master/src/chunked |
2381 | - _parser.c>), use the following command from the root of the chunkin |
2382 | - module's source tree: |
2383 | - |
2384 | - $ ragel -G2 src/chunked_parser.rl |
2385 | - |
2386 | -Packages from users |
2387 | - Fedora 13 RPM files |
2388 | - The following source and binary rpm files are contributed by Ernest |
2389 | - Folch, with nginx 0.8.54, ngx_chunkin v0.21 and ngx_headers_more v0.13: |
2390 | - |
2391 | - * nginx-0.8.54-1.fc13.src.rpm |
2392 | - (<http://agentzh.org/misc/nginx/ernest/nginx-0.8.54-1.fc13.src.rpm>) |
2393 | - |
2394 | - * nginx-0.8.54-1.fc13.x86_64.rpm |
2395 | - (<http://agentzh.org/misc/nginx/ernest/nginx-0.8.54-1.fc13.x86_64.rp |
2396 | - m>) |
2397 | - |
2398 | -Compatibility |
2399 | - The following versions of Nginx should work with this module: |
2400 | - |
2401 | - * 1.1.x (last tested: 1.1.5) |
2402 | - |
2403 | - * 1.0.x (last tested: 1.0.10) |
2404 | - |
2405 | - * 0.8.x (last tested: 0.8.54) |
2406 | - |
2407 | - * 0.7.x >= 0.7.21 (last tested: 0.7.67) |
2408 | - |
2409 | - Earlier versions of Nginx like 0.6.x and 0.5.x will *not* work. |
2410 | - |
2411 | - If you find that any particular version of Nginx above 0.7.21 does not |
2412 | - work with this module, please consider reporting a bug. |
2413 | - |
2414 | -Report Bugs |
2415 | - Although a lot of effort has been put into testing and code tuning, |
2416 | - there must be some serious bugs lurking somewhere in this module. So |
2417 | - whenever you are bitten by any quirks, please don't hesitate to |
2418 | - |
2419 | - 1. send a bug report or even patches to <agentzh@gmail.com>, |
2420 | - |
2421 | - 2. or create a ticket on the issue tracking interface |
2422 | - (<http://github.com/agentzh/chunkin-nginx-module/issues>) provided |
2423 | - by GitHub. |
2424 | - |
2425 | -Source Repository |
2426 | - Available on github at agentzh/chunkin-nginx-module |
2427 | - (<http://github.com/agentzh/chunkin-nginx-module>). |
2428 | - |
2429 | -ChangeLog |
2430 | - v0.22 |
2431 | - * now we remove the request header Transfer-Encoding completely |
2432 | - because at least Apache will complain about the empty-value |
2433 | - "Transfer-Encoding" request header. thanks hoodoos and Sandesh |
2434 | - Kotwal. |
2435 | - |
2436 | - * now we allow DELETE requests with chunked request bodies per |
2437 | - hoodoos's request. |
2438 | - |
2439 | - * now we use the 2-clause BSD license. |
2440 | - |
2441 | - v0.21 |
2442 | - * applied a patch from Gong Kaihui (龚开晖) to always call "post_handler" |
2443 | - in "ngx_http_chunkin_read_chunked_request_body". |
2444 | - |
2445 | - v0.20 |
2446 | - * fixed a bug that may read incomplete chunked body. thanks Gong |
2447 | - Kaihui (龚开晖). |
2448 | - |
2449 | - * fixed various memory issues in the implementation which may cause |
2450 | - nginx processes to crash. |
2451 | - |
2452 | - * added support for chunked PUT requests. |
2453 | - |
2454 | - * now we always require "error_page 411 @resume" and no default |
2455 | - (buggy) magic any more. thanks Gong Kaihui (龚开晖). |
2456 | - |
2457 | - v0.19 |
2458 | - * we now use ragel -G2 to generate the chunked parser and we're 36% |
2459 | - faster. |
2460 | - |
2461 | - * we now eagerly read the data octets in the chunked parser and we're |
2462 | - 43% faster. |
2463 | - |
2464 | - v0.18 |
2465 | - * added support for "chunk-extension" to the chunked parser as per RFC |
2466 | - 2616 (<http://tools.ietf.org/html/rfc2616#section-3.6.1>), but we |
2467 | - just ignore them (if any) because we don't understand them. |
2468 | - |
2469 | - * added more diagnostic information for certian error messages. |
2470 | - |
2471 | - v0.17 |
2472 | - * implemented the chunkin_max_chunks_per_buf directive to allow |
2473 | - overriding the default 512 setting. |
2474 | - |
2475 | - * we now bypass nginx's discard requesty body bug |
2476 | - (<http://nginx.org/pipermail/nginx-devel/2009-December/000041.html>) |
2477 | - by requiring our users to define explicit "411 error_page" with |
2478 | - chunkin_resume in the error page location. Thanks J for reporting |
2479 | - related bugs. |
2480 | - |
2481 | - * fixed "r->phase_handler" in our post read handler. our handler may |
2482 | - run one more time before :P |
2483 | - |
2484 | - * the chunkin handler now returns "NGX_DECLINED" rather than "NGX_OK" |
2485 | - when our "ngx_http_chunkin_read_chunked_request_body" function |
2486 | - returns "NGX_OK", to avoid bypassing other access-phase handlers. |
2487 | - |
2488 | - v0.16 |
2489 | - * turned off ddebug in the previous release. thanks J for reporting |
2490 | - it. |
2491 | - |
2492 | - v0.15 |
2493 | - * fixed a regression that ctx->chunks_count never incremented in |
2494 | - earlier versions. |
2495 | - |
2496 | - v0.14 |
2497 | - * now we no longer skip those operations between the (interrupted) |
2498 | - ngx_http_process_request_header and the server rewrite phase. this |
2499 | - fixed the security issues regarding the internal directive as well |
2500 | - as SSL sessions. |
2501 | - |
2502 | - * try to ignore CR/LF/SP/HT at the begining of the chunked body. |
2503 | - |
2504 | - * now we allow HT as padding spaces and ignore leading CRLFs. |
2505 | - |
2506 | - * improved diagnostic info in the error.log messages when parsefail |
2507 | - occurs. |
2508 | - |
2509 | - v0.11 |
2510 | - * added a random valid-chunked-request generator in t/random.t. |
2511 | - |
2512 | - * fixed a new connection leak issue caught by t/random.t. |
2513 | - |
2514 | - v0.10 |
2515 | - * fixed a serious bug in the chunked parser grammer: there would be |
2516 | - ambiguity when CRLF appears in the chunked data sections. Thanks J |
2517 | - for reporting it. |
2518 | - |
2519 | - v0.08 |
2520 | - * fixed gcc compilation errors on x86_64, thanks J for reporting it. |
2521 | - |
2522 | - * used the latest Ragel 6.6 to generate the "chunked_parser.c" file in |
2523 | - the source tree. |
2524 | - |
2525 | - v0.07 |
2526 | - * marked the disgarded 411 error page's output chain bufs as consumed |
2527 | - by setting "buf->pos = buf->last". (See this nginx-devel thread |
2528 | - (<http://nginx.org/pipermail/nginx-devel/2009-December/000025.html>) |
2529 | - for more details.) |
2530 | - |
2531 | - * added the chunkin_keepalive directive which can enable HTTP 1.1 |
2532 | - keep-alive and HTTP 1.1 pipelining, and defaults to "off". |
2533 | - |
2534 | - * fixed the "alphtype" bug in the Ragel parser spec; which caused |
2535 | - rejection of non-ascii octets in the chunked data. Thanks J for his |
2536 | - bug report. |
2537 | - |
2538 | - * added "Test::Nginx::Socket" to test our nginx module on the socket |
2539 | - level. Thanks J for his bug report. |
2540 | - |
2541 | - * rewrote the bufs recycling part and preread-buf-to-rb-buf transition |
2542 | - part, also refactored the Ragel parser spec, thus eliminating lots |
2543 | - of serious bugs. |
2544 | - |
2545 | - * provided better diagnostics in the error log message for "bad |
2546 | - chunked body" parsefails in the chunked parser. For example: |
2547 | - |
2548 | - 2009/12/02 17:35:52 [error] 32244#0: *1 bad chunked body (offset 7, near "4^M |
2549 | - hell <-- HERE o^M |
2550 | - 0^M |
2551 | - ^M |
2552 | - ", marked by " <-- HERE "). |
2553 | - , client: 127.0.0.1, server: localhost, request: "POST /main |
2554 | - HTTP/1.1", host: "localhost" |
2555 | - |
2556 | - * added some code to let the chunked parser handle special 0-size |
2557 | - chunks that are not the last chunk. |
2558 | - |
2559 | - * fixed a connection leak bug regarding incorrect "r->main->count" |
2560 | - reference counter handling for nginx 0.8.11+ (well, the |
2561 | - "ngx_http_read_client_request_body" function in the nginx core also |
2562 | - has this issue, I'll report it later.) |
2563 | - |
2564 | - v0.06 |
2565 | - * minor optimization: we won't traverse the output chain link if the |
2566 | - chain count is not large enough. |
2567 | - |
2568 | -Test Suite |
2569 | - This module comes with a Perl-driven test suite. The test cases |
2570 | - (<http://github.com/agentzh/chunkin-nginx-module/tree/master/test/t/>) |
2571 | - are declarative |
2572 | - (<http://github.com/agentzh/chunkin-nginx-module/blob/master/test/t/sani |
2573 | - ty.t>) too. Thanks to the Test::Base |
2574 | - (<http://search.cpan.org/perldoc?Test::Base>) module in the Perl world. |
2575 | - |
2576 | - To run it on your side: |
2577 | - |
2578 | - $ cd test |
2579 | - $ PATH=/path/to/your/nginx-with-chunkin-module:$PATH prove -r t |
2580 | - |
2581 | - You need to terminate any Nginx processes before running the test suite |
2582 | - if you have changed the Nginx server binary. |
2583 | - |
2584 | - At the moment, LWP::UserAgent |
2585 | - (<http://search.cpan.org/perldoc?LWP::UserAgent>) is used by the test |
2586 | - scaffold |
2587 | - (<http://github.com/agentzh/chunkin-nginx-module/blob/master/test/lib/Te |
2588 | - st/Nginx/LWP.pm>) for simplicity. |
2589 | - |
2590 | - Because a single nginx server (by default, "localhost:1984") is used |
2591 | - across all the test scripts (".t" files), it's meaningless to run the |
2592 | - test suite in parallel by specifying "-jN" when invoking the "prove" |
2593 | - utility. |
2594 | - |
2595 | - Some parts of the test suite requires modules proxy and echo to be |
2596 | - enabled as well when building Nginx. |
2597 | - |
2598 | -Known Issues |
2599 | - * May not work with certain 3rd party modules like the upload module |
2600 | - (<http://www.grid.net.ru/nginx/upload.en.html>) because it |
2601 | - implements its own request body reading mechanism. |
2602 | - |
2603 | - * "client_body_in_single_buffer on" may *not* be obeyed for short |
2604 | - contents and fast network. |
2605 | - |
2606 | - * "client_body_in_file_only on" may *not* be obeyed for short contents |
2607 | - and fast network. |
2608 | - |
2609 | - * HTTP 1.1 pipelining may not fully work yet. |
2610 | - |
2611 | -TODO |
2612 | - * make the chunkin handler run at the end of the "access phase" rather |
2613 | - than beginning. |
2614 | - |
2615 | - * add support for "trailers" as specified in the RFC 2616 |
2616 | - (<http://tools.ietf.org/html/rfc2616#section-3.6.1>). |
2617 | - |
2618 | - * fix the known issues. |
2619 | - |
2620 | -Getting involved |
2621 | - You'll be very welcomed to submit patches to the author or just ask for |
2622 | - a commit bit to the source repository on GitHub. |
2623 | - |
2624 | -Author |
2625 | - Zhang "agentzh" Yichun (章亦春) *<agentzh@gmail.com>* |
2626 | - |
2627 | - This wiki page is also maintained by the author himself, and everybody |
2628 | - is encouraged to improve this page as well. |
2629 | - |
2630 | -Copyright & License |
2631 | - The basic client request body reading code is based on the |
2632 | - "ngx_http_read_client_request_body" function and its utility functions |
2633 | - in the Nginx 0.8.20 core. This part of code is copyrighted by Igor |
2634 | - Sysoev. |
2635 | - |
2636 | - Copyright (c) 2009, 2010, 2011, Zhang "agentzh" Yichun (章亦春) |
2637 | - <agentzh@gmail.com>. |
2638 | - |
2639 | - This module is licensed under the terms of the BSD license. |
2640 | - |
2641 | - Redistribution and use in source and binary forms, with or without |
2642 | - modification, are permitted provided that the following conditions are |
2643 | - met: |
2644 | - |
2645 | - * Redistributions of source code must retain the above copyright |
2646 | - notice, this list of conditions and the following disclaimer. |
2647 | - |
2648 | - * Redistributions in binary form must reproduce the above copyright |
2649 | - notice, this list of conditions and the following disclaimer in the |
2650 | - documentation and/or other materials provided with the distribution. |
2651 | - |
2652 | - * Neither the name of the Taobao Inc. nor the names of its |
2653 | - contributors may be used to endorse or promote products derived from |
2654 | - this software without specific prior written permission. |
2655 | - |
2656 | - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS |
2657 | - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
2658 | - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
2659 | - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
2660 | - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
2661 | - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED |
2662 | - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
2663 | - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
2664 | - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
2665 | - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
2666 | - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
2667 | - |
2668 | -See Also |
2669 | - * The original thread on the Nginx mailing list that inspires this |
2670 | - module's development: "'Content-Length' header for POSTs" |
2671 | - (<http://forum.nginx.org/read.php?2,4453,20543>). |
2672 | - |
2673 | - * The orginal announcement thread on the Nginx mailing list: "The |
2674 | - chunkin module: Experimental chunked input support for Nginx" |
2675 | - (<http://forum.nginx.org/read.php?2,22967>). |
2676 | - |
2677 | - * The original blog post |
2678 | - (<http://agentzh.spaces.live.com/blog/cns!FF3A735632E41548!481.entry |
2679 | - >) about this module's initial development. |
2680 | - |
2681 | - * The thread discussing chunked input support on the nginx-devel |
2682 | - mailing list: "Chunked request body and HTTP header parser" |
2683 | - (<http://nginx.org/pipermail/nginx-devel/2009-December/000021.html>) |
2684 | - . |
2685 | - |
2686 | - * The [module (HttpEchoModule)] for Nginx module's automated testing. |
2687 | - |
2688 | - * RFC 2616 - Chunked Transfer Coding |
2689 | - (<http://tools.ietf.org/html/rfc2616#section-3.6.1>). |
2690 | - |
2691 | |
2692 | === removed file 'debian/modules/chunkin-nginx-module/README.markdown' |
2693 | --- debian/modules/chunkin-nginx-module/README.markdown 2012-05-14 11:15:00 +0000 |
2694 | +++ debian/modules/chunkin-nginx-module/README.markdown 1970-01-01 00:00:00 +0000 |
2695 | @@ -1,440 +0,0 @@ |
2696 | -Name |
2697 | -==== |
2698 | - |
2699 | -**ngx_chunkin** - HTTP 1.1 chunked-encoding request body support for Nginx. |
2700 | - |
2701 | -*This module is not distributed with the Nginx source.* See [the installation instructions](http://wiki.nginx.org/HttpChunkinModule#Installation). |
2702 | - |
2703 | -Status |
2704 | -====== |
2705 | - |
2706 | -This module is considered production ready. |
2707 | - |
2708 | -Version |
2709 | -======= |
2710 | - |
2711 | -This document describes ngx_chunkin [v0.23rc2](http://github.com/agentzh/chunkin-nginx-module/tags) released on November 24, 2011. |
2712 | - |
2713 | -Synopsis |
2714 | -======== |
2715 | - |
2716 | - |
2717 | - chunkin on; |
2718 | - |
2719 | - error_page 411 = @my_411_error; |
2720 | - location @my_411_error { |
2721 | - chunkin_resume; |
2722 | - } |
2723 | - |
2724 | - location /foo { |
2725 | - # your fastcgi_pass/proxy_pass/set/if and |
2726 | - # any other config directives go here... |
2727 | - } |
2728 | - ... |
2729 | - |
2730 | - |
2731 | - |
2732 | - chunkin on; |
2733 | - |
2734 | - error_page 411 = @my_411_error; |
2735 | - location @my_411_error { |
2736 | - chunkin_resume; |
2737 | - } |
2738 | - |
2739 | - location /bar { |
2740 | - chunkin_keepalive on; # WARNING: too experimental! |
2741 | - |
2742 | - # your fastcgi_pass/proxy_pass/set/if and |
2743 | - # any other config directives go here... |
2744 | - } |
2745 | - |
2746 | - |
2747 | -Description |
2748 | -=========== |
2749 | - |
2750 | -This module adds [HTTP 1.1 chunked](http://tools.ietf.org/html/rfc2616#section-3.6.1) input support for Nginx without the need of patching the Nginx core. |
2751 | - |
2752 | -Behind the scene, it registers an access-phase handler that will eagerly read and decode incoming request bodies when a `Transfer-Encoding: chunked` header triggers a `411` error page in Nginx. For requests that are not in the `chunked` transfer encoding, this module is a "no-op". |
2753 | - |
2754 | -To enable the magic, just turn on the [chunkin](http://wiki.nginx.org/HttpChunkinModule#chunkin) config option and define a custom `411 error_page` using [chunkin_resume](http://wiki.nginx.org/HttpChunkinModule#chunkin_resume), like this: |
2755 | - |
2756 | - |
2757 | - server { |
2758 | - chunkin on; |
2759 | - |
2760 | - error_page 411 = @my_411_error; |
2761 | - location @my_411_error { |
2762 | - chunkin_resume; |
2763 | - } |
2764 | - |
2765 | - ... |
2766 | - } |
2767 | - |
2768 | - |
2769 | -No other modification is required in your nginx.conf file and everything should work out of the box including the standard [proxy module](http://wiki.nginx.org/HttpProxyModule) (except for those [known issues](http://wiki.nginx.org/HttpChunkinModule#Known_Issues)). Note that the [chunkin](http://wiki.nginx.org/HttpChunkinModule#chunkin) directive is not allowed in the location block while the [chunkin_resume](http://wiki.nginx.org/HttpChunkinModule#chunkin_resume) directive is only allowed on in `locations`. |
2770 | - |
2771 | -The core module's [client_body_buffer_size](http://wiki.nginx.org/HttpCoreModule#client_body_buffer_size), [client_max_body_size](http://wiki.nginx.org/HttpCoreModule#client_max_body_size), and [client_body_timeout](http://wiki.nginx.org/HttpCoreModule#client_body_timeout) directive settings are honored. Note that, the "body sizes" here always indicate chunked-encoded body, not the data that has already been decoded. Basically, the |
2772 | -chunked-encoded body will always be slightly larger than the original data that is not encoded. |
2773 | - |
2774 | -The [client_body_in_file_only](http://wiki.nginx.org/HttpCoreModule#client_body_in_file_only) and [client_body_in_single_buffer](http://wiki.nginx.org/HttpCoreModule#client_body_in_single_buffer) settings are followed partially. See [Know Issues](http://wiki.nginx.org/HttpChunkinModule#Known_Issues). |
2775 | - |
2776 | -This module is not supposed to be merged into the Nginx core because I've used [Ragel](http://www.complang.org/ragel/) to generate the chunked encoding parser for joy :) |
2777 | - |
2778 | -How it works |
2779 | ------------- |
2780 | - |
2781 | -Nginx explicitly checks chunked `Transfer-Encoding` headers and absent content length header in its very |
2782 | -early phase. Well, as early as the `ngx_http_process_request_header` |
2783 | -function. So this module takes a rather tricky approach. That is, use an output filter to intercept the `411 Length Required` error page response issued by `ngx_http_process_request_header`, |
2784 | -fix things and finally issue an internal redirect to the current location, |
2785 | -thus starting from those phases we all know and love, this time |
2786 | -bypassing the horrible `ngx_http_process_request_header` function. |
2787 | - |
2788 | -In the `rewrite` phase of the newly created request, this module eagerly reads in the chunked request body in a way similar to that of the standard `ngx_http_read_client_request_body` function, but using its own chunked parser generated by Ragel. The decoded request body will be put into `r->request_body->bufs` and a corresponding `Content-Length` header will be inserted into `r->headers_in`. |
2789 | - |
2790 | -Those modules using the standard `ngx_http_read_client_request_body` function to read the request body will just work out of box because `ngx_http_read_client_request_body` returns immediately when it sees `r->request_body->bufs` already exists. |
2791 | - |
2792 | -Special efforts have been made to reduce data copying and dynamic memory allocation. |
2793 | - |
2794 | -Directives |
2795 | -========== |
2796 | - |
2797 | -chunkin |
2798 | -------- |
2799 | -**syntax:** *chunkin on|off* |
2800 | - |
2801 | -**default:** *off* |
2802 | - |
2803 | -**context:** *http, server* |
2804 | - |
2805 | -**phase:** *access* |
2806 | - |
2807 | -Enables or disables this module's hooks. |
2808 | - |
2809 | -chunkin_resume |
2810 | --------------- |
2811 | -**syntax:** *chunkin_resume* |
2812 | - |
2813 | -**default:** *no* |
2814 | - |
2815 | -**context:** *location* |
2816 | - |
2817 | -**phase:** *content* |
2818 | - |
2819 | -This directive must be used in your custom `411 error page` location to help this module work correctly. For example: |
2820 | - |
2821 | - |
2822 | - error_page 411 = @my_error; |
2823 | - location @my_error { |
2824 | - chunkin_resume; |
2825 | - } |
2826 | - |
2827 | - |
2828 | -For the technical reason behind the necessity of this directive, please read the `nginx-devel` thread [Content-Length is not ignored for chunked requests: Nginx violates RFC 2616](http://nginx.org/pipermail/nginx-devel/2009-December/000041.html). |
2829 | - |
2830 | -This directive was first introduced in the [v0.17](http://wiki.nginx.org/HttpChunkinModule#v0.17) release. |
2831 | - |
2832 | -chunkin_max_chunks_per_buf |
2833 | --------------------------- |
2834 | -**syntax:** *chunkin_max_chunks_per_buf <number>* |
2835 | - |
2836 | -**default:** *512* |
2837 | - |
2838 | -**context:** *http, server, location* |
2839 | - |
2840 | -Set the max chunk count threshold for the buffer determined by the [client_body_buffer_size](http://wiki.nginx.org/HttpCoreModule#client_body_buffer_size) directive. |
2841 | -If the average chunk size is `1 KB` and your [client_body_buffer_size](http://wiki.nginx.org/HttpCoreModule#client_body_buffer_size) setting |
2842 | -is 1 meta bytes, then you should set this threshold to `1024` or `2048`. |
2843 | - |
2844 | -When the raw body size is exceeding [client_body_buffer_size](http://wiki.nginx.org/HttpCoreModule#client_body_buffer_size) *or* the chunk counter is exceeding this `chunkin_max_chunks_per_buf` setting, the decoded data will be temporarily buffered into disk files, and then the main buffer gets cleared and the chunk counter gets reset back to 0 (or `1` if there's a "pending chunk"). |
2845 | - |
2846 | -This directive was first introduced in the [v0.17](http://wiki.nginx.org/HttpChunkinModule#v0.17) release. |
2847 | - |
2848 | -chunkin_keepalive |
2849 | ------------------ |
2850 | -**syntax:** *chunkin_keepalive on|off* |
2851 | - |
2852 | -**default:** *off* |
2853 | - |
2854 | -**context:** *http, server, location, if* |
2855 | - |
2856 | -Turns on or turns off HTTP 1.1 keep-alive and HTTP 1.1 pipelining support. |
2857 | - |
2858 | -Keep-alive without pipelining should be quite stable but pipelining support is very preliminary, limited, and almost untested. |
2859 | - |
2860 | -This directive was first introduced in the [v0.07 release](http://wiki.nginx.org/HttpChunkinModule#v0.07). |
2861 | - |
2862 | -**Technical note on the HTTP 1.1 pipeling support** |
2863 | - |
2864 | -The basic idea is to copy the bytes left by my chunked parser in |
2865 | -`r->request_body->buf` over into `r->header_in` so that nginx's |
2866 | -`ngx_http_set_keepalive` and `ngx_http_init_request` functions will pick |
2867 | -it up for the subsequent pipelined requests. When the request body is |
2868 | -small enough to be completely preread into the `r->header_in` buffer, |
2869 | -then no data copy is needed here -- just setting `r->header_in->pos` |
2870 | -correctly will suffice. |
2871 | - |
2872 | -The only issue that remains is how to enlarge `r->header_in` when the |
2873 | -data left in `r->request_body->buf` is just too large to be hold in the |
2874 | -remaining room between `r->header_in->pos` and `r->header_in->end`. For |
2875 | -now, this module will just give up and simply turn off `r->keepalive`. |
2876 | - |
2877 | -I know we can always use exactly the remaining room in `r->header_in` as |
2878 | -the buffer size when reading data from `c->recv`, but's suboptimal when |
2879 | -the remaining room in `r->header_in` happens to be very small while |
2880 | -`r->request_body->buf` is quite large. |
2881 | - |
2882 | -I haven't fully grokked all the details among `r->header_in`, `c->buffer`, |
2883 | -busy/free lists and those so-called "large header buffers". Is there a |
2884 | -clean and safe way to reallocate or extend the `r->header_in` buffer? |
2885 | - |
2886 | -Installation |
2887 | -============ |
2888 | - |
2889 | -Grab the nginx source code from [nginx.org](http://nginx.org/), for example, |
2890 | -the version 1.0.8 (see [nginx compatibility](http://wiki.nginx.org/HttpChunkinModule#Compatibility)), and then build the source with this module: |
2891 | - |
2892 | - |
2893 | - wget 'http://nginx.org/download/nginx-1.0.8.tar.gz' |
2894 | - tar -xzvf nginx-1.0.8.tar.gz |
2895 | - cd nginx-1.0.8/ |
2896 | - |
2897 | - # Here we assume you would install you nginx under /opt/nginx/. |
2898 | - ./configure --prefix=/opt/nginx \ |
2899 | - --add-module=/path/to/chunkin-nginx-module |
2900 | - |
2901 | - make -j2 |
2902 | - make install |
2903 | - |
2904 | - |
2905 | -Download the latest version of the release tarball of this module from [chunkin-nginx-module file list](http://github.com/agentzh/chunkin-nginx-module/tags). |
2906 | - |
2907 | -For Developers |
2908 | --------------- |
2909 | - |
2910 | -The chunked parser is generated by [Ragel](http://www.complang.org/ragel/). If you want to |
2911 | -regenerate the parser's C file, i.e., [src/chunked_parser.c](http://github.com/agentzh/chunkin-nginx-module/blob/master/src/chunked_parser.c), use |
2912 | -the following command from the root of the chunkin module's source tree: |
2913 | - |
2914 | - |
2915 | - $ ragel -G2 src/chunked_parser.rl |
2916 | - |
2917 | - |
2918 | -Packages from users |
2919 | -=================== |
2920 | - |
2921 | -Fedora 13 RPM files |
2922 | -------------------- |
2923 | - |
2924 | -The following source and binary rpm files are contributed by Ernest Folch, with nginx 0.8.54, ngx_chunkin v0.21 and ngx_headers_more v0.13: |
2925 | - |
2926 | -* [nginx-0.8.54-1.fc13.src.rpm](http://agentzh.org/misc/nginx/ernest/nginx-0.8.54-1.fc13.src.rpm) |
2927 | -* [nginx-0.8.54-1.fc13.x86_64.rpm](http://agentzh.org/misc/nginx/ernest/nginx-0.8.54-1.fc13.x86_64.rpm) |
2928 | - |
2929 | -Compatibility |
2930 | -============= |
2931 | - |
2932 | -The following versions of Nginx should work with this module: |
2933 | - |
2934 | -* **1.1.x** (last tested: 1.1.5) |
2935 | -* **1.0.x** (last tested: 1.0.10) |
2936 | -* **0.8.x** (last tested: 0.8.54) |
2937 | -* **0.7.x >= 0.7.21** (last tested: 0.7.67) |
2938 | - |
2939 | -Earlier versions of Nginx like 0.6.x and 0.5.x will *not* work. |
2940 | - |
2941 | -If you find that any particular version of Nginx above 0.7.21 does not work with this module, please consider [reporting a bug](http://wiki.nginx.org/HttpChunkinModule#Report_Bugs). |
2942 | - |
2943 | -Report Bugs |
2944 | -=========== |
2945 | - |
2946 | -Although a lot of effort has been put into testing and code tuning, there must be some serious bugs lurking somewhere in this module. So whenever you are bitten by any quirks, please don't hesitate to |
2947 | - |
2948 | -1. send a bug report or even patches to <agentzh@gmail.com>, |
2949 | -1. or create a ticket on the [issue tracking interface](http://github.com/agentzh/chunkin-nginx-module/issues) provided by GitHub. |
2950 | - |
2951 | -Source Repository |
2952 | -================= |
2953 | - |
2954 | -Available on github at [agentzh/chunkin-nginx-module](http://github.com/agentzh/chunkin-nginx-module). |
2955 | - |
2956 | -ChangeLog |
2957 | -========= |
2958 | - |
2959 | -v0.22 |
2960 | ------ |
2961 | -* now we remove the request header Transfer-Encoding completely because at least Apache will complain about the empty-value `Transfer-Encoding` request header. thanks hoodoos and Sandesh Kotwal. |
2962 | -* now we allow DELETE requests with chunked request bodies per hoodoos's request. |
2963 | -* now we use the 2-clause BSD license. |
2964 | - |
2965 | -v0.21 |
2966 | ------ |
2967 | -* applied a patch from Gong Kaihui (龚开晖) to always call `post_handler` in `ngx_http_chunkin_read_chunked_request_body`. |
2968 | - |
2969 | -v0.20 |
2970 | ------ |
2971 | -* fixed a bug that may read incomplete chunked body. thanks Gong Kaihui (龚开晖). |
2972 | -* fixed various memory issues in the implementation which may cause nginx processes to crash. |
2973 | -* added support for chunked PUT requests. |
2974 | -* now we always require "error_page 411 @resume" and no default (buggy) magic any more. thanks Gong Kaihui (龚开晖). |
2975 | - |
2976 | -v0.19 |
2977 | ------ |
2978 | -* we now use ragel -G2 to generate the chunked parser and we're 36% faster. |
2979 | -* we now eagerly read the data octets in the chunked parser and we're 43% faster. |
2980 | - |
2981 | -v0.18 |
2982 | ------ |
2983 | -* added support for `chunk-extension` to the chunked parser as per [RFC 2616](http://tools.ietf.org/html/rfc2616#section-3.6.1), but we just ignore them (if any) because we don't understand them. |
2984 | -* added more diagnostic information for certian error messages. |
2985 | - |
2986 | -v0.17 |
2987 | ------ |
2988 | -* implemented the [chunkin_max_chunks_per_buf](http://wiki.nginx.org/HttpChunkinModule#chunkin_max_chunks_per_buf) directive to allow overriding the default `512` setting. |
2989 | -* we now bypass nginx's [discard requesty body bug](http://nginx.org/pipermail/nginx-devel/2009-December/000041.html) by requiring our users to define explicit `411 error_page` with [chunkin_resume](http://wiki.nginx.org/HttpChunkinModule#chunkin_resume) in the error page location. Thanks J for reporting related bugs. |
2990 | -* fixed `r->phase_handler` in our post read handler. our handler may run one more time before :P |
2991 | -* the chunkin handler now returns `NGX_DECLINED` rather than `NGX_OK` when our `ngx_http_chunkin_read_chunked_request_body` function returns `NGX_OK`, to avoid bypassing other access-phase handlers. |
2992 | - |
2993 | -v0.16 |
2994 | ------ |
2995 | -* turned off ddebug in the previous release. thanks J for reporting it. |
2996 | - |
2997 | -v0.15 |
2998 | ------ |
2999 | -* fixed a regression that ctx->chunks_count never incremented in earlier versions. |
3000 | - |
3001 | -v0.14 |
3002 | ------ |
3003 | -* now we no longer skip those operations between the (interrupted) ngx_http_process_request_header and the server rewrite phase. this fixed the security issues regarding the [internal](http://wiki.nginx.org/HttpCoreModule#internal) directive as well as SSL sessions. |
3004 | -* try to ignore CR/LF/SP/HT at the begining of the chunked body. |
3005 | -* now we allow HT as padding spaces and ignore leading CRLFs. |
3006 | -* improved diagnostic info in the error.log messages when parsefail occurs. |
3007 | - |
3008 | -v0.11 |
3009 | ------ |
3010 | -* added a random valid-chunked-request generator in t/random.t. |
3011 | -* fixed a new connection leak issue caught by t/random.t. |
3012 | - |
3013 | -v0.10 |
3014 | ------ |
3015 | -* fixed a serious bug in the chunked parser grammer: there would be ambiguity when CRLF appears in the chunked data sections. Thanks J for reporting it. |
3016 | - |
3017 | -v0.08 |
3018 | ------ |
3019 | -* fixed gcc compilation errors on x86_64, thanks J for reporting it. |
3020 | -* used the latest Ragel 6.6 to generate the `chunked_parser.c` file in the source tree. |
3021 | - |
3022 | -v0.07 |
3023 | ------ |
3024 | - |
3025 | -* marked the disgarded 411 error page's output chain bufs as consumed by setting `buf->pos = buf->last`. (See [this nginx-devel thread](http://nginx.org/pipermail/nginx-devel/2009-December/000025.html) for more details.) |
3026 | -* added the [chunkin_keepalive](http://wiki.nginx.org/HttpChunkinModule#chunkin_keepalive) directive which can enable HTTP 1.1 keep-alive and HTTP 1.1 pipelining, and defaults to `off`. |
3027 | -* fixed the `alphtype` bug in the Ragel parser spec; which caused rejection of non-ascii octets in the chunked data. Thanks J for his bug report. |
3028 | -* added `Test::Nginx::Socket` to test our nginx module on the socket level. Thanks J for his bug report. |
3029 | -* rewrote the bufs recycling part and preread-buf-to-rb-buf transition part, also refactored the Ragel parser spec, thus eliminating lots of serious bugs. |
3030 | -* provided better diagnostics in the error log message for "bad chunked body" parsefails in the chunked parser. For example: |
3031 | - |
3032 | - |
3033 | - 2009/12/02 17:35:52 [error] 32244#0: *1 bad chunked body (offset 7, near "4^M |
3034 | - hell <-- HERE o^M |
3035 | - 0^M |
3036 | - ^M |
3037 | - ", marked by " <-- HERE "). |
3038 | - , client: 127.0.0.1, server: localhost, request: "POST /main |
3039 | - HTTP/1.1", host: "localhost" |
3040 | - |
3041 | - |
3042 | -* added some code to let the chunked parser handle special 0-size chunks that are not the last chunk. |
3043 | -* fixed a connection leak bug regarding incorrect `r->main->count` reference counter handling for nginx 0.8.11+ (well, the `ngx_http_read_client_request_body` function in the nginx core also has this issue, I'll report it later.) |
3044 | - |
3045 | -v0.06 |
3046 | ------ |
3047 | -* minor optimization: we won't traverse the output chain link if the chain count is not large enough. |
3048 | - |
3049 | -Test Suite |
3050 | -========== |
3051 | - |
3052 | -This module comes with a Perl-driven test suite. The [test cases](http://github.com/agentzh/chunkin-nginx-module/tree/master/test/t/) are |
3053 | -[declarative](http://github.com/agentzh/chunkin-nginx-module/blob/master/test/t/sanity.t) too. Thanks to the [Test::Base](http://search.cpan.org/perldoc?Test::Base) module in the Perl world. |
3054 | - |
3055 | -To run it on your side: |
3056 | - |
3057 | - |
3058 | - $ cd test |
3059 | - $ PATH=/path/to/your/nginx-with-chunkin-module:$PATH prove -r t |
3060 | - |
3061 | - |
3062 | -You need to terminate any Nginx processes before running the test suite if you have changed the Nginx server binary. |
3063 | - |
3064 | -At the moment, [LWP::UserAgent](http://search.cpan.org/perldoc?LWP::UserAgent) is used by the [test scaffold](http://github.com/agentzh/chunkin-nginx-module/blob/master/test/lib/Test/Nginx/LWP.pm) for simplicity. |
3065 | - |
3066 | -Because a single nginx server (by default, `localhost:1984`) is used across all the test scripts (`.t` files), it's meaningless to run the test suite in parallel by specifying `-jN` when invoking the `prove` utility. |
3067 | - |
3068 | -Some parts of the test suite requires modules [proxy](http://wiki.nginx.org/HttpProxyModule) and [echo](http://wiki.nginx.org/HttpEchoModule) to be enabled as well when building Nginx. |
3069 | - |
3070 | -Known Issues |
3071 | -============ |
3072 | - |
3073 | -* May not work with certain 3rd party modules like the [upload module](http://www.grid.net.ru/nginx/upload.en.html) because it implements its own request body reading mechanism. |
3074 | -* "client_body_in_single_buffer on" may *not* be obeyed for short contents and fast network. |
3075 | -* "client_body_in_file_only on" may *not* be obeyed for short contents and fast network. |
3076 | -* HTTP 1.1 pipelining may not fully work yet. |
3077 | - |
3078 | -TODO |
3079 | -==== |
3080 | - |
3081 | -* make the chunkin handler run at the end of the `access phase` rather than beginning. |
3082 | -* add support for `trailers` as specified in the [RFC 2616](http://tools.ietf.org/html/rfc2616#section-3.6.1). |
3083 | -* fix the [known issues](http://wiki.nginx.org/HttpChunkinModule#Known_Issues). |
3084 | - |
3085 | -Getting involved |
3086 | -================ |
3087 | - |
3088 | -You'll be very welcomed to submit patches to the [author](http://wiki.nginx.org/HttpChunkinModule#Author) or just ask for a commit bit to the [source repository](http://wiki.nginx.org/HttpChunkinModule#Source_Repository) on GitHub. |
3089 | - |
3090 | -Author |
3091 | -====== |
3092 | - |
3093 | -Zhang "agentzh" Yichun (章亦春) *<agentzh@gmail.com>* |
3094 | - |
3095 | -This wiki page is also maintained by the author himself, and everybody is encouraged to improve this page as well. |
3096 | - |
3097 | -Copyright & License |
3098 | -=================== |
3099 | - |
3100 | -The basic client request body reading code is based on the `ngx_http_read_client_request_body` function and its utility functions in the Nginx 0.8.20 core. This part of code is copyrighted by Igor Sysoev. |
3101 | - |
3102 | -Copyright (c) 2009, 2010, 2011, Zhang "agentzh" Yichun (章亦春) <agentzh@gmail.com>. |
3103 | - |
3104 | -This module is licensed under the terms of the BSD license. |
3105 | - |
3106 | -Redistribution and use in source and binary forms, with or without |
3107 | -modification, are permitted provided that the following conditions |
3108 | -are met: |
3109 | - |
3110 | -* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
3111 | -* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
3112 | -* Neither the name of the Taobao Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. |
3113 | - |
3114 | -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
3115 | -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
3116 | -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
3117 | -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
3118 | -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
3119 | -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED |
3120 | -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
3121 | -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
3122 | -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
3123 | -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
3124 | -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
3125 | - |
3126 | -See Also |
3127 | -======== |
3128 | - |
3129 | -* The original thread on the Nginx mailing list that inspires this module's development: ["'Content-Length' header for POSTs"](http://forum.nginx.org/read.php?2,4453,20543). |
3130 | -* The orginal announcement thread on the Nginx mailing list: ["The chunkin module: Experimental chunked input support for Nginx"](http://forum.nginx.org/read.php?2,22967). |
3131 | -* The original [blog post](http://agentzh.spaces.live.com/blog/cns!FF3A735632E41548!481.entry) about this module's initial development. |
3132 | -* The thread discussing chunked input support on the nginx-devel mailing list: ["Chunked request body and HTTP header parser"](http://nginx.org/pipermail/nginx-devel/2009-December/000021.html). |
3133 | -* The [echo module](http://wiki.nginx.org/HttpEchoModule) for Nginx module's automated testing. |
3134 | -* [RFC 2616 - Chunked Transfer Coding](http://tools.ietf.org/html/rfc2616#section-3.6.1). |
3135 | - |
3136 | |
3137 | === removed file 'debian/modules/chunkin-nginx-module/config' |
3138 | --- debian/modules/chunkin-nginx-module/config 2011-11-24 14:16:50 +0000 |
3139 | +++ debian/modules/chunkin-nginx-module/config 1970-01-01 00:00:00 +0000 |
3140 | @@ -1,5 +0,0 @@ |
3141 | -ngx_addon_name=ngx_http_chunkin_filter_module |
3142 | -HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_chunkin_filter_module" |
3143 | -NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/src/ngx_http_chunkin_filter_module.c $ngx_addon_dir/src/ngx_http_chunkin_request_body.c $ngx_addon_dir/src/chunked_parser.c $ngx_addon_dir/src/ngx_http_chunkin_util.c" |
3144 | -NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_addon_dir/src/ddebug.h $ngx_addon_dir/src/ngx_http_chunkin_request_body.h $ngx_addon_dir/src/ngx_http_chunkin_filter_module.h $ngx_addon_dir/src/chunked_parser.h $ngx_addon_dir/src/ngx_http_chunkin_util.h" |
3145 | - |
3146 | |
3147 | === removed directory 'debian/modules/chunkin-nginx-module/doc' |
3148 | === removed file 'debian/modules/chunkin-nginx-module/doc/HttpChunkinModule.wiki' |
3149 | --- debian/modules/chunkin-nginx-module/doc/HttpChunkinModule.wiki 2012-05-14 11:15:00 +0000 |
3150 | +++ debian/modules/chunkin-nginx-module/doc/HttpChunkinModule.wiki 1970-01-01 00:00:00 +0000 |
3151 | @@ -1,400 +0,0 @@ |
3152 | -= Name = |
3153 | - |
3154 | -'''ngx_chunkin''' - HTTP 1.1 chunked-encoding request body support for Nginx. |
3155 | - |
3156 | -''This module is not distributed with the Nginx source.'' See [[#Installation|the installation instructions]]. |
3157 | - |
3158 | -= Status = |
3159 | - |
3160 | -This module is considered production ready. |
3161 | - |
3162 | -= Version = |
3163 | - |
3164 | -This document describes ngx_chunkin [http://github.com/agentzh/chunkin-nginx-module/tags v0.23rc2] released on November 24, 2011. |
3165 | - |
3166 | -= Synopsis = |
3167 | - |
3168 | -<geshi lang="nginx"> |
3169 | - chunkin on; |
3170 | - |
3171 | - error_page 411 = @my_411_error; |
3172 | - location @my_411_error { |
3173 | - chunkin_resume; |
3174 | - } |
3175 | - |
3176 | - location /foo { |
3177 | - # your fastcgi_pass/proxy_pass/set/if and |
3178 | - # any other config directives go here... |
3179 | - } |
3180 | - ... |
3181 | -</geshi> |
3182 | - |
3183 | -<geshi lang="nginx"> |
3184 | - chunkin on; |
3185 | - |
3186 | - error_page 411 = @my_411_error; |
3187 | - location @my_411_error { |
3188 | - chunkin_resume; |
3189 | - } |
3190 | - |
3191 | - location /bar { |
3192 | - chunkin_keepalive on; # WARNING: too experimental! |
3193 | - |
3194 | - # your fastcgi_pass/proxy_pass/set/if and |
3195 | - # any other config directives go here... |
3196 | - } |
3197 | -</geshi> |
3198 | - |
3199 | -= Description = |
3200 | - |
3201 | -This module adds [http://tools.ietf.org/html/rfc2616#section-3.6.1 HTTP 1.1 chunked] input support for Nginx without the need of patching the Nginx core. |
3202 | - |
3203 | -Behind the scene, it registers an access-phase handler that will eagerly read and decode incoming request bodies when a <code>Transfer-Encoding: chunked</code> header triggers a <code>411</code> error page in Nginx. For requests that are not in the <code>chunked</code> transfer encoding, this module is a "no-op". |
3204 | - |
3205 | -To enable the magic, just turn on the [[#chunkin|chunkin]] config option and define a custom <code>411 error_page</code> using [[#chunkin_resume|chunkin_resume]], like this: |
3206 | - |
3207 | -<geshi lang="nginx"> |
3208 | - server { |
3209 | - chunkin on; |
3210 | - |
3211 | - error_page 411 = @my_411_error; |
3212 | - location @my_411_error { |
3213 | - chunkin_resume; |
3214 | - } |
3215 | - |
3216 | - ... |
3217 | - } |
3218 | -</geshi> |
3219 | - |
3220 | -No other modification is required in your nginx.conf file and everything should work out of the box including the standard [[HttpProxyModule|proxy module]] (except for those [[#Known Issues|known issues]]). Note that the [[#chunkin|chunkin]] directive is not allowed in the location block while the [[#chunkin_resume|chunkin_resume]] directive is only allowed on in <code>locations</code>. |
3221 | - |
3222 | -The core module's [[HttpCoreModule#client_body_buffer_size|client_body_buffer_size]], [[HttpCoreModule#client_max_body_size|client_max_body_size]], and [[HttpCoreModule#client_body_timeout|client_body_timeout]] directive settings are honored. Note that, the "body sizes" here always indicate chunked-encoded body, not the data that has already been decoded. Basically, the |
3223 | -chunked-encoded body will always be slightly larger than the original data that is not encoded. |
3224 | - |
3225 | -The [[HttpCoreModule#client_body_in_file_only|client_body_in_file_only]] and [[HttpCoreModule#client_body_in_single_buffer|client_body_in_single_buffer]] settings are followed partially. See [[#Known Issues|Know Issues]]. |
3226 | - |
3227 | -This module is not supposed to be merged into the Nginx core because I've used [http://www.complang.org/ragel/ Ragel] to generate the chunked encoding parser for joy :) |
3228 | - |
3229 | -== How it works == |
3230 | - |
3231 | -Nginx explicitly checks chunked <code>Transfer-Encoding</code> headers and absent content length header in its very |
3232 | -early phase. Well, as early as the <code>ngx_http_process_request_header</code> |
3233 | -function. So this module takes a rather tricky approach. That is, use an output filter to intercept the <code>411 Length Required</code> error page response issued by <code>ngx_http_process_request_header</code>, |
3234 | -fix things and finally issue an internal redirect to the current location, |
3235 | -thus starting from those phases we all know and love, this time |
3236 | -bypassing the horrible <code>ngx_http_process_request_header</code> function. |
3237 | - |
3238 | -In the <code>rewrite</code> phase of the newly created request, this module eagerly reads in the chunked request body in a way similar to that of the standard <code>ngx_http_read_client_request_body</code> function, but using its own chunked parser generated by Ragel. The decoded request body will be put into <code>r->request_body->bufs</code> and a corresponding <code>Content-Length</code> header will be inserted into <code>r->headers_in</code>. |
3239 | - |
3240 | -Those modules using the standard <code>ngx_http_read_client_request_body</code> function to read the request body will just work out of box because <code>ngx_http_read_client_request_body</code> returns immediately when it sees <code>r->request_body->bufs</code> already exists. |
3241 | - |
3242 | -Special efforts have been made to reduce data copying and dynamic memory allocation. |
3243 | - |
3244 | -= Directives = |
3245 | - |
3246 | -== chunkin == |
3247 | -'''syntax:''' ''chunkin on|off'' |
3248 | - |
3249 | -'''default:''' ''off'' |
3250 | - |
3251 | -'''context:''' ''http, server'' |
3252 | - |
3253 | -'''phase:''' ''access'' |
3254 | - |
3255 | -Enables or disables this module's hooks. |
3256 | - |
3257 | -== chunkin_resume == |
3258 | -'''syntax:''' ''chunkin_resume'' |
3259 | - |
3260 | -'''default:''' ''no'' |
3261 | - |
3262 | -'''context:''' ''location'' |
3263 | - |
3264 | -'''phase:''' ''content'' |
3265 | - |
3266 | -This directive must be used in your custom <code>411 error page</code> location to help this module work correctly. For example: |
3267 | - |
3268 | -<geshi lang="nginx"> |
3269 | - error_page 411 = @my_error; |
3270 | - location @my_error { |
3271 | - chunkin_resume; |
3272 | - } |
3273 | -</geshi> |
3274 | - |
3275 | -For the technical reason behind the necessity of this directive, please read the <code>nginx-devel</code> thread [http://nginx.org/pipermail/nginx-devel/2009-December/000041.html Content-Length is not ignored for chunked requests: Nginx violates RFC 2616]. |
3276 | - |
3277 | -This directive was first introduced in the [[#v0.17|v0.17]] release. |
3278 | - |
3279 | -== chunkin_max_chunks_per_buf == |
3280 | -'''syntax:''' ''chunkin_max_chunks_per_buf <number>'' |
3281 | - |
3282 | -'''default:''' ''512'' |
3283 | - |
3284 | -'''context:''' ''http, server, location'' |
3285 | - |
3286 | -Set the max chunk count threshold for the buffer determined by the [[HttpCoreModule#client_body_buffer_size|client_body_buffer_size]] directive. |
3287 | -If the average chunk size is <code>1 KB</code> and your [[HttpCoreModule#client_body_buffer_size|client_body_buffer_size]] setting |
3288 | -is 1 meta bytes, then you should set this threshold to <code>1024</code> or <code>2048</code>. |
3289 | - |
3290 | -When the raw body size is exceeding [[HttpCoreModule#client_body_buffer_size|client_body_buffer_size]] ''or'' the chunk counter is exceeding this <code>chunkin_max_chunks_per_buf</code> setting, the decoded data will be temporarily buffered into disk files, and then the main buffer gets cleared and the chunk counter gets reset back to 0 (or <code>1</code> if there's a "pending chunk"). |
3291 | - |
3292 | -This directive was first introduced in the [[#v0.17|v0.17]] release. |
3293 | - |
3294 | -== chunkin_keepalive == |
3295 | -'''syntax:''' ''chunkin_keepalive on|off'' |
3296 | - |
3297 | -'''default:''' ''off'' |
3298 | - |
3299 | -'''context:''' ''http, server, location, if'' |
3300 | - |
3301 | -Turns on or turns off HTTP 1.1 keep-alive and HTTP 1.1 pipelining support. |
3302 | - |
3303 | -Keep-alive without pipelining should be quite stable but pipelining support is very preliminary, limited, and almost untested. |
3304 | - |
3305 | -This directive was first introduced in the [[#v0.07|v0.07 release]]. |
3306 | - |
3307 | -'''Technical note on the HTTP 1.1 pipeling support''' |
3308 | - |
3309 | -The basic idea is to copy the bytes left by my chunked parser in |
3310 | -<code>r->request_body->buf</code> over into <code>r->header_in</code> so that nginx's |
3311 | -<code>ngx_http_set_keepalive</code> and <code>ngx_http_init_request</code> functions will pick |
3312 | -it up for the subsequent pipelined requests. When the request body is |
3313 | -small enough to be completely preread into the <code>r->header_in</code> buffer, |
3314 | -then no data copy is needed here -- just setting <code>r->header_in->pos</code> |
3315 | -correctly will suffice. |
3316 | - |
3317 | -The only issue that remains is how to enlarge <code>r->header_in</code> when the |
3318 | -data left in <code>r->request_body->buf</code> is just too large to be hold in the |
3319 | -remaining room between <code>r->header_in->pos</code> and <code>r->header_in->end</code>. For |
3320 | -now, this module will just give up and simply turn off <code>r->keepalive</code>. |
3321 | - |
3322 | -I know we can always use exactly the remaining room in <code>r->header_in</code> as |
3323 | -the buffer size when reading data from <code>c->recv</code>, but's suboptimal when |
3324 | -the remaining room in <code>r->header_in</code> happens to be very small while |
3325 | -<code>r->request_body->buf</code> is quite large. |
3326 | - |
3327 | -I haven't fully grokked all the details among <code>r->header_in</code>, <code>c->buffer</code>, |
3328 | -busy/free lists and those so-called "large header buffers". Is there a |
3329 | -clean and safe way to reallocate or extend the <code>r->header_in</code> buffer? |
3330 | - |
3331 | -= Installation = |
3332 | - |
3333 | -Grab the nginx source code from [http://nginx.org/ nginx.org], for example, |
3334 | -the version 1.0.8 (see [[#Compatibility|nginx compatibility]]), and then build the source with this module: |
3335 | - |
3336 | -<geshi lang="bash"> |
3337 | - wget 'http://nginx.org/download/nginx-1.0.8.tar.gz' |
3338 | - tar -xzvf nginx-1.0.8.tar.gz |
3339 | - cd nginx-1.0.8/ |
3340 | - |
3341 | - # Here we assume you would install you nginx under /opt/nginx/. |
3342 | - ./configure --prefix=/opt/nginx \ |
3343 | - --add-module=/path/to/chunkin-nginx-module |
3344 | - |
3345 | - make -j2 |
3346 | - make install |
3347 | -</geshi> |
3348 | - |
3349 | -Download the latest version of the release tarball of this module from [http://github.com/agentzh/chunkin-nginx-module/tags chunkin-nginx-module file list]. |
3350 | - |
3351 | -== For Developers == |
3352 | - |
3353 | -The chunked parser is generated by [http://www.complang.org/ragel/ Ragel]. If you want to |
3354 | -regenerate the parser's C file, i.e., [http://github.com/agentzh/chunkin-nginx-module/blob/master/src/chunked_parser.c src/chunked_parser.c], use |
3355 | -the following command from the root of the chunkin module's source tree: |
3356 | - |
3357 | -<geshi lang="bash"> |
3358 | - $ ragel -G2 src/chunked_parser.rl |
3359 | -</geshi> |
3360 | - |
3361 | -= Packages from users = |
3362 | - |
3363 | -== Fedora 13 RPM files == |
3364 | - |
3365 | -The following source and binary rpm files are contributed by Ernest Folch, with nginx 0.8.54, ngx_chunkin v0.21 and ngx_headers_more v0.13: |
3366 | - |
3367 | -* [http://agentzh.org/misc/nginx/ernest/nginx-0.8.54-1.fc13.src.rpm nginx-0.8.54-1.fc13.src.rpm] |
3368 | -* [http://agentzh.org/misc/nginx/ernest/nginx-0.8.54-1.fc13.x86_64.rpm nginx-0.8.54-1.fc13.x86_64.rpm] |
3369 | - |
3370 | -= Compatibility = |
3371 | - |
3372 | -The following versions of Nginx should work with this module: |
3373 | - |
3374 | -* '''1.1.x''' (last tested: 1.1.5) |
3375 | -* '''1.0.x''' (last tested: 1.0.10) |
3376 | -* '''0.8.x''' (last tested: 0.8.54) |
3377 | -* '''0.7.x >= 0.7.21''' (last tested: 0.7.67) |
3378 | - |
3379 | -Earlier versions of Nginx like 0.6.x and 0.5.x will ''not'' work. |
3380 | - |
3381 | -If you find that any particular version of Nginx above 0.7.21 does not work with this module, please consider [[#Report Bugs|reporting a bug]]. |
3382 | - |
3383 | -= Report Bugs = |
3384 | - |
3385 | -Although a lot of effort has been put into testing and code tuning, there must be some serious bugs lurking somewhere in this module. So whenever you are bitten by any quirks, please don't hesitate to |
3386 | - |
3387 | -# send a bug report or even patches to <agentzh@gmail.com>, |
3388 | -# or create a ticket on the [http://github.com/agentzh/chunkin-nginx-module/issues issue tracking interface] provided by GitHub. |
3389 | - |
3390 | -= Source Repository = |
3391 | - |
3392 | -Available on github at [http://github.com/agentzh/chunkin-nginx-module agentzh/chunkin-nginx-module]. |
3393 | - |
3394 | -= ChangeLog = |
3395 | - |
3396 | -== v0.22 == |
3397 | -* now we remove the request header Transfer-Encoding completely because at least Apache will complain about the empty-value <code>Transfer-Encoding</code> request header. thanks hoodoos and Sandesh Kotwal. |
3398 | -* now we allow DELETE requests with chunked request bodies per hoodoos's request. |
3399 | -* now we use the 2-clause BSD license. |
3400 | - |
3401 | -== v0.21 == |
3402 | -* applied a patch from Gong Kaihui (龚开晖) to always call <code>post_handler</code> in <code>ngx_http_chunkin_read_chunked_request_body</code>. |
3403 | - |
3404 | -== v0.20 == |
3405 | -* fixed a bug that may read incomplete chunked body. thanks Gong Kaihui (龚开晖). |
3406 | -* fixed various memory issues in the implementation which may cause nginx processes to crash. |
3407 | -* added support for chunked PUT requests. |
3408 | -* now we always require "error_page 411 @resume" and no default (buggy) magic any more. thanks Gong Kaihui (龚开晖). |
3409 | - |
3410 | -== v0.19 == |
3411 | -* we now use ragel -G2 to generate the chunked parser and we're 36% faster. |
3412 | -* we now eagerly read the data octets in the chunked parser and we're 43% faster. |
3413 | - |
3414 | -== v0.18 == |
3415 | -* added support for <code>chunk-extension</code> to the chunked parser as per [http://tools.ietf.org/html/rfc2616#section-3.6.1 RFC 2616], but we just ignore them (if any) because we don't understand them. |
3416 | -* added more diagnostic information for certian error messages. |
3417 | - |
3418 | -== v0.17 == |
3419 | -* implemented the [[#chunkin_max_chunks_per_buf|chunkin_max_chunks_per_buf]] directive to allow overriding the default <code>512</code> setting. |
3420 | -* we now bypass nginx's [http://nginx.org/pipermail/nginx-devel/2009-December/000041.html discard requesty body bug] by requiring our users to define explicit <code>411 error_page</code> with [[#chunkin_resume|chunkin_resume]] in the error page location. Thanks J for reporting related bugs. |
3421 | -* fixed <code>r->phase_handler</code> in our post read handler. our handler may run one more time before :P |
3422 | -* the chunkin handler now returns <code>NGX_DECLINED</code> rather than <code>NGX_OK</code> when our <code>ngx_http_chunkin_read_chunked_request_body</code> function returns <code>NGX_OK</code>, to avoid bypassing other access-phase handlers. |
3423 | - |
3424 | -== v0.16 == |
3425 | -* turned off ddebug in the previous release. thanks J for reporting it. |
3426 | - |
3427 | -== v0.15 == |
3428 | -* fixed a regression that ctx->chunks_count never incremented in earlier versions. |
3429 | - |
3430 | -== v0.14 == |
3431 | -* now we no longer skip those operations between the (interrupted) ngx_http_process_request_header and the server rewrite phase. this fixed the security issues regarding the [[HttpCoreModule#internal|internal]] directive as well as SSL sessions. |
3432 | -* try to ignore CR/LF/SP/HT at the begining of the chunked body. |
3433 | -* now we allow HT as padding spaces and ignore leading CRLFs. |
3434 | -* improved diagnostic info in the error.log messages when parsefail occurs. |
3435 | - |
3436 | -== v0.11 == |
3437 | -* added a random valid-chunked-request generator in t/random.t. |
3438 | -* fixed a new connection leak issue caught by t/random.t. |
3439 | - |
3440 | -== v0.10 == |
3441 | -* fixed a serious bug in the chunked parser grammer: there would be ambiguity when CRLF appears in the chunked data sections. Thanks J for reporting it. |
3442 | - |
3443 | -== v0.08 == |
3444 | -* fixed gcc compilation errors on x86_64, thanks J for reporting it. |
3445 | -* used the latest Ragel 6.6 to generate the <code>chunked_parser.c</code> file in the source tree. |
3446 | - |
3447 | -== v0.07 == |
3448 | - |
3449 | -* marked the disgarded 411 error page's output chain bufs as consumed by setting <code>buf->pos = buf->last</code>. (See [http://nginx.org/pipermail/nginx-devel/2009-December/000025.html this nginx-devel thread] for more details.) |
3450 | -* added the [[#chunkin_keepalive|chunkin_keepalive]] directive which can enable HTTP 1.1 keep-alive and HTTP 1.1 pipelining, and defaults to <code>off</code>. |
3451 | -* fixed the <code>alphtype</code> bug in the Ragel parser spec; which caused rejection of non-ascii octets in the chunked data. Thanks J for his bug report. |
3452 | -* added <code>Test::Nginx::Socket</code> to test our nginx module on the socket level. Thanks J for his bug report. |
3453 | -* rewrote the bufs recycling part and preread-buf-to-rb-buf transition part, also refactored the Ragel parser spec, thus eliminating lots of serious bugs. |
3454 | -* provided better diagnostics in the error log message for "bad chunked body" parsefails in the chunked parser. For example: |
3455 | - |
3456 | -<geshi lang="text"> |
3457 | - 2009/12/02 17:35:52 [error] 32244#0: *1 bad chunked body (offset 7, near "4^M |
3458 | - hell <-- HERE o^M |
3459 | - 0^M |
3460 | - ^M |
3461 | - ", marked by " <-- HERE "). |
3462 | - , client: 127.0.0.1, server: localhost, request: "POST /main |
3463 | -HTTP/1.1", host: "localhost" |
3464 | -</geshi> |
3465 | - |
3466 | -* added some code to let the chunked parser handle special 0-size chunks that are not the last chunk. |
3467 | -* fixed a connection leak bug regarding incorrect <code>r->main->count</code> reference counter handling for nginx 0.8.11+ (well, the <code>ngx_http_read_client_request_body</code> function in the nginx core also has this issue, I'll report it later.) |
3468 | - |
3469 | -== v0.06 == |
3470 | -* minor optimization: we won't traverse the output chain link if the chain count is not large enough. |
3471 | - |
3472 | -= Test Suite = |
3473 | - |
3474 | -This module comes with a Perl-driven test suite. The [http://github.com/agentzh/chunkin-nginx-module/tree/master/test/t/ test cases] are |
3475 | -[http://github.com/agentzh/chunkin-nginx-module/blob/master/test/t/sanity.t declarative] too. Thanks to the [http://search.cpan.org/perldoc?Test::Base Test::Base] module in the Perl world. |
3476 | - |
3477 | -To run it on your side: |
3478 | - |
3479 | -<geshi lang="bash"> |
3480 | - $ cd test |
3481 | - $ PATH=/path/to/your/nginx-with-chunkin-module:$PATH prove -r t |
3482 | -</geshi> |
3483 | - |
3484 | -You need to terminate any Nginx processes before running the test suite if you have changed the Nginx server binary. |
3485 | - |
3486 | -At the moment, [http://search.cpan.org/perldoc?LWP::UserAgent LWP::UserAgent] is used by the [http://github.com/agentzh/chunkin-nginx-module/blob/master/test/lib/Test/Nginx/LWP.pm test scaffold] for simplicity. |
3487 | - |
3488 | -Because a single nginx server (by default, <code>localhost:1984</code>) is used across all the test scripts (<code>.t</code> files), it's meaningless to run the test suite in parallel by specifying <code>-jN</code> when invoking the <code>prove</code> utility. |
3489 | - |
3490 | -Some parts of the test suite requires modules [[HttpProxyModule|proxy]] and [[HttpEchoModule|echo]] to be enabled as well when building Nginx. |
3491 | - |
3492 | -= Known Issues = |
3493 | - |
3494 | -* May not work with certain 3rd party modules like the [http://www.grid.net.ru/nginx/upload.en.html upload module] because it implements its own request body reading mechanism. |
3495 | -* "client_body_in_single_buffer on" may *not* be obeyed for short contents and fast network. |
3496 | -* "client_body_in_file_only on" may *not* be obeyed for short contents and fast network. |
3497 | -* HTTP 1.1 pipelining may not fully work yet. |
3498 | - |
3499 | -= TODO = |
3500 | - |
3501 | -* make the chunkin handler run at the end of the <code>access phase</code> rather than beginning. |
3502 | -* add support for <code>trailers</code> as specified in the [http://tools.ietf.org/html/rfc2616#section-3.6.1 RFC 2616]. |
3503 | -* fix the [[#Known Issues|known issues]]. |
3504 | - |
3505 | -= Getting involved = |
3506 | - |
3507 | -You'll be very welcomed to submit patches to the [[#Author|author]] or just ask for a commit bit to the [[#Source Repository|source repository]] on GitHub. |
3508 | - |
3509 | -= Author = |
3510 | - |
3511 | -Zhang "agentzh" Yichun (章亦春) ''<agentzh@gmail.com>'' |
3512 | - |
3513 | -This wiki page is also maintained by the author himself, and everybody is encouraged to improve this page as well. |
3514 | - |
3515 | -= Copyright & License = |
3516 | - |
3517 | -The basic client request body reading code is based on the <code>ngx_http_read_client_request_body</code> function and its utility functions in the Nginx 0.8.20 core. This part of code is copyrighted by Igor Sysoev. |
3518 | - |
3519 | -Copyright (c) 2009, 2010, 2011, Zhang "agentzh" Yichun (章亦春) <agentzh@gmail.com>. |
3520 | - |
3521 | -This module is licensed under the terms of the BSD license. |
3522 | - |
3523 | -Redistribution and use in source and binary forms, with or without |
3524 | -modification, are permitted provided that the following conditions |
3525 | -are met: |
3526 | - |
3527 | -* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
3528 | -* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
3529 | -* Neither the name of the Taobao Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. |
3530 | - |
3531 | -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
3532 | -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
3533 | -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
3534 | -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
3535 | -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
3536 | -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED |
3537 | -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
3538 | -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
3539 | -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
3540 | -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
3541 | -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
3542 | - |
3543 | -= See Also = |
3544 | - |
3545 | -* The original thread on the Nginx mailing list that inspires this module's development: [http://forum.nginx.org/read.php?2,4453,20543 "'Content-Length' header for POSTs"]. |
3546 | -* The orginal announcement thread on the Nginx mailing list: [http://forum.nginx.org/read.php?2,22967 "The chunkin module: Experimental chunked input support for Nginx"]. |
3547 | -* The original [http://agentzh.spaces.live.com/blog/cns!FF3A735632E41548!481.entry blog post] about this module's initial development. |
3548 | -* The thread discussing chunked input support on the nginx-devel mailing list: [http://nginx.org/pipermail/nginx-devel/2009-December/000021.html "Chunked request body and HTTP header parser"]. |
3549 | -* The [[HttpEchoModule|echo module]] for Nginx module's automated testing. |
3550 | -* [http://tools.ietf.org/html/rfc2616#section-3.6.1 RFC 2616 - Chunked Transfer Coding]. |
3551 | - |
3552 | |
3553 | === removed directory 'debian/modules/chunkin-nginx-module/misc' |
3554 | === removed file 'debian/modules/chunkin-nginx-module/misc/Makefile' |
3555 | --- debian/modules/chunkin-nginx-module/misc/Makefile 2011-11-24 14:16:50 +0000 |
3556 | +++ debian/modules/chunkin-nginx-module/misc/Makefile 1970-01-01 00:00:00 +0000 |
3557 | @@ -1,6 +0,0 @@ |
3558 | -%: %.c |
3559 | - gcc -Wall -O2 -o $@ $< |
3560 | - |
3561 | -%.c: %.rl |
3562 | - ragel -G2 $< |
3563 | - |
3564 | |
3565 | === removed file 'debian/modules/chunkin-nginx-module/misc/README' |
3566 | --- debian/modules/chunkin-nginx-module/misc/README 2011-11-24 14:16:50 +0000 |
3567 | +++ debian/modules/chunkin-nginx-module/misc/README 1970-01-01 00:00:00 +0000 |
3568 | @@ -1,10 +0,0 @@ |
3569 | -This is a standalone program that tests the chunked body parser. |
3570 | - |
3571 | -To build the "chunked" program, run the following command within this directory: |
3572 | - |
3573 | - $ make chunked |
3574 | - |
3575 | -Then invoke the program like this: |
3576 | - |
3577 | - $ perl -e 'print "5\r\nhello\r\n0\r\n\r\n"' | ./chunked |
3578 | - |
3579 | |
3580 | === removed file 'debian/modules/chunkin-nginx-module/misc/chunked.rl' |
3581 | --- debian/modules/chunkin-nginx-module/misc/chunked.rl 2011-11-24 14:16:50 +0000 |
3582 | +++ debian/modules/chunkin-nginx-module/misc/chunked.rl 1970-01-01 00:00:00 +0000 |
3583 | @@ -1,114 +0,0 @@ |
3584 | -#include <stdio.h> |
3585 | -#include <string.h> |
3586 | - |
3587 | -enum { |
3588 | - BUFSIZE = 256 |
3589 | -}; |
3590 | - |
3591 | -%% machine chunked; |
3592 | -%% write data; |
3593 | - |
3594 | -int main (int argc, char **argv) |
3595 | -{ |
3596 | - int cs, res = 0; |
3597 | - char *p, *pe, *eof; |
3598 | - char buf[BUFSIZE]; |
3599 | - size_t len = 0; |
3600 | - size_t bytes_read; |
3601 | - eof = NULL; |
3602 | - size_t data_bytes_read = 0, chunk_size = 0; |
3603 | - int chunk_size_order = 0; |
3604 | - |
3605 | - %%{ |
3606 | - action bad_last_chunk { |
3607 | - fprintf(stderr, "bad last chunk (offset %d).\n", p - buf); |
3608 | - } |
3609 | - |
3610 | - action bad_chunk_data { |
3611 | - fprintf(stderr, "bad chunk data " |
3612 | - "(bytes already read %d, bytes expected: %d): " |
3613 | - "offset %d.\n", data_bytes_read, chunk_size, p - buf); |
3614 | - } |
3615 | - |
3616 | - action test_len { |
3617 | - data_bytes_read < chunk_size |
3618 | - } |
3619 | - |
3620 | - action read_data_byte { |
3621 | - data_bytes_read++; |
3622 | - fprintf(stderr, "data bytes read: %d (char: %c)\n", |
3623 | - data_bytes_read, *p); |
3624 | - } |
3625 | - |
3626 | - action start_reading_size { |
3627 | - data_bytes_read = 0; |
3628 | - chunk_size = 0; |
3629 | - chunk_size_order = 0; |
3630 | - } |
3631 | - |
3632 | - action read_size { |
3633 | - chunk_size <<= 4; |
3634 | - chunk_size_order++; |
3635 | - if (*p >= 'A' && *p <= 'F') { |
3636 | - chunk_size |= 10 + *p - 'A'; |
3637 | - } else if (*p >= 'a' && *p <= 'f') { |
3638 | - chunk_size |= 10 + *p - 'a'; |
3639 | - } else { |
3640 | - chunk_size |= *p - '0'; |
3641 | - } |
3642 | - printf("INFO: chunk size: %d\n", chunk_size); |
3643 | - } |
3644 | - |
3645 | - action verify_data { |
3646 | - if (data_bytes_read != chunk_size) { |
3647 | - fprintf(stderr, "ERROR: chunk size not meet: " |
3648 | - "%d != %d\n", data_bytes_read, chunk_size); |
3649 | - fbreak; |
3650 | - } |
3651 | - } |
3652 | - |
3653 | - CRLF = "\r\n"; |
3654 | - |
3655 | - chunk_size = (xdigit+ - "0") >start_reading_size $read_size; |
3656 | - |
3657 | - chunk_data_octet = any |
3658 | - when test_len $err(bad_chunk_data) $read_data_byte; |
3659 | - |
3660 | - chunk_data = chunk_data_octet* %verify_data; |
3661 | - |
3662 | - chunk = chunk_size " "* CRLF |
3663 | - chunk_data CRLF; |
3664 | - |
3665 | - last_chunk = "0" " "* CRLF ${ fprintf(stderr, "in last chunk %d (cs: %d)\n", p - buf, cs); }; #$err(bad_last_chunk); |
3666 | - |
3667 | - main := (chunk* |
3668 | - last_chunk |
3669 | - CRLF) %err{ fprintf(stderr, "in end %d (cs: %d)\n", p - buf, cs); }; |
3670 | - |
3671 | - }%% |
3672 | - |
3673 | - %% write init; |
3674 | - |
3675 | - while (len < BUFSIZE) { |
3676 | - bytes_read = |
3677 | - fread(buf + len, sizeof(char), BUFSIZE - len, stdin); |
3678 | - if (bytes_read == 0) { |
3679 | - break; |
3680 | - } |
3681 | - len += bytes_read; |
3682 | - if (feof(stdin) || ferror(stdin)) { |
3683 | - break; |
3684 | - } |
3685 | - } |
3686 | - |
3687 | - p = buf; |
3688 | - pe = buf + len; |
3689 | - |
3690 | - %% write exec; |
3691 | - |
3692 | - printf("cs >= first_final: %d, execute = %i, p moved %d, " |
3693 | - "p remaining: %d\n", cs >= chunked_first_final, res, p - buf, pe - p); |
3694 | - |
3695 | - return 0; |
3696 | -} |
3697 | - |
3698 | |
3699 | === removed directory 'debian/modules/chunkin-nginx-module/src' |
3700 | === removed file 'debian/modules/chunkin-nginx-module/src/chunked_parser.c' |
3701 | --- debian/modules/chunkin-nginx-module/src/chunked_parser.c 2011-11-24 14:16:50 +0000 |
3702 | +++ debian/modules/chunkin-nginx-module/src/chunked_parser.c 1970-01-01 00:00:00 +0000 |
3703 | @@ -1,1395 +0,0 @@ |
3704 | - |
3705 | -#line 1 "src/chunked_parser.rl" |
3706 | -/* Copyright (C) agentzh */ |
3707 | - |
3708 | -#ifndef DDEBUG |
3709 | -#define DDEBUG 0 |
3710 | -#endif |
3711 | - |
3712 | -#include "ddebug.h" |
3713 | - |
3714 | -#include "chunked_parser.h" |
3715 | -#include "ngx_http_chunkin_util.h" |
3716 | - |
3717 | -#define ngx_chunkin_min(x, y) ((x) < (y) ? (x) : (y)) |
3718 | - |
3719 | -enum { |
3720 | - PRE_TEXT_LEN = 25, |
3721 | - POST_TEXT_LEN = 25 |
3722 | -}; |
3723 | - |
3724 | - |
3725 | -#line 20 "src/chunked_parser.rl" |
3726 | - |
3727 | -#line 25 "src/chunked_parser.c" |
3728 | -static const int chunked_start = 1; |
3729 | -static const int chunked_first_final = 43; |
3730 | -static const int chunked_error = 0; |
3731 | - |
3732 | -static const int chunked_en_main = 1; |
3733 | - |
3734 | - |
3735 | -#line 21 "src/chunked_parser.rl" |
3736 | - |
3737 | - |
3738 | -ngx_int_t |
3739 | -ngx_http_chunkin_init_chunked_parser(ngx_http_request_t *r, |
3740 | - ngx_http_chunkin_ctx_t *ctx) |
3741 | -{ |
3742 | - int cs; |
3743 | - |
3744 | - |
3745 | -#line 43 "src/chunked_parser.c" |
3746 | - { |
3747 | - cs = chunked_start; |
3748 | - } |
3749 | - |
3750 | -#line 30 "src/chunked_parser.rl" |
3751 | - |
3752 | - ctx->chunks = NULL; |
3753 | - ctx->next_chunk = NULL; |
3754 | - ctx->chunk = NULL; |
3755 | - ctx->chunk_size = 0; |
3756 | - ctx->chunk_size_order = 0; |
3757 | - ctx->chunk_bytes_read = 0; |
3758 | - |
3759 | - ctx->chunks_total_size = 0; |
3760 | - |
3761 | - ctx->parser_state = cs; |
3762 | - |
3763 | - return NGX_OK; |
3764 | -} |
3765 | - |
3766 | - |
3767 | -ngx_int_t |
3768 | -ngx_http_chunkin_run_chunked_parser(ngx_http_request_t *r, |
3769 | - ngx_http_chunkin_ctx_t *ctx, u_char **pos_addr, u_char *last, char *caller_info) |
3770 | -{ |
3771 | - int cs = ctx->parser_state; |
3772 | - ngx_connection_t *c = r->connection; |
3773 | - signed char *pos = (signed char *) *pos_addr; |
3774 | - signed char *p = (signed char *) *pos_addr; |
3775 | - signed char *pe = (signed char *) last; |
3776 | - signed char *eof = NULL; |
3777 | - ngx_buf_t *b; |
3778 | - ngx_flag_t done = 0; |
3779 | - ngx_str_t pre, post; |
3780 | - char* err_ctx = ""; |
3781 | - ngx_str_t user_agent = ngx_null_string; |
3782 | - ssize_t rest; |
3783 | - |
3784 | - |
3785 | -#line 236 "src/chunked_parser.rl" |
3786 | - |
3787 | - |
3788 | - |
3789 | -#line 87 "src/chunked_parser.c" |
3790 | - { |
3791 | - short _widec; |
3792 | - if ( p == pe ) |
3793 | - goto _test_eof; |
3794 | - switch ( cs ) |
3795 | - { |
3796 | -case 1: |
3797 | - if ( (*p) == 48 ) |
3798 | - goto tr0; |
3799 | - if ( (*p) < 65 ) { |
3800 | - if ( 49 <= (*p) && (*p) <= 57 ) |
3801 | - goto tr2; |
3802 | - } else if ( (*p) > 70 ) { |
3803 | - if ( 97 <= (*p) && (*p) <= 102 ) |
3804 | - goto tr2; |
3805 | - } else |
3806 | - goto tr2; |
3807 | - goto st0; |
3808 | -tr3: |
3809 | -#line 227 "src/chunked_parser.rl" |
3810 | - { err_ctx = "last_chunk"; } |
3811 | - goto st0; |
3812 | -tr9: |
3813 | -#line 168 "src/chunked_parser.rl" |
3814 | - { err_ctx = "CRLF"; } |
3815 | -#line 227 "src/chunked_parser.rl" |
3816 | - { err_ctx = "last_chunk"; } |
3817 | - goto st0; |
3818 | -tr11: |
3819 | -#line 168 "src/chunked_parser.rl" |
3820 | - { err_ctx = "CRLF"; } |
3821 | -#line 227 "src/chunked_parser.rl" |
3822 | - { err_ctx = "last_chunk"; } |
3823 | -#line 231 "src/chunked_parser.rl" |
3824 | - { err_ctx = "parser"; } |
3825 | - goto st0; |
3826 | -tr13: |
3827 | -#line 168 "src/chunked_parser.rl" |
3828 | - { err_ctx = "CRLF"; } |
3829 | -#line 231 "src/chunked_parser.rl" |
3830 | - { err_ctx = "parser"; } |
3831 | - goto st0; |
3832 | -tr23: |
3833 | -#line 168 "src/chunked_parser.rl" |
3834 | - { err_ctx = "CRLF"; } |
3835 | - goto st0; |
3836 | -tr29: |
3837 | -#line 218 "src/chunked_parser.rl" |
3838 | - { err_ctx = "chunk_size"; } |
3839 | -#line 221 "src/chunked_parser.rl" |
3840 | - { err_ctx = "chunk_ext"; } |
3841 | - goto st0; |
3842 | -tr33: |
3843 | -#line 168 "src/chunked_parser.rl" |
3844 | - { err_ctx = "CRLF"; } |
3845 | -#line 221 "src/chunked_parser.rl" |
3846 | - { err_ctx = "chunk_ext"; } |
3847 | - goto st0; |
3848 | -tr35: |
3849 | -#line 168 "src/chunked_parser.rl" |
3850 | - { err_ctx = "CRLF"; } |
3851 | -#line 221 "src/chunked_parser.rl" |
3852 | - { err_ctx = "chunk_ext"; } |
3853 | -#line 177 "src/chunked_parser.rl" |
3854 | - { err_ctx = "chunk_data"; } |
3855 | - goto st0; |
3856 | -tr37: |
3857 | -#line 177 "src/chunked_parser.rl" |
3858 | - { err_ctx = "chunk_data"; } |
3859 | - goto st0; |
3860 | -tr40: |
3861 | -#line 181 "src/chunked_parser.rl" |
3862 | - { err_ctx = "chunk_data_terminator"; } |
3863 | - goto st0; |
3864 | -tr43: |
3865 | -#line 221 "src/chunked_parser.rl" |
3866 | - { err_ctx = "chunk_ext"; } |
3867 | - goto st0; |
3868 | -#line 166 "src/chunked_parser.c" |
3869 | -st0: |
3870 | -cs = 0; |
3871 | - goto _out; |
3872 | -tr0: |
3873 | -#line 98 "src/chunked_parser.rl" |
3874 | - { |
3875 | - ctx->chunk_bytes_read = 0; |
3876 | - ctx->chunk_size = 0; |
3877 | - ctx->chunk_size_order = 0; |
3878 | - } |
3879 | -#line 104 "src/chunked_parser.rl" |
3880 | - { |
3881 | - ctx->chunk_size <<= 4; |
3882 | - ctx->chunk_size_order++; |
3883 | - if (*p >= 'A' && *p <= 'F') { |
3884 | - ctx->chunk_size |= 10 + *p - 'A'; |
3885 | - } else if (*p >= 'a' && *p <= 'f') { |
3886 | - ctx->chunk_size |= 10 + *p - 'a'; |
3887 | - } else { |
3888 | - ctx->chunk_size |= *p - '0'; |
3889 | - } |
3890 | - |
3891 | - ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, |
3892 | - "chunkin: chunk size: %uz\n", ctx->chunk_size); |
3893 | - } |
3894 | - goto st2; |
3895 | -tr6: |
3896 | -#line 104 "src/chunked_parser.rl" |
3897 | - { |
3898 | - ctx->chunk_size <<= 4; |
3899 | - ctx->chunk_size_order++; |
3900 | - if (*p >= 'A' && *p <= 'F') { |
3901 | - ctx->chunk_size |= 10 + *p - 'A'; |
3902 | - } else if (*p >= 'a' && *p <= 'f') { |
3903 | - ctx->chunk_size |= 10 + *p - 'a'; |
3904 | - } else { |
3905 | - ctx->chunk_size |= *p - '0'; |
3906 | - } |
3907 | - |
3908 | - ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, |
3909 | - "chunkin: chunk size: %uz\n", ctx->chunk_size); |
3910 | - } |
3911 | - goto st2; |
3912 | -st2: |
3913 | - if ( ++p == pe ) |
3914 | - goto _test_eof2; |
3915 | -case 2: |
3916 | -#line 214 "src/chunked_parser.c" |
3917 | - switch( (*p) ) { |
3918 | - case 9: goto st3; |
3919 | - case 13: goto st4; |
3920 | - case 32: goto st3; |
3921 | - case 48: goto tr6; |
3922 | - case 59: goto st7; |
3923 | - } |
3924 | - if ( (*p) < 65 ) { |
3925 | - if ( 49 <= (*p) && (*p) <= 57 ) |
3926 | - goto tr7; |
3927 | - } else if ( (*p) > 70 ) { |
3928 | - if ( 97 <= (*p) && (*p) <= 102 ) |
3929 | - goto tr7; |
3930 | - } else |
3931 | - goto tr7; |
3932 | - goto tr3; |
3933 | -st3: |
3934 | - if ( ++p == pe ) |
3935 | - goto _test_eof3; |
3936 | -case 3: |
3937 | - switch( (*p) ) { |
3938 | - case 9: goto st3; |
3939 | - case 13: goto st4; |
3940 | - case 32: goto st3; |
3941 | - case 59: goto st7; |
3942 | - } |
3943 | - goto tr3; |
3944 | -st4: |
3945 | - if ( ++p == pe ) |
3946 | - goto _test_eof4; |
3947 | -case 4: |
3948 | - if ( (*p) == 10 ) |
3949 | - goto st5; |
3950 | - goto tr9; |
3951 | -st5: |
3952 | - if ( ++p == pe ) |
3953 | - goto _test_eof5; |
3954 | -case 5: |
3955 | - if ( (*p) == 13 ) |
3956 | - goto st6; |
3957 | - goto tr11; |
3958 | -st6: |
3959 | - if ( ++p == pe ) |
3960 | - goto _test_eof6; |
3961 | -case 6: |
3962 | - if ( (*p) == 10 ) |
3963 | - goto tr14; |
3964 | - goto tr13; |
3965 | -tr14: |
3966 | -#line 66 "src/chunked_parser.rl" |
3967 | - { |
3968 | - done = 1; |
3969 | - } |
3970 | - goto st43; |
3971 | -st43: |
3972 | - if ( ++p == pe ) |
3973 | - goto _test_eof43; |
3974 | -case 43: |
3975 | -#line 273 "src/chunked_parser.c" |
3976 | - goto tr13; |
3977 | -st7: |
3978 | - if ( ++p == pe ) |
3979 | - goto _test_eof7; |
3980 | -case 7: |
3981 | - switch( (*p) ) { |
3982 | - case 9: goto st7; |
3983 | - case 32: goto st7; |
3984 | - case 34: goto st0; |
3985 | - case 44: goto st0; |
3986 | - case 47: goto st0; |
3987 | - case 123: goto st0; |
3988 | - case 125: goto st0; |
3989 | - case 127: goto st0; |
3990 | - } |
3991 | - if ( (*p) < 40 ) { |
3992 | - if ( 0 <= (*p) && (*p) <= 31 ) |
3993 | - goto st0; |
3994 | - } else if ( (*p) > 41 ) { |
3995 | - if ( (*p) > 64 ) { |
3996 | - if ( 91 <= (*p) && (*p) <= 93 ) |
3997 | - goto st0; |
3998 | - } else if ( (*p) >= 58 ) |
3999 | - goto st0; |
4000 | - } else |
4001 | - goto st0; |
4002 | - goto st8; |
4003 | -st8: |
4004 | - if ( ++p == pe ) |
4005 | - goto _test_eof8; |
4006 | -case 8: |
4007 | - switch( (*p) ) { |
4008 | - case 9: goto st9; |
4009 | - case 13: goto st4; |
4010 | - case 32: goto st9; |
4011 | - case 34: goto tr3; |
4012 | - case 44: goto tr3; |
4013 | - case 47: goto tr3; |
4014 | - case 59: goto st7; |
4015 | - case 61: goto st10; |
4016 | - case 123: goto tr3; |
4017 | - case 125: goto tr3; |
4018 | - case 127: goto tr3; |
4019 | - } |
4020 | - if ( (*p) < 40 ) { |
4021 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4022 | - goto tr3; |
4023 | - } else if ( (*p) > 41 ) { |
4024 | - if ( (*p) > 64 ) { |
4025 | - if ( 91 <= (*p) && (*p) <= 93 ) |
4026 | - goto tr3; |
4027 | - } else if ( (*p) >= 58 ) |
4028 | - goto tr3; |
4029 | - } else |
4030 | - goto tr3; |
4031 | - goto st8; |
4032 | -st9: |
4033 | - if ( ++p == pe ) |
4034 | - goto _test_eof9; |
4035 | -case 9: |
4036 | - switch( (*p) ) { |
4037 | - case 9: goto st9; |
4038 | - case 13: goto st4; |
4039 | - case 32: goto st9; |
4040 | - case 59: goto st7; |
4041 | - case 61: goto st10; |
4042 | - } |
4043 | - goto tr3; |
4044 | -st10: |
4045 | - if ( ++p == pe ) |
4046 | - goto _test_eof10; |
4047 | -case 10: |
4048 | - switch( (*p) ) { |
4049 | - case 9: goto st10; |
4050 | - case 32: goto st10; |
4051 | - case 34: goto st12; |
4052 | - case 44: goto st0; |
4053 | - case 47: goto st0; |
4054 | - case 123: goto st0; |
4055 | - case 125: goto st0; |
4056 | - case 127: goto st0; |
4057 | - } |
4058 | - if ( (*p) < 40 ) { |
4059 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4060 | - goto st0; |
4061 | - } else if ( (*p) > 41 ) { |
4062 | - if ( (*p) > 64 ) { |
4063 | - if ( 91 <= (*p) && (*p) <= 93 ) |
4064 | - goto st0; |
4065 | - } else if ( (*p) >= 58 ) |
4066 | - goto st0; |
4067 | - } else |
4068 | - goto st0; |
4069 | - goto st11; |
4070 | -st11: |
4071 | - if ( ++p == pe ) |
4072 | - goto _test_eof11; |
4073 | -case 11: |
4074 | - switch( (*p) ) { |
4075 | - case 9: goto st3; |
4076 | - case 13: goto st4; |
4077 | - case 32: goto st3; |
4078 | - case 34: goto tr3; |
4079 | - case 44: goto tr3; |
4080 | - case 47: goto tr3; |
4081 | - case 59: goto st7; |
4082 | - case 123: goto tr3; |
4083 | - case 125: goto tr3; |
4084 | - case 127: goto tr3; |
4085 | - } |
4086 | - if ( (*p) < 40 ) { |
4087 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4088 | - goto tr3; |
4089 | - } else if ( (*p) > 41 ) { |
4090 | - if ( (*p) > 64 ) { |
4091 | - if ( 91 <= (*p) && (*p) <= 93 ) |
4092 | - goto tr3; |
4093 | - } else if ( (*p) >= 58 ) |
4094 | - goto tr3; |
4095 | - } else |
4096 | - goto tr3; |
4097 | - goto st11; |
4098 | -st12: |
4099 | - if ( ++p == pe ) |
4100 | - goto _test_eof12; |
4101 | -case 12: |
4102 | - switch( (*p) ) { |
4103 | - case 34: goto st3; |
4104 | - case 92: goto st13; |
4105 | - case 127: goto st0; |
4106 | - } |
4107 | - if ( (*p) > 8 ) { |
4108 | - if ( 10 <= (*p) && (*p) <= 31 ) |
4109 | - goto st0; |
4110 | - } else if ( (*p) >= 0 ) |
4111 | - goto st0; |
4112 | - goto st12; |
4113 | -st13: |
4114 | - if ( ++p == pe ) |
4115 | - goto _test_eof13; |
4116 | -case 13: |
4117 | - switch( (*p) ) { |
4118 | - case 13: goto st14; |
4119 | - case 34: goto st15; |
4120 | - case 92: goto st13; |
4121 | - } |
4122 | - goto st12; |
4123 | -st14: |
4124 | - if ( ++p == pe ) |
4125 | - goto _test_eof14; |
4126 | -case 14: |
4127 | - switch( (*p) ) { |
4128 | - case 34: goto st3; |
4129 | - case 92: goto st13; |
4130 | - case 127: goto tr23; |
4131 | - } |
4132 | - if ( (*p) > 8 ) { |
4133 | - if ( 10 <= (*p) && (*p) <= 31 ) |
4134 | - goto tr23; |
4135 | - } else if ( (*p) >= 0 ) |
4136 | - goto tr23; |
4137 | - goto st12; |
4138 | -st15: |
4139 | - if ( ++p == pe ) |
4140 | - goto _test_eof15; |
4141 | -case 15: |
4142 | - switch( (*p) ) { |
4143 | - case 9: goto st15; |
4144 | - case 13: goto st4; |
4145 | - case 32: goto st15; |
4146 | - case 34: goto st3; |
4147 | - case 59: goto st16; |
4148 | - case 92: goto st13; |
4149 | - case 127: goto tr3; |
4150 | - } |
4151 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4152 | - goto tr3; |
4153 | - goto st12; |
4154 | -st16: |
4155 | - if ( ++p == pe ) |
4156 | - goto _test_eof16; |
4157 | -case 16: |
4158 | - switch( (*p) ) { |
4159 | - case 9: goto st16; |
4160 | - case 32: goto st16; |
4161 | - case 34: goto st3; |
4162 | - case 44: goto st12; |
4163 | - case 47: goto st12; |
4164 | - case 92: goto st13; |
4165 | - case 123: goto st12; |
4166 | - case 125: goto st12; |
4167 | - case 127: goto st0; |
4168 | - } |
4169 | - if ( (*p) < 40 ) { |
4170 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4171 | - goto st0; |
4172 | - } else if ( (*p) > 41 ) { |
4173 | - if ( (*p) > 64 ) { |
4174 | - if ( 91 <= (*p) && (*p) <= 93 ) |
4175 | - goto st12; |
4176 | - } else if ( (*p) >= 58 ) |
4177 | - goto st12; |
4178 | - } else |
4179 | - goto st12; |
4180 | - goto st17; |
4181 | -st17: |
4182 | - if ( ++p == pe ) |
4183 | - goto _test_eof17; |
4184 | -case 17: |
4185 | - switch( (*p) ) { |
4186 | - case 9: goto st18; |
4187 | - case 13: goto st4; |
4188 | - case 32: goto st18; |
4189 | - case 34: goto st3; |
4190 | - case 44: goto st12; |
4191 | - case 47: goto st12; |
4192 | - case 59: goto st16; |
4193 | - case 61: goto st19; |
4194 | - case 92: goto st13; |
4195 | - case 123: goto st12; |
4196 | - case 125: goto st12; |
4197 | - case 127: goto tr3; |
4198 | - } |
4199 | - if ( (*p) < 40 ) { |
4200 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4201 | - goto tr3; |
4202 | - } else if ( (*p) > 41 ) { |
4203 | - if ( (*p) > 64 ) { |
4204 | - if ( 91 <= (*p) && (*p) <= 93 ) |
4205 | - goto st12; |
4206 | - } else if ( (*p) >= 58 ) |
4207 | - goto st12; |
4208 | - } else |
4209 | - goto st12; |
4210 | - goto st17; |
4211 | -st18: |
4212 | - if ( ++p == pe ) |
4213 | - goto _test_eof18; |
4214 | -case 18: |
4215 | - switch( (*p) ) { |
4216 | - case 9: goto st18; |
4217 | - case 13: goto st4; |
4218 | - case 32: goto st18; |
4219 | - case 34: goto st3; |
4220 | - case 59: goto st16; |
4221 | - case 61: goto st19; |
4222 | - case 92: goto st13; |
4223 | - case 127: goto tr3; |
4224 | - } |
4225 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4226 | - goto tr3; |
4227 | - goto st12; |
4228 | -st19: |
4229 | - if ( ++p == pe ) |
4230 | - goto _test_eof19; |
4231 | -case 19: |
4232 | - switch( (*p) ) { |
4233 | - case 9: goto st19; |
4234 | - case 32: goto st19; |
4235 | - case 34: goto st15; |
4236 | - case 44: goto st12; |
4237 | - case 47: goto st12; |
4238 | - case 92: goto st13; |
4239 | - case 123: goto st12; |
4240 | - case 125: goto st12; |
4241 | - case 127: goto st0; |
4242 | - } |
4243 | - if ( (*p) < 40 ) { |
4244 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4245 | - goto st0; |
4246 | - } else if ( (*p) > 41 ) { |
4247 | - if ( (*p) > 64 ) { |
4248 | - if ( 91 <= (*p) && (*p) <= 93 ) |
4249 | - goto st12; |
4250 | - } else if ( (*p) >= 58 ) |
4251 | - goto st12; |
4252 | - } else |
4253 | - goto st12; |
4254 | - goto st20; |
4255 | -st20: |
4256 | - if ( ++p == pe ) |
4257 | - goto _test_eof20; |
4258 | -case 20: |
4259 | - switch( (*p) ) { |
4260 | - case 9: goto st15; |
4261 | - case 13: goto st4; |
4262 | - case 32: goto st15; |
4263 | - case 34: goto st3; |
4264 | - case 44: goto st12; |
4265 | - case 47: goto st12; |
4266 | - case 59: goto st16; |
4267 | - case 92: goto st13; |
4268 | - case 123: goto st12; |
4269 | - case 125: goto st12; |
4270 | - case 127: goto tr3; |
4271 | - } |
4272 | - if ( (*p) < 40 ) { |
4273 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4274 | - goto tr3; |
4275 | - } else if ( (*p) > 41 ) { |
4276 | - if ( (*p) > 64 ) { |
4277 | - if ( 91 <= (*p) && (*p) <= 93 ) |
4278 | - goto st12; |
4279 | - } else if ( (*p) >= 58 ) |
4280 | - goto st12; |
4281 | - } else |
4282 | - goto st12; |
4283 | - goto st20; |
4284 | -tr2: |
4285 | -#line 98 "src/chunked_parser.rl" |
4286 | - { |
4287 | - ctx->chunk_bytes_read = 0; |
4288 | - ctx->chunk_size = 0; |
4289 | - ctx->chunk_size_order = 0; |
4290 | - } |
4291 | -#line 104 "src/chunked_parser.rl" |
4292 | - { |
4293 | - ctx->chunk_size <<= 4; |
4294 | - ctx->chunk_size_order++; |
4295 | - if (*p >= 'A' && *p <= 'F') { |
4296 | - ctx->chunk_size |= 10 + *p - 'A'; |
4297 | - } else if (*p >= 'a' && *p <= 'f') { |
4298 | - ctx->chunk_size |= 10 + *p - 'a'; |
4299 | - } else { |
4300 | - ctx->chunk_size |= *p - '0'; |
4301 | - } |
4302 | - |
4303 | - ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, |
4304 | - "chunkin: chunk size: %uz\n", ctx->chunk_size); |
4305 | - } |
4306 | - goto st21; |
4307 | -tr7: |
4308 | -#line 104 "src/chunked_parser.rl" |
4309 | - { |
4310 | - ctx->chunk_size <<= 4; |
4311 | - ctx->chunk_size_order++; |
4312 | - if (*p >= 'A' && *p <= 'F') { |
4313 | - ctx->chunk_size |= 10 + *p - 'A'; |
4314 | - } else if (*p >= 'a' && *p <= 'f') { |
4315 | - ctx->chunk_size |= 10 + *p - 'a'; |
4316 | - } else { |
4317 | - ctx->chunk_size |= *p - '0'; |
4318 | - } |
4319 | - |
4320 | - ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, |
4321 | - "chunkin: chunk size: %uz\n", ctx->chunk_size); |
4322 | - } |
4323 | - goto st21; |
4324 | -st21: |
4325 | - if ( ++p == pe ) |
4326 | - goto _test_eof21; |
4327 | -case 21: |
4328 | -#line 626 "src/chunked_parser.c" |
4329 | - switch( (*p) ) { |
4330 | - case 9: goto st22; |
4331 | - case 13: goto st23; |
4332 | - case 32: goto st22; |
4333 | - case 59: goto st28; |
4334 | - } |
4335 | - if ( (*p) < 65 ) { |
4336 | - if ( 48 <= (*p) && (*p) <= 57 ) |
4337 | - goto tr7; |
4338 | - } else if ( (*p) > 70 ) { |
4339 | - if ( 97 <= (*p) && (*p) <= 102 ) |
4340 | - goto tr7; |
4341 | - } else |
4342 | - goto tr7; |
4343 | - goto tr29; |
4344 | -st22: |
4345 | - if ( ++p == pe ) |
4346 | - goto _test_eof22; |
4347 | -case 22: |
4348 | - switch( (*p) ) { |
4349 | - case 9: goto st22; |
4350 | - case 13: goto st23; |
4351 | - case 32: goto st22; |
4352 | - case 59: goto st28; |
4353 | - } |
4354 | - goto tr29; |
4355 | -st23: |
4356 | - if ( ++p == pe ) |
4357 | - goto _test_eof23; |
4358 | -case 23: |
4359 | - if ( (*p) == 10 ) |
4360 | - goto st24; |
4361 | - goto tr33; |
4362 | -st24: |
4363 | - if ( ++p == pe ) |
4364 | - goto _test_eof24; |
4365 | -case 24: |
4366 | - _widec = (*p); |
4367 | - _widec = (short)(128 + ((*p) - -128)); |
4368 | - if ( |
4369 | -#line 70 "src/chunked_parser.rl" |
4370 | - |
4371 | - ctx->chunk_bytes_read < ctx->chunk_size |
4372 | - ) _widec += 256; |
4373 | - if ( 384 <= _widec && _widec <= 639 ) |
4374 | - goto tr36; |
4375 | - goto tr35; |
4376 | -tr36: |
4377 | -#line 119 "src/chunked_parser.rl" |
4378 | - { |
4379 | - ctx->chunk = ngx_http_chunkin_get_buf(r->pool, ctx); |
4380 | - |
4381 | - ctx->chunks_count++; |
4382 | - |
4383 | - if (ctx->chunks) { |
4384 | - *ctx->next_chunk = ctx->chunk; |
4385 | - } else { |
4386 | - ctx->chunks = ctx->chunk; |
4387 | - } |
4388 | - |
4389 | - ctx->next_chunk = &ctx->chunk->next; |
4390 | - |
4391 | - b = ctx->chunk->buf; |
4392 | - |
4393 | - b->last = b->pos = (u_char *) p; |
4394 | - b->memory = 1; |
4395 | - } |
4396 | -#line 74 "src/chunked_parser.rl" |
4397 | - { |
4398 | - /* optimization for buffered chunk data */ |
4399 | - |
4400 | - rest = ngx_chunkin_min( |
4401 | - (ssize_t)ctx->chunk_size - (ssize_t)ctx->chunk_bytes_read, |
4402 | - (ssize_t)(pe - p)); |
4403 | - |
4404 | - dd("moving %d, chunk size %d, read %d, rest %d", |
4405 | - (int)rest, |
4406 | - (int)ctx->chunk_size, |
4407 | - (int)ctx->chunk_bytes_read, |
4408 | - (int)rest); |
4409 | - |
4410 | - ctx->chunk_bytes_read += rest; |
4411 | - p += rest - 1; |
4412 | - ctx->chunk->buf->last = (u_char *)p + 1; |
4413 | - ctx->chunks_total_size += rest; |
4414 | - |
4415 | - /* dd("bytes read: %d (char '%c', bytes read %d, chunk size %d)", ctx->chunk->buf->last - ctx->chunk->buf->pos, *p, ctx->chunk_bytes_read, ctx->chunk_size); */ |
4416 | - ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0, |
4417 | - "chunkin: data bytes read: %uz (char: \"%c\")\n", |
4418 | - ctx->chunk_bytes_read, *p); |
4419 | - } |
4420 | - goto st25; |
4421 | -tr39: |
4422 | -#line 74 "src/chunked_parser.rl" |
4423 | - { |
4424 | - /* optimization for buffered chunk data */ |
4425 | - |
4426 | - rest = ngx_chunkin_min( |
4427 | - (ssize_t)ctx->chunk_size - (ssize_t)ctx->chunk_bytes_read, |
4428 | - (ssize_t)(pe - p)); |
4429 | - |
4430 | - dd("moving %d, chunk size %d, read %d, rest %d", |
4431 | - (int)rest, |
4432 | - (int)ctx->chunk_size, |
4433 | - (int)ctx->chunk_bytes_read, |
4434 | - (int)rest); |
4435 | - |
4436 | - ctx->chunk_bytes_read += rest; |
4437 | - p += rest - 1; |
4438 | - ctx->chunk->buf->last = (u_char *)p + 1; |
4439 | - ctx->chunks_total_size += rest; |
4440 | - |
4441 | - /* dd("bytes read: %d (char '%c', bytes read %d, chunk size %d)", ctx->chunk->buf->last - ctx->chunk->buf->pos, *p, ctx->chunk_bytes_read, ctx->chunk_size); */ |
4442 | - ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0, |
4443 | - "chunkin: data bytes read: %uz (char: \"%c\")\n", |
4444 | - ctx->chunk_bytes_read, *p); |
4445 | - } |
4446 | - goto st25; |
4447 | -st25: |
4448 | - if ( ++p == pe ) |
4449 | - goto _test_eof25; |
4450 | -case 25: |
4451 | -#line 749 "src/chunked_parser.c" |
4452 | - _widec = (*p); |
4453 | - if ( (*p) < 13 ) { |
4454 | - if ( (*p) <= 12 ) { |
4455 | - _widec = (short)(128 + ((*p) - -128)); |
4456 | - if ( |
4457 | -#line 70 "src/chunked_parser.rl" |
4458 | - |
4459 | - ctx->chunk_bytes_read < ctx->chunk_size |
4460 | - ) _widec += 256; |
4461 | - } |
4462 | - } else if ( (*p) > 13 ) { |
4463 | - if ( 14 <= (*p) ) |
4464 | - { _widec = (short)(128 + ((*p) - -128)); |
4465 | - if ( |
4466 | -#line 70 "src/chunked_parser.rl" |
4467 | - |
4468 | - ctx->chunk_bytes_read < ctx->chunk_size |
4469 | - ) _widec += 256; |
4470 | - } |
4471 | - } else { |
4472 | - _widec = (short)(128 + ((*p) - -128)); |
4473 | - if ( |
4474 | -#line 70 "src/chunked_parser.rl" |
4475 | - |
4476 | - ctx->chunk_bytes_read < ctx->chunk_size |
4477 | - ) _widec += 256; |
4478 | - } |
4479 | - if ( _widec == 269 ) |
4480 | - goto st26; |
4481 | - if ( 384 <= _widec && _widec <= 639 ) |
4482 | - goto tr39; |
4483 | - goto tr37; |
4484 | -st26: |
4485 | - if ( ++p == pe ) |
4486 | - goto _test_eof26; |
4487 | -case 26: |
4488 | - if ( (*p) == 10 ) |
4489 | - goto tr41; |
4490 | - goto tr40; |
4491 | -tr41: |
4492 | -#line 138 "src/chunked_parser.rl" |
4493 | - { |
4494 | - if (ctx->chunk_bytes_read != ctx->chunk_size) { |
4495 | - ngx_log_error(NGX_LOG_ERR, c->log, 0, |
4496 | - "ERROR: chunk size not met: " |
4497 | - "%uz != %uz\n", ctx->chunk_bytes_read, |
4498 | - ctx->chunk_size); |
4499 | - *pos_addr = (u_char*) p; |
4500 | - ctx->parser_state = chunked_error; |
4501 | - return NGX_ERROR; |
4502 | - } |
4503 | - |
4504 | - if (ctx->chunk_size == 0) { |
4505 | - /* remove the current chunk */ |
4506 | - ctx->chunk->next = ctx->free_bufs; |
4507 | - ctx->free_bufs = ctx->chunk; |
4508 | - ctx->chunk = ctx->last_complete_chunk; |
4509 | - if (ctx->last_complete_chunk) { |
4510 | - ctx->last_complete_chunk->next = NULL; |
4511 | - } else { |
4512 | - ctx->chunks = NULL; |
4513 | - } |
4514 | - } else { |
4515 | - ctx->last_complete_chunk = ctx->chunk; |
4516 | - } |
4517 | - } |
4518 | - goto st27; |
4519 | -st27: |
4520 | - if ( ++p == pe ) |
4521 | - goto _test_eof27; |
4522 | -case 27: |
4523 | -#line 821 "src/chunked_parser.c" |
4524 | - if ( (*p) == 48 ) |
4525 | - goto tr0; |
4526 | - if ( (*p) < 65 ) { |
4527 | - if ( 49 <= (*p) && (*p) <= 57 ) |
4528 | - goto tr2; |
4529 | - } else if ( (*p) > 70 ) { |
4530 | - if ( 97 <= (*p) && (*p) <= 102 ) |
4531 | - goto tr2; |
4532 | - } else |
4533 | - goto tr2; |
4534 | - goto tr40; |
4535 | -st28: |
4536 | - if ( ++p == pe ) |
4537 | - goto _test_eof28; |
4538 | -case 28: |
4539 | - switch( (*p) ) { |
4540 | - case 9: goto st28; |
4541 | - case 32: goto st28; |
4542 | - case 34: goto st0; |
4543 | - case 44: goto st0; |
4544 | - case 47: goto st0; |
4545 | - case 123: goto st0; |
4546 | - case 125: goto st0; |
4547 | - case 127: goto st0; |
4548 | - } |
4549 | - if ( (*p) < 40 ) { |
4550 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4551 | - goto st0; |
4552 | - } else if ( (*p) > 41 ) { |
4553 | - if ( (*p) > 64 ) { |
4554 | - if ( 91 <= (*p) && (*p) <= 93 ) |
4555 | - goto st0; |
4556 | - } else if ( (*p) >= 58 ) |
4557 | - goto st0; |
4558 | - } else |
4559 | - goto st0; |
4560 | - goto st29; |
4561 | -st29: |
4562 | - if ( ++p == pe ) |
4563 | - goto _test_eof29; |
4564 | -case 29: |
4565 | - switch( (*p) ) { |
4566 | - case 9: goto st30; |
4567 | - case 13: goto st23; |
4568 | - case 32: goto st30; |
4569 | - case 34: goto tr43; |
4570 | - case 44: goto tr43; |
4571 | - case 47: goto tr43; |
4572 | - case 59: goto st28; |
4573 | - case 61: goto st31; |
4574 | - case 123: goto tr43; |
4575 | - case 125: goto tr43; |
4576 | - case 127: goto tr43; |
4577 | - } |
4578 | - if ( (*p) < 40 ) { |
4579 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4580 | - goto tr43; |
4581 | - } else if ( (*p) > 41 ) { |
4582 | - if ( (*p) > 64 ) { |
4583 | - if ( 91 <= (*p) && (*p) <= 93 ) |
4584 | - goto tr43; |
4585 | - } else if ( (*p) >= 58 ) |
4586 | - goto tr43; |
4587 | - } else |
4588 | - goto tr43; |
4589 | - goto st29; |
4590 | -st30: |
4591 | - if ( ++p == pe ) |
4592 | - goto _test_eof30; |
4593 | -case 30: |
4594 | - switch( (*p) ) { |
4595 | - case 9: goto st30; |
4596 | - case 13: goto st23; |
4597 | - case 32: goto st30; |
4598 | - case 59: goto st28; |
4599 | - case 61: goto st31; |
4600 | - } |
4601 | - goto tr43; |
4602 | -st31: |
4603 | - if ( ++p == pe ) |
4604 | - goto _test_eof31; |
4605 | -case 31: |
4606 | - switch( (*p) ) { |
4607 | - case 9: goto st31; |
4608 | - case 32: goto st31; |
4609 | - case 34: goto st34; |
4610 | - case 44: goto st0; |
4611 | - case 47: goto st0; |
4612 | - case 123: goto st0; |
4613 | - case 125: goto st0; |
4614 | - case 127: goto st0; |
4615 | - } |
4616 | - if ( (*p) < 40 ) { |
4617 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4618 | - goto st0; |
4619 | - } else if ( (*p) > 41 ) { |
4620 | - if ( (*p) > 64 ) { |
4621 | - if ( 91 <= (*p) && (*p) <= 93 ) |
4622 | - goto st0; |
4623 | - } else if ( (*p) >= 58 ) |
4624 | - goto st0; |
4625 | - } else |
4626 | - goto st0; |
4627 | - goto st32; |
4628 | -st32: |
4629 | - if ( ++p == pe ) |
4630 | - goto _test_eof32; |
4631 | -case 32: |
4632 | - switch( (*p) ) { |
4633 | - case 9: goto st33; |
4634 | - case 13: goto st23; |
4635 | - case 32: goto st33; |
4636 | - case 34: goto tr43; |
4637 | - case 44: goto tr43; |
4638 | - case 47: goto tr43; |
4639 | - case 59: goto st28; |
4640 | - case 123: goto tr43; |
4641 | - case 125: goto tr43; |
4642 | - case 127: goto tr43; |
4643 | - } |
4644 | - if ( (*p) < 40 ) { |
4645 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4646 | - goto tr43; |
4647 | - } else if ( (*p) > 41 ) { |
4648 | - if ( (*p) > 64 ) { |
4649 | - if ( 91 <= (*p) && (*p) <= 93 ) |
4650 | - goto tr43; |
4651 | - } else if ( (*p) >= 58 ) |
4652 | - goto tr43; |
4653 | - } else |
4654 | - goto tr43; |
4655 | - goto st32; |
4656 | -st33: |
4657 | - if ( ++p == pe ) |
4658 | - goto _test_eof33; |
4659 | -case 33: |
4660 | - switch( (*p) ) { |
4661 | - case 9: goto st33; |
4662 | - case 13: goto st23; |
4663 | - case 32: goto st33; |
4664 | - case 59: goto st28; |
4665 | - } |
4666 | - goto tr43; |
4667 | -st34: |
4668 | - if ( ++p == pe ) |
4669 | - goto _test_eof34; |
4670 | -case 34: |
4671 | - switch( (*p) ) { |
4672 | - case 34: goto st33; |
4673 | - case 92: goto st35; |
4674 | - case 127: goto st0; |
4675 | - } |
4676 | - if ( (*p) > 8 ) { |
4677 | - if ( 10 <= (*p) && (*p) <= 31 ) |
4678 | - goto st0; |
4679 | - } else if ( (*p) >= 0 ) |
4680 | - goto st0; |
4681 | - goto st34; |
4682 | -st35: |
4683 | - if ( ++p == pe ) |
4684 | - goto _test_eof35; |
4685 | -case 35: |
4686 | - switch( (*p) ) { |
4687 | - case 13: goto st36; |
4688 | - case 34: goto st37; |
4689 | - case 92: goto st35; |
4690 | - } |
4691 | - goto st34; |
4692 | -st36: |
4693 | - if ( ++p == pe ) |
4694 | - goto _test_eof36; |
4695 | -case 36: |
4696 | - switch( (*p) ) { |
4697 | - case 34: goto st33; |
4698 | - case 92: goto st35; |
4699 | - case 127: goto tr23; |
4700 | - } |
4701 | - if ( (*p) > 8 ) { |
4702 | - if ( 10 <= (*p) && (*p) <= 31 ) |
4703 | - goto tr23; |
4704 | - } else if ( (*p) >= 0 ) |
4705 | - goto tr23; |
4706 | - goto st34; |
4707 | -st37: |
4708 | - if ( ++p == pe ) |
4709 | - goto _test_eof37; |
4710 | -case 37: |
4711 | - switch( (*p) ) { |
4712 | - case 9: goto st37; |
4713 | - case 13: goto st23; |
4714 | - case 32: goto st37; |
4715 | - case 34: goto st33; |
4716 | - case 59: goto st38; |
4717 | - case 92: goto st35; |
4718 | - case 127: goto tr43; |
4719 | - } |
4720 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4721 | - goto tr43; |
4722 | - goto st34; |
4723 | -st38: |
4724 | - if ( ++p == pe ) |
4725 | - goto _test_eof38; |
4726 | -case 38: |
4727 | - switch( (*p) ) { |
4728 | - case 9: goto st38; |
4729 | - case 32: goto st38; |
4730 | - case 34: goto st33; |
4731 | - case 44: goto st34; |
4732 | - case 47: goto st34; |
4733 | - case 92: goto st35; |
4734 | - case 123: goto st34; |
4735 | - case 125: goto st34; |
4736 | - case 127: goto st0; |
4737 | - } |
4738 | - if ( (*p) < 40 ) { |
4739 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4740 | - goto st0; |
4741 | - } else if ( (*p) > 41 ) { |
4742 | - if ( (*p) > 64 ) { |
4743 | - if ( 91 <= (*p) && (*p) <= 93 ) |
4744 | - goto st34; |
4745 | - } else if ( (*p) >= 58 ) |
4746 | - goto st34; |
4747 | - } else |
4748 | - goto st34; |
4749 | - goto st39; |
4750 | -st39: |
4751 | - if ( ++p == pe ) |
4752 | - goto _test_eof39; |
4753 | -case 39: |
4754 | - switch( (*p) ) { |
4755 | - case 9: goto st40; |
4756 | - case 13: goto st23; |
4757 | - case 32: goto st40; |
4758 | - case 34: goto st33; |
4759 | - case 44: goto st34; |
4760 | - case 47: goto st34; |
4761 | - case 59: goto st38; |
4762 | - case 61: goto st41; |
4763 | - case 92: goto st35; |
4764 | - case 123: goto st34; |
4765 | - case 125: goto st34; |
4766 | - case 127: goto tr43; |
4767 | - } |
4768 | - if ( (*p) < 40 ) { |
4769 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4770 | - goto tr43; |
4771 | - } else if ( (*p) > 41 ) { |
4772 | - if ( (*p) > 64 ) { |
4773 | - if ( 91 <= (*p) && (*p) <= 93 ) |
4774 | - goto st34; |
4775 | - } else if ( (*p) >= 58 ) |
4776 | - goto st34; |
4777 | - } else |
4778 | - goto st34; |
4779 | - goto st39; |
4780 | -st40: |
4781 | - if ( ++p == pe ) |
4782 | - goto _test_eof40; |
4783 | -case 40: |
4784 | - switch( (*p) ) { |
4785 | - case 9: goto st40; |
4786 | - case 13: goto st23; |
4787 | - case 32: goto st40; |
4788 | - case 34: goto st33; |
4789 | - case 59: goto st38; |
4790 | - case 61: goto st41; |
4791 | - case 92: goto st35; |
4792 | - case 127: goto tr43; |
4793 | - } |
4794 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4795 | - goto tr43; |
4796 | - goto st34; |
4797 | -st41: |
4798 | - if ( ++p == pe ) |
4799 | - goto _test_eof41; |
4800 | -case 41: |
4801 | - switch( (*p) ) { |
4802 | - case 9: goto st41; |
4803 | - case 32: goto st41; |
4804 | - case 34: goto st37; |
4805 | - case 44: goto st34; |
4806 | - case 47: goto st34; |
4807 | - case 92: goto st35; |
4808 | - case 123: goto st34; |
4809 | - case 125: goto st34; |
4810 | - case 127: goto st0; |
4811 | - } |
4812 | - if ( (*p) < 40 ) { |
4813 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4814 | - goto st0; |
4815 | - } else if ( (*p) > 41 ) { |
4816 | - if ( (*p) > 64 ) { |
4817 | - if ( 91 <= (*p) && (*p) <= 93 ) |
4818 | - goto st34; |
4819 | - } else if ( (*p) >= 58 ) |
4820 | - goto st34; |
4821 | - } else |
4822 | - goto st34; |
4823 | - goto st42; |
4824 | -st42: |
4825 | - if ( ++p == pe ) |
4826 | - goto _test_eof42; |
4827 | -case 42: |
4828 | - switch( (*p) ) { |
4829 | - case 9: goto st37; |
4830 | - case 13: goto st23; |
4831 | - case 32: goto st37; |
4832 | - case 34: goto st33; |
4833 | - case 44: goto st34; |
4834 | - case 47: goto st34; |
4835 | - case 59: goto st38; |
4836 | - case 92: goto st35; |
4837 | - case 123: goto st34; |
4838 | - case 125: goto st34; |
4839 | - case 127: goto tr43; |
4840 | - } |
4841 | - if ( (*p) < 40 ) { |
4842 | - if ( 0 <= (*p) && (*p) <= 31 ) |
4843 | - goto tr43; |
4844 | - } else if ( (*p) > 41 ) { |
4845 | - if ( (*p) > 64 ) { |
4846 | - if ( 91 <= (*p) && (*p) <= 93 ) |
4847 | - goto st34; |
4848 | - } else if ( (*p) >= 58 ) |
4849 | - goto st34; |
4850 | - } else |
4851 | - goto st34; |
4852 | - goto st42; |
4853 | - } |
4854 | - _test_eof2: cs = 2; goto _test_eof; |
4855 | - _test_eof3: cs = 3; goto _test_eof; |
4856 | - _test_eof4: cs = 4; goto _test_eof; |
4857 | - _test_eof5: cs = 5; goto _test_eof; |
4858 | - _test_eof6: cs = 6; goto _test_eof; |
4859 | - _test_eof43: cs = 43; goto _test_eof; |
4860 | - _test_eof7: cs = 7; goto _test_eof; |
4861 | - _test_eof8: cs = 8; goto _test_eof; |
4862 | - _test_eof9: cs = 9; goto _test_eof; |
4863 | - _test_eof10: cs = 10; goto _test_eof; |
4864 | - _test_eof11: cs = 11; goto _test_eof; |
4865 | - _test_eof12: cs = 12; goto _test_eof; |
4866 | - _test_eof13: cs = 13; goto _test_eof; |
4867 | - _test_eof14: cs = 14; goto _test_eof; |
4868 | - _test_eof15: cs = 15; goto _test_eof; |
4869 | - _test_eof16: cs = 16; goto _test_eof; |
4870 | - _test_eof17: cs = 17; goto _test_eof; |
4871 | - _test_eof18: cs = 18; goto _test_eof; |
4872 | - _test_eof19: cs = 19; goto _test_eof; |
4873 | - _test_eof20: cs = 20; goto _test_eof; |
4874 | - _test_eof21: cs = 21; goto _test_eof; |
4875 | - _test_eof22: cs = 22; goto _test_eof; |
4876 | - _test_eof23: cs = 23; goto _test_eof; |
4877 | - _test_eof24: cs = 24; goto _test_eof; |
4878 | - _test_eof25: cs = 25; goto _test_eof; |
4879 | - _test_eof26: cs = 26; goto _test_eof; |
4880 | - _test_eof27: cs = 27; goto _test_eof; |
4881 | - _test_eof28: cs = 28; goto _test_eof; |
4882 | - _test_eof29: cs = 29; goto _test_eof; |
4883 | - _test_eof30: cs = 30; goto _test_eof; |
4884 | - _test_eof31: cs = 31; goto _test_eof; |
4885 | - _test_eof32: cs = 32; goto _test_eof; |
4886 | - _test_eof33: cs = 33; goto _test_eof; |
4887 | - _test_eof34: cs = 34; goto _test_eof; |
4888 | - _test_eof35: cs = 35; goto _test_eof; |
4889 | - _test_eof36: cs = 36; goto _test_eof; |
4890 | - _test_eof37: cs = 37; goto _test_eof; |
4891 | - _test_eof38: cs = 38; goto _test_eof; |
4892 | - _test_eof39: cs = 39; goto _test_eof; |
4893 | - _test_eof40: cs = 40; goto _test_eof; |
4894 | - _test_eof41: cs = 41; goto _test_eof; |
4895 | - _test_eof42: cs = 42; goto _test_eof; |
4896 | - |
4897 | - _test_eof: {} |
4898 | - if ( p == eof ) |
4899 | - { |
4900 | - switch ( cs ) { |
4901 | - case 14: |
4902 | - case 36: |
4903 | -#line 168 "src/chunked_parser.rl" |
4904 | - { err_ctx = "CRLF"; } |
4905 | - break; |
4906 | - case 25: |
4907 | -#line 177 "src/chunked_parser.rl" |
4908 | - { err_ctx = "chunk_data"; } |
4909 | - break; |
4910 | - case 26: |
4911 | - case 27: |
4912 | -#line 181 "src/chunked_parser.rl" |
4913 | - { err_ctx = "chunk_data_terminator"; } |
4914 | - break; |
4915 | - case 29: |
4916 | - case 30: |
4917 | - case 32: |
4918 | - case 33: |
4919 | - case 37: |
4920 | - case 39: |
4921 | - case 40: |
4922 | - case 42: |
4923 | -#line 221 "src/chunked_parser.rl" |
4924 | - { err_ctx = "chunk_ext"; } |
4925 | - break; |
4926 | - case 2: |
4927 | - case 3: |
4928 | - case 8: |
4929 | - case 9: |
4930 | - case 11: |
4931 | - case 15: |
4932 | - case 17: |
4933 | - case 18: |
4934 | - case 20: |
4935 | -#line 227 "src/chunked_parser.rl" |
4936 | - { err_ctx = "last_chunk"; } |
4937 | - break; |
4938 | - case 23: |
4939 | -#line 168 "src/chunked_parser.rl" |
4940 | - { err_ctx = "CRLF"; } |
4941 | -#line 221 "src/chunked_parser.rl" |
4942 | - { err_ctx = "chunk_ext"; } |
4943 | - break; |
4944 | - case 4: |
4945 | -#line 168 "src/chunked_parser.rl" |
4946 | - { err_ctx = "CRLF"; } |
4947 | -#line 227 "src/chunked_parser.rl" |
4948 | - { err_ctx = "last_chunk"; } |
4949 | - break; |
4950 | - case 6: |
4951 | -#line 168 "src/chunked_parser.rl" |
4952 | - { err_ctx = "CRLF"; } |
4953 | -#line 231 "src/chunked_parser.rl" |
4954 | - { err_ctx = "parser"; } |
4955 | - break; |
4956 | - case 21: |
4957 | - case 22: |
4958 | -#line 218 "src/chunked_parser.rl" |
4959 | - { err_ctx = "chunk_size"; } |
4960 | -#line 221 "src/chunked_parser.rl" |
4961 | - { err_ctx = "chunk_ext"; } |
4962 | - break; |
4963 | - case 24: |
4964 | -#line 168 "src/chunked_parser.rl" |
4965 | - { err_ctx = "CRLF"; } |
4966 | -#line 221 "src/chunked_parser.rl" |
4967 | - { err_ctx = "chunk_ext"; } |
4968 | -#line 177 "src/chunked_parser.rl" |
4969 | - { err_ctx = "chunk_data"; } |
4970 | - break; |
4971 | - case 5: |
4972 | -#line 168 "src/chunked_parser.rl" |
4973 | - { err_ctx = "CRLF"; } |
4974 | -#line 227 "src/chunked_parser.rl" |
4975 | - { err_ctx = "last_chunk"; } |
4976 | -#line 231 "src/chunked_parser.rl" |
4977 | - { err_ctx = "parser"; } |
4978 | - break; |
4979 | -#line 1277 "src/chunked_parser.c" |
4980 | - } |
4981 | - } |
4982 | - |
4983 | - _out: {} |
4984 | - } |
4985 | - |
4986 | -#line 239 "src/chunked_parser.rl" |
4987 | - |
4988 | - ctx->parser_state = cs; |
4989 | - |
4990 | - *pos_addr = (u_char *) p; |
4991 | - |
4992 | - if (p != pe) { |
4993 | - dd("ASSERTION FAILED: p != pe"); |
4994 | - } |
4995 | - |
4996 | - if (done) { |
4997 | - return NGX_OK; |
4998 | - } |
4999 | - |
5000 | - if (cs == chunked_error) { |
The diff has been truncated for viewing.