Hello community, here is the log from the commit of package nginx for openSUSE:Factory checked in at 2020-11-25 19:28:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nginx (Old) and /work/SRC/openSUSE:Factory/.nginx.new.5913 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nginx" Wed Nov 25 19:28:29 2020 rev:58 rq:850600 version:1.19.5 Changes: -------- --- /work/SRC/openSUSE:Factory/nginx/nginx.changes 2020-11-02 09:37:37.613450646 +0100 +++ /work/SRC/openSUSE:Factory/.nginx.new.5913/nginx.changes 2020-11-25 19:28:34.346431400 +0100 @@ -1,0 +2,18 @@ +Tue Nov 24 19:30:01 UTC 2020 - Илья Индиго <[email protected]> + +- Update to 1.19.5 + * https://nginx.org/en/CHANGES + * Add the -e switch. + * The same source files can now be specified in different modules + while building addon modules. + * Fix SSL shutdown did not work when lingering close was used. + * Fix "upstream sent frame for closed stream" errors might occur + when working with gRPC backends. + * Fix in request body filters internal API. + +------------------------------------------------------------------- +Mon Nov 9 11:07:07 UTC 2020 - Илья Индиго <[email protected]> + +- Refresh spec-file via spec-cleaner and manual optimizations. + +------------------------------------------------------------------- @@ -9,0 +28,16 @@ + +------------------------------------------------------------------- +Fri Oct 2 04:14:33 UTC 2020 - Marcus Rueckert <[email protected]> + +- Use the ngx_* macros from the nginx-macros package to simplify + the spec file. + +------------------------------------------------------------------- +Fri Oct 2 01:58:09 UTC 2020 - Marcus Rueckert <[email protected]> + +- Moved all the modules that support dynamic modules into their own + modules: + * nginx-module-geoip2 + * nginx-module-fancyindex + * nginx-module-headers-more +- The rtmp module is replaced with nginx-module-http-flv Old: ---- headers-more-nginx-module-0.33.tar.gz nginx-1.19.4.tar.gz nginx-1.19.4.tar.gz.asc nginx-rtmp-module-1.2.1.tar.gz ngx-fancyindex-0.4.2.tar.gz ngx_http_geoip2_module-3.3.tar.gz New: ---- nginx-1.19.5.tar.gz nginx-1.19.5.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nginx.spec ++++++ --- /var/tmp/diff_new_pack.FKvWTG/_old 2020-11-25 19:28:35.238432524 +0100 +++ /var/tmp/diff_new_pack.FKvWTG/_new 2020-11-25 19:28:35.242432529 +0100 @@ -18,54 +18,32 @@ %{!?vim_data_dir:%global vim_data_dir %{_datadir}/vim/%(readlink %{_datadir}/vim/current)} %define pkg_name nginx -%define ngx_prefix %{_prefix} -%define ngx_sbin_path %{_sbindir}/nginx -%define ngx_module_dir %{_libdir}/nginx/modules -%define ngx_conf_dir %{_sysconfdir}/nginx -%define ngx_conf_path %{ngx_conf_dir}/nginx.conf -%define ngx_log_dir %{_localstatedir}/log/nginx -%define ngx_error_log %{ngx_log_dir}/error.log -%define ngx_access_log %{ngx_log_dir}/access.log -%define ngx_home %{_localstatedir}/lib/nginx -%define ngx_tmp_http %{ngx_home}/tmp/ -%define ngx_tmp_proxy %{ngx_home}/proxy/ -%define ngx_tmp_fcgi %{ngx_home}/fastcgi/ -%define ngx_tmp_scgi %{ngx_home}/scgi/ -%define ngx_tmp_uwsgi %{ngx_home}/uwsgi/ -%define ngx_user_group nginx -%define ngx_doc_dir %{_docdir}/%{name} -%define ngx_fancyindex_version 0.4.2 -%define ngx_fancyindex_module_path ngx-fancyindex-%{ngx_fancyindex_version} -%define headers_more_nginx_version 0.33 -%define headers_more_nginx_module_path headers-more-nginx-module-%{headers_more_nginx_version} %define nginx_upstream_check_version 0.3.0 %define nginx_upstream_check_module_path nginx_upstream_check_module-%{nginx_upstream_check_version} -%define nginx_rtmp_version 1.2.1 -%define nginx_rtmp_module_path nginx-rtmp-module-%{nginx_rtmp_version} -%define nginx_geoip2_version 3.3 -%define nginx_geoip2_module_path ngx_http_geoip2_module-%{nginx_geoip2_version} %define src_install_dir %{_prefix}/src/%{name} %if 0%{?is_opensuse} %bcond_without extra_modules %else %bcond_with extra_modules %endif +# +# keep in sync with ngx_conditionals in nginx-macros %if 0%{?suse_version} != 1315 || 0%{?is_opensuse} -%bcond_without libatomic +%bcond_without ngx_libatomic %else -%bcond_with libatomic +%bcond_with ngx_libatomic %endif %if 0%{?suse_version} > 1220 -%bcond_without http2 -%bcond_without pcre_jit +%bcond_without ngx_http2 +%bcond_without ngx_pcre_jit %bcond_without systemd %else -%bcond_with http2 -%bcond_with pcre_jit +%bcond_with ngx_http2 +%bcond_with ngx_pcre_jit %bcond_with systemd %endif -%bcond_with cpp_test -%bcond_with google_perftools +%bcond_with ngx_cpp_test +%bcond_with ngx_google_perftools # %if %{with systemd} %define ngx_pid_path /run/nginx.pid @@ -76,7 +54,7 @@ %endif # Name: nginx -Version: 1.19.4 +Version: 1.19.5 Release: 0 Summary: A HTTP server and IMAP/POP3 proxy server License: BSD-2-Clause @@ -86,11 +64,7 @@ Source1: nginx.init Source2: nginx.logrotate Source3: nginx.service -Source4: https://github.com/aperezdc/ngx-fancyindex/archive/v%{ngx_fancyindex_version}/%{ngx_fancyindex_module_path}.tar.gz -Source5: https://github.com/openresty/headers-more-nginx-module/archive/v%{headers_more_nginx_version}/%{headers_more_nginx_module_path}.tar.gz -Source6: https://github.com/yaoweibin/nginx_upstream_check_module/archive/v%{nginx_upstream_check_version}/%{nginx_upstream_check_module_path}.tar.gz -Source7: https://github.com/arut/nginx-rtmp-module/archive/v%{nginx_rtmp_version}/%{nginx_rtmp_module_path}.tar.gz -Source8: https://github.com/leev/ngx_http_geoip2_module/archive/%{nginx_geoip2_version}.tar.gz#/%{nginx_geoip2_module_path}.tar.gz +Source4: https://github.com/yaoweibin/nginx_upstream_check_module/archive/v%{nginx_upstream_check_version}/%{nginx_upstream_check_module_path}.tar.gz Source9: nginx.sysusers Source100: nginx.rpmlintrc Source101: https://nginx.org/download/%{name}-%{version}.tar.gz.asc @@ -107,27 +81,32 @@ Patch4: nginx-aio.patch # PATCH-FIX-UPSTREAM check_1.9.2+.patch Patch5: check_1.9.2+.patch +# keep Buildrequires for the libraries and everything in sync with the requires in the nginx-source package BuildRequires: gcc-c++ BuildRequires: gd-devel -# BuildRequires: libxslt-devel +BuildRequires: nginx-macros BuildRequires: openssl-devel BuildRequires: pcre-devel BuildRequires: pkgconfig BuildRequires: vim BuildRequires: zlib-devel -BuildRequires: pkgconfig(libmaxminddb) %requires_eq perl +# Recommends: logrotate +Recommends: nginx-module-fancyindex +Recommends: nginx-module-geoip2 +Recommends: nginx-module-headers-more +Recommends: nginx-module-http-flv Recommends: vim-plugin-nginx Provides: http_daemon Provides: httpd # -%if %{with google_perftools} +%if %{with ngx_google_perftools} BuildRequires: google-perftools-devel %endif # -%if %{with libatomic} +%if %{with ngx_libatomic} BuildRequires: libatomic-ops-devel %endif # @@ -164,19 +143,32 @@ %package -n nginx-source Summary: The nginx source Group: Development/Sources +Requires: gcc-c++ +Requires: gd-devel +Requires: libxslt-devel +Requires: nginx = %{version} +Requires: openssl-devel +Requires: pcre-devel +Requires: pkgconfig +Requires: vim +Requires: zlib-devel +%requires_ge nginx-macros BuildArch: noarch +%if %{with ngx_libatomic} +Requires: libatomic-ops-devel +%endif %description -n nginx-source The source of nginx [engine x] HTTP server and IMAP/POP3 proxy server. %prep -%setup -q -n %{pkg_name}-%{version} -a 4 -a 5 -a 6 -a 7 -a 8 +%setup -q -n %{pkg_name}-%{version} -a 4 %patch0 -p1 %patch1 -p1 %patch2 %patch3 %patch4 -p1 -%if %{with extra_modules} +%if %{with ngx_extra_modules} %patch5 %endif @@ -192,81 +184,11 @@ %build # FIXME: you should use the %%configure macro -./configure \ - --prefix=%{ngx_prefix}/ \ - --sbin-path=%{ngx_sbin_path} \ - --modules-path=%{ngx_module_dir} \ - --conf-path=%{ngx_conf_path} \ - --error-log-path=%{ngx_error_log} \ - --http-log-path=%{ngx_access_log} \ - --pid-path=%{ngx_pid_path} \ - --lock-path=%{ngx_lock_path} \ - --http-client-body-temp-path=%{ngx_tmp_http} \ - --http-proxy-temp-path=%{ngx_tmp_proxy} \ - --http-fastcgi-temp-path=%{ngx_tmp_fcgi} \ - --http-uwsgi-temp-path=%{ngx_tmp_uwsgi} \ - --http-scgi-temp-path=%{ngx_tmp_scgi} \ - --user=nginx --group=nginx \ - --without-select_module \ - --without-poll_module \ - --with-threads \ - --with-file-aio \ - --with-ipv6 \ - --with-http_ssl_module \ - %if %{with http2} - --with-http_v2_module \ - %endif - --with-http_realip_module \ - --with-http_addition_module \ - --with-http_xslt_module=dynamic \ - --with-http_image_filter_module=dynamic \ - --with-http_sub_module \ - --with-http_dav_module \ - --with-http_flv_module \ - --with-http_mp4_module \ - --with-http_gunzip_module \ - --with-http_gzip_static_module \ - --with-http_auth_request_module \ - --with-http_random_index_module \ - --with-http_secure_link_module \ - --with-http_degradation_module \ - --with-http_slice_module \ - --with-http_stub_status_module \ - --with-http_perl_module=dynamic \ - --with-perl=%{_bindir}/perl \ - --with-mail=dynamic \ - --with-mail_ssl_module \ - --with-stream=dynamic \ - --with-stream_ssl_module \ - --with-stream_realip_module \ - --with-stream_ssl_preread_module \ - --with-pcre \ - %if %{with pcre_jit} - --with-pcre-jit \ - %endif - %if %{with libatomic} - --with-libatomic \ - %endif - %if %{with google_perftools} - --with-google_perftools_module \ - %endif - %if %{with cpp_test} - --with-cpp_test_module \ - %endif - --with-compat \ - %if %{with extra_modules} +%{ngx_configure} \ + %if %{with ngx_extra_modules} --add-module=%{nginx_upstream_check_module_path} \ - --add-dynamic-module=%{ngx_fancyindex_module_path} \ - --add-dynamic-module=%{headers_more_nginx_module_path} \ - --add-dynamic-module=%{nginx_rtmp_module_path} \ %endif - --add-dynamic-module=%{nginx_geoip2_module_path} \ -%if 0%{?suse_version} > 1220 - --with-cc-opt="%{optflags} -fPIC -D_GNU_SOURCE" \ - --with-ld-opt="-Wl,-z,relro,-z,now -pie" -%else - --with-cc-opt="%{optflags}" -%endif + %make_build %if %{with systemd} %sysusers_generate_pre %{SOURCE9} nginx @@ -276,16 +198,16 @@ %make_install %perl_process_packlist -install -d -m 0750 %{buildroot}%{ngx_home}/{,tmp,proxy,fastcgi,scgi,uwsgi} +install -dpm0750 %{buildroot}%{ngx_home}/{,tmp,proxy,fastcgi,scgi,uwsgi} -install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{pkg_name} +install -Dpm0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{pkg_name} %if %{with systemd} -install -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/nginx.service +install -Dpm0644 %{SOURCE3} %{buildroot}%{_unitdir}/nginx.service ln -s -f %{_sbindir}/service %{buildroot}%{_sbindir}/rcnginx -install -D -m 0644 %{SOURCE9} %{buildroot}%{_sysusersdir}/nginx.conf +install -Dpm0644 %{SOURCE9} %{buildroot}%{_sysusersdir}/nginx.conf %else -install -D -m 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/%{pkg_name} +install -Dpm0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/%{pkg_name} ln -s -f %{_sysconfdir}/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name} %endif @@ -319,18 +241,9 @@ popd } -copydocs %{ngx_fancyindex_module_path} \ - template* LICENSE *.rst - -copydocs %{headers_more_nginx_module_path} \ - README.markdown - copydocs %{nginx_upstream_check_module_path} \ doc/* -copydocs %{nginx_rtmp_module_path} \ - AUTHORS LICENSE README.md stat.xsl - %post %if %{with systemd} %service_add_post nginx.service @@ -386,19 +299,11 @@ %{ngx_sbin_path} %dir %{_libdir}/nginx/ %dir %{ngx_module_dir}/ -%{ngx_module_dir}/ngx_http_geoip2_module.so %{ngx_module_dir}/ngx_http_image_filter_module.so %{ngx_module_dir}/ngx_http_perl_module.so %{ngx_module_dir}/ngx_http_xslt_filter_module.so %{ngx_module_dir}/ngx_mail_module.so %{ngx_module_dir}/ngx_stream_module.so -%{ngx_module_dir}/ngx_stream_geoip2_module.so -# external modules -%if %{with extra_modules} -%{ngx_module_dir}/ngx_http_fancyindex_module.so -%{ngx_module_dir}/ngx_http_headers_more_filter_module.so -%{ngx_module_dir}/ngx_rtmp_module.so -%endif %{_mandir}/man3/nginx.3pm* /srv/www/htdocs/50x.html %if 0%{?suse_version} && 0%{?suse_version} < 1140 ++++++ nginx-1.19.4.tar.gz -> nginx-1.19.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/CHANGES new/nginx-1.19.5/CHANGES --- old/nginx-1.19.4/CHANGES 2020-10-27 16:09:24.000000000 +0100 +++ new/nginx-1.19.5/CHANGES 2020-11-24 16:06:38.000000000 +0100 @@ -1,4 +1,19 @@ +Changes with nginx 1.19.5 24 Nov 2020 + + *) Feature: the -e switch. + + *) Feature: the same source files can now be specified in different + modules while building addon modules. + + *) Bugfix: SSL shutdown did not work when lingering close was used. + + *) Bugfix: "upstream sent frame for closed stream" errors might occur + when working with gRPC backends. + + *) Bugfix: in request body filters internal API. + + Changes with nginx 1.19.4 27 Oct 2020 *) Feature: the "ssl_conf_command", "proxy_ssl_conf_command", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/CHANGES.ru new/nginx-1.19.5/CHANGES.ru --- old/nginx-1.19.4/CHANGES.ru 2020-10-27 16:09:23.000000000 +0100 +++ new/nginx-1.19.5/CHANGES.ru 2020-11-24 16:06:37.000000000 +0100 @@ -1,4 +1,20 @@ +Изменения в nginx 1.19.5 24.11.2020 + + *) Добавление: ключ -e. + + *) Добавление: при сборке дополнительных модулей теперь можно указывать + одни и те же исходные файлы в разных модулях. + + *) Исправление: SSL shutdown не работал при закрытии соединений с + ожиданием дополнительных данных (lingering close). + + *) Исправление: при работе с gRPC-бэкендами могли возникать ошибки + "upstream sent frame for closed stream". + + *) Исправление: во внутреннем API для обработки тела запроса. + + Изменения в nginx 1.19.4 27.10.2020 *) Добавление: директивы ssl_conf_command, proxy_ssl_conf_command, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/auto/make new/nginx-1.19.5/auto/make --- old/nginx-1.19.4/auto/make 2020-10-27 16:09:20.000000000 +0100 +++ new/nginx-1.19.5/auto/make 2020-11-24 16:06:34.000000000 +0100 @@ -313,7 +313,7 @@ END fi - done + done fi @@ -343,7 +343,7 @@ $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX END - done + done fi @@ -373,7 +373,7 @@ $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX END - done + done fi @@ -399,7 +399,7 @@ $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX END - done + done fi @@ -431,7 +431,7 @@ $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX END - done + done fi @@ -502,6 +502,7 @@ for ngx_module in $DYNAMIC_MODULES do eval ngx_module_srcs="\$${ngx_module}_SRCS" + eval ngx_module_shrd="\$${ngx_module}_SHRD" eval eval ngx_module_libs="\\\"\$${ngx_module}_LIBS\\\"" eval ngx_module_modules="\$${ngx_module}_MODULES" @@ -567,7 +568,7 @@ | sed -e "s/\(.*\.\)c/\1$ngx_objext/"` ngx_module_objs= - for ngx_src in $ngx_module_srcs + for ngx_src in $ngx_module_srcs $ngx_module_shrd do case "$ngx_src" in src/*) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/auto/module new/nginx-1.19.5/auto/module --- old/nginx-1.19.4/auto/module 2020-10-27 16:09:20.000000000 +0100 +++ new/nginx-1.19.5/auto/module 2020-11-24 16:06:34.000000000 +0100 @@ -17,7 +17,6 @@ done DYNAMIC_MODULES="$DYNAMIC_MODULES $ngx_module" - eval ${ngx_module}_SRCS=\"$ngx_module_srcs\" eval ${ngx_module}_MODULES=\"$ngx_module_name\" @@ -31,6 +30,30 @@ eval ${ngx_module}_ORDER=\"$ngx_module_order\" fi + srcs= + shrd= + for src in $ngx_module_srcs + do + found=no + for old in $DYNAMIC_MODULES_SRCS + do + if [ $src = $old ]; then + found=yes + break + fi + done + + if [ $found = no ]; then + srcs="$srcs $src" + else + shrd="$shrd $src" + fi + done + eval ${ngx_module}_SRCS=\"$srcs\" + eval ${ngx_module}_SHRD=\"$shrd\" + + DYNAMIC_MODULES_SRCS="$DYNAMIC_MODULES_SRCS $srcs" + if test -n "$ngx_module_incs"; then CORE_INCS="$CORE_INCS $ngx_module_incs" fi @@ -107,7 +130,24 @@ eval ${ngx_module_type}_MODULES=\"\$${ngx_module_type}_MODULES \ $ngx_module_name\" - NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_module_srcs" + srcs= + for src in $ngx_module_srcs + do + found=no + for old in $NGX_ADDON_SRCS + do + if [ $src = $old ]; then + found=yes + break + fi + done + + if [ $found = no ]; then + srcs="$srcs $src" + fi + done + + NGX_ADDON_SRCS="$NGX_ADDON_SRCS $srcs" if test -n "$ngx_module_incs"; then eval ${ngx_var}_INCS=\"\$${ngx_var}_INCS $ngx_module_incs\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/auto/options new/nginx-1.19.5/auto/options --- old/nginx-1.19.4/auto/options 2020-10-27 16:09:20.000000000 +0100 +++ new/nginx-1.19.5/auto/options 2020-11-24 16:06:34.000000000 +0100 @@ -132,8 +132,10 @@ STREAM_SSL_PREREAD=NO DYNAMIC_MODULES= +DYNAMIC_MODULES_SRCS= NGX_ADDONS= +NGX_ADDON_SRCS= NGX_ADDON_DEPS= DYNAMIC_ADDONS= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/configure new/nginx-1.19.5/configure --- old/nginx-1.19.4/configure 2020-10-27 16:09:20.000000000 +0100 +++ new/nginx-1.19.5/configure 2020-11-24 16:06:34.000000000 +0100 @@ -87,6 +87,10 @@ have=NGX_LOCK_PATH value="\"$NGX_LOCK_PATH\"" . auto/define have=NGX_ERROR_LOG_PATH value="\"$NGX_ERROR_LOG_PATH\"" . auto/define +if [ ".$NGX_ERROR_LOG_PATH" = "." ]; then + have=NGX_ERROR_LOG_STDERR . auto/have +fi + have=NGX_HTTP_LOG_PATH value="\"$NGX_HTTP_LOG_PATH\"" . auto/define have=NGX_HTTP_CLIENT_TEMP_PATH value="\"$NGX_HTTP_CLIENT_TEMP_PATH\"" . auto/define diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/man/nginx.8 new/nginx-1.19.5/man/nginx.8 --- old/nginx-1.19.4/man/nginx.8 2020-10-27 16:09:20.000000000 +0100 +++ new/nginx-1.19.5/man/nginx.8 2020-11-24 16:06:34.000000000 +0100 @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd December 5, 2019 +.Dd November 5, 2020 .Dt NGINX 8 .Os .Sh NAME @@ -35,6 +35,7 @@ .Nm .Op Fl ?hqTtVv .Op Fl c Ar file +.Op Fl e Ar file .Op Fl g Ar directives .Op Fl p Ar prefix .Op Fl s Ar signal @@ -54,6 +55,12 @@ .It Fl c Ar file Use an alternative configuration .Ar file . +.It Fl e Ar file +Use an alternative error log +.Ar file . +Special value +.Cm stderr +indicates that the standard error output should be used. .It Fl g Ar directives Set global configuration directives. See @@ -198,10 +205,10 @@ started in 2002, with the first public release on October 4, 2004. .Sh AUTHORS .An -nosplit -.An Igor Sysoev Aq [email protected] . +.An Igor Sysoev Aq Mt [email protected] . .Pp This manual page was originally written by -.An Sergey A. Osokin Aq [email protected] +.An Sergey A. Osokin Aq Mt [email protected] as a result of compiling many .Nm documents from all over the world. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/src/core/nginx.c new/nginx-1.19.5/src/core/nginx.c --- old/nginx-1.19.4/src/core/nginx.c 2020-10-27 16:09:20.000000000 +0100 +++ new/nginx-1.19.5/src/core/nginx.c 2020-11-24 16:06:34.000000000 +0100 @@ -183,6 +183,7 @@ static ngx_uint_t ngx_show_version; static ngx_uint_t ngx_show_configure; static u_char *ngx_prefix; +static u_char *ngx_error_log; static u_char *ngx_conf_file; static u_char *ngx_conf_params; static char *ngx_signal; @@ -230,7 +231,7 @@ ngx_pid = ngx_getpid(); ngx_parent = ngx_getppid(); - log = ngx_log_init(ngx_prefix); + log = ngx_log_init(ngx_prefix, ngx_error_log); if (log == NULL) { return 1; } @@ -393,9 +394,9 @@ if (ngx_show_help) { ngx_write_stderr( - "Usage: nginx [-?hvVtTq] [-s signal] [-c filename] " - "[-p prefix] [-g directives]" NGX_LINEFEED - NGX_LINEFEED + "Usage: nginx [-?hvVtTq] [-s signal] [-p prefix]" NGX_LINEFEED + " [-e filename] [-c filename] [-g directives]" + NGX_LINEFEED NGX_LINEFEED "Options:" NGX_LINEFEED " -?,-h : this help" NGX_LINEFEED " -v : show version and exit" NGX_LINEFEED @@ -414,6 +415,12 @@ #else " -p prefix : set prefix path (default: NONE)" NGX_LINEFEED #endif + " -e filename : set error log file (default: " +#ifdef NGX_ERROR_LOG_STDERR + "stderr)" NGX_LINEFEED +#else + NGX_ERROR_LOG_PATH ")" NGX_LINEFEED +#endif " -c filename : set configuration file (default: " NGX_CONF_PATH ")" NGX_LINEFEED " -g directives : set global directives out of configuration " @@ -800,6 +807,24 @@ ngx_log_stderr(0, "option \"-p\" requires directory name"); return NGX_ERROR; + case 'e': + if (*p) { + ngx_error_log = p; + + } else if (argv[++i]) { + ngx_error_log = (u_char *) argv[i]; + + } else { + ngx_log_stderr(0, "option \"-e\" requires file name"); + return NGX_ERROR; + } + + if (ngx_strcmp(ngx_error_log, "stderr") == 0) { + ngx_error_log = (u_char *) ""; + } + + goto next; + case 'c': if (*p) { ngx_conf_file = p; @@ -992,6 +1017,14 @@ } } + if (ngx_error_log) { + cycle->error_log.len = ngx_strlen(ngx_error_log); + cycle->error_log.data = ngx_error_log; + + } else { + ngx_str_set(&cycle->error_log, NGX_ERROR_LOG_PATH); + } + if (ngx_conf_params) { cycle->conf_param.len = ngx_strlen(ngx_conf_params); cycle->conf_param.data = ngx_conf_params; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/src/core/nginx.h new/nginx-1.19.5/src/core/nginx.h --- old/nginx-1.19.4/src/core/nginx.h 2020-10-27 16:09:20.000000000 +0100 +++ new/nginx-1.19.5/src/core/nginx.h 2020-11-24 16:06:34.000000000 +0100 @@ -9,8 +9,8 @@ #define _NGINX_H_INCLUDED_ -#define nginx_version 1019004 -#define NGINX_VERSION "1.19.4" +#define nginx_version 1019005 +#define NGINX_VERSION "1.19.5" #define NGINX_VER "nginx/" NGINX_VERSION #ifdef NGX_BUILD diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/src/core/ngx_cycle.c new/nginx-1.19.5/src/core/ngx_cycle.c --- old/nginx-1.19.4/src/core/ngx_cycle.c 2020-10-27 16:09:20.000000000 +0100 +++ new/nginx-1.19.5/src/core/ngx_cycle.c 2020-11-24 16:06:34.000000000 +0100 @@ -96,6 +96,15 @@ return NULL; } + cycle->error_log.len = old_cycle->error_log.len; + cycle->error_log.data = ngx_pnalloc(pool, old_cycle->error_log.len + 1); + if (cycle->error_log.data == NULL) { + ngx_destroy_pool(pool); + return NULL; + } + ngx_cpystrn(cycle->error_log.data, old_cycle->error_log.data, + old_cycle->error_log.len + 1); + cycle->conf_file.len = old_cycle->conf_file.len; cycle->conf_file.data = ngx_pnalloc(pool, old_cycle->conf_file.len + 1); if (cycle->conf_file.data == NULL) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/src/core/ngx_cycle.h new/nginx-1.19.5/src/core/ngx_cycle.h --- old/nginx-1.19.4/src/core/ngx_cycle.h 2020-10-27 16:09:20.000000000 +0100 +++ new/nginx-1.19.5/src/core/ngx_cycle.h 2020-11-24 16:06:34.000000000 +0100 @@ -80,6 +80,7 @@ ngx_str_t conf_param; ngx_str_t conf_prefix; ngx_str_t prefix; + ngx_str_t error_log; ngx_str_t lock_file; ngx_str_t hostname; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/src/core/ngx_log.c new/nginx-1.19.5/src/core/ngx_log.c --- old/nginx-1.19.4/src/core/ngx_log.c 2020-10-27 16:09:20.000000000 +0100 +++ new/nginx-1.19.5/src/core/ngx_log.c 2020-11-24 16:06:34.000000000 +0100 @@ -315,7 +315,7 @@ ngx_log_t * -ngx_log_init(u_char *prefix) +ngx_log_init(u_char *prefix, u_char *error_log) { u_char *p, *name; size_t nlen, plen; @@ -323,13 +323,11 @@ ngx_log.file = &ngx_log_file; ngx_log.log_level = NGX_LOG_NOTICE; - name = (u_char *) NGX_ERROR_LOG_PATH; - - /* - * we use ngx_strlen() here since BCC warns about - * condition is always false and unreachable code - */ + if (error_log == NULL) { + error_log = (u_char *) NGX_ERROR_LOG_PATH; + } + name = error_log; nlen = ngx_strlen(name); if (nlen == 0) { @@ -369,7 +367,7 @@ *p++ = '/'; } - ngx_cpystrn(p, (u_char *) NGX_ERROR_LOG_PATH, nlen + 1); + ngx_cpystrn(p, error_log, nlen + 1); p = name; } @@ -403,8 +401,7 @@ ngx_int_t ngx_log_open_default(ngx_cycle_t *cycle) { - ngx_log_t *log; - static ngx_str_t error_log = ngx_string(NGX_ERROR_LOG_PATH); + ngx_log_t *log; if (ngx_log_get_file_log(&cycle->new_log) != NULL) { return NGX_OK; @@ -425,7 +422,7 @@ log->log_level = NGX_LOG_ERR; - log->file = ngx_conf_open_file(cycle, &error_log); + log->file = ngx_conf_open_file(cycle, &cycle->error_log); if (log->file == NULL) { return NGX_ERROR; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/src/core/ngx_log.h new/nginx-1.19.5/src/core/ngx_log.h --- old/nginx-1.19.4/src/core/ngx_log.h 2020-10-27 16:09:20.000000000 +0100 +++ new/nginx-1.19.5/src/core/ngx_log.h 2020-11-24 16:06:34.000000000 +0100 @@ -228,7 +228,7 @@ /*********************************/ -ngx_log_t *ngx_log_init(u_char *prefix); +ngx_log_t *ngx_log_init(u_char *prefix, u_char *error_log); void ngx_cdecl ngx_log_abort(ngx_err_t err, const char *fmt, ...); void ngx_cdecl ngx_log_stderr(ngx_err_t err, const char *fmt, ...); u_char *ngx_log_errno(u_char *buf, u_char *last, ngx_err_t err); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/src/core/ngx_string.c new/nginx-1.19.5/src/core/ngx_string.c --- old/nginx-1.19.4/src/core/ngx_string.c 2020-10-27 16:09:20.000000000 +0100 +++ new/nginx-1.19.5/src/core/ngx_string.c 2020-11-24 16:06:34.000000000 +0100 @@ -11,6 +11,8 @@ static u_char *ngx_sprintf_num(u_char *buf, u_char *last, uint64_t ui64, u_char zero, ngx_uint_t hexadecimal, ngx_uint_t width); +static u_char *ngx_sprintf_str(u_char *buf, u_char *last, u_char *src, + size_t len, ngx_uint_t hexadecimal); static void ngx_encode_base64_internal(ngx_str_t *dst, ngx_str_t *src, const u_char *basis, ngx_uint_t padding); static ngx_int_t ngx_decode_base64_internal(ngx_str_t *dst, ngx_str_t *src, @@ -101,10 +103,10 @@ * %M ngx_msec_t * %r rlim_t * %p void * - * %V ngx_str_t * - * %v ngx_variable_value_t * - * %s null-terminated string - * %*s length and string + * %[x|X]V ngx_str_t * + * %[x|X]v ngx_variable_value_t * + * %[x|X]s null-terminated string + * %*[x|X]s length and string * %Z '\0' * %N '\n' * %c char @@ -165,7 +167,7 @@ u_char *p, zero; int d; double f; - size_t len, slen; + size_t slen; int64_t i64; uint64_t ui64, frac; ngx_msec_t ms; @@ -250,8 +252,7 @@ case 'V': v = va_arg(args, ngx_str_t *); - len = ngx_min(((size_t) (last - buf)), v->len); - buf = ngx_cpymem(buf, v->data, len); + buf = ngx_sprintf_str(buf, last, v->data, v->len, hex); fmt++; continue; @@ -259,8 +260,7 @@ case 'v': vv = va_arg(args, ngx_variable_value_t *); - len = ngx_min(((size_t) (last - buf)), vv->len); - buf = ngx_cpymem(buf, vv->data, len); + buf = ngx_sprintf_str(buf, last, vv->data, vv->len, hex); fmt++; continue; @@ -268,16 +268,7 @@ case 's': p = va_arg(args, u_char *); - if (slen == (size_t) -1) { - while (*p && buf < last) { - *buf++ = *p++; - } - - } else { - len = ngx_min(((size_t) (last - buf)), slen); - buf = ngx_cpymem(buf, p, len); - } - + buf = ngx_sprintf_str(buf, last, p, slen, hex); fmt++; continue; @@ -576,6 +567,64 @@ } +static u_char * +ngx_sprintf_str(u_char *buf, u_char *last, u_char *src, size_t len, + ngx_uint_t hexadecimal) +{ + static u_char hex[] = "0123456789abcdef"; + static u_char HEX[] = "0123456789ABCDEF"; + + if (hexadecimal == 0) { + + if (len == (size_t) -1) { + while (*src && buf < last) { + *buf++ = *src++; + } + + } else { + len = ngx_min((size_t) (last - buf), len); + buf = ngx_cpymem(buf, src, len); + } + + } else if (hexadecimal == 1) { + + if (len == (size_t) -1) { + + while (*src && buf < last - 1) { + *buf++ = hex[*src >> 4]; + *buf++ = hex[*src++ & 0xf]; + } + + } else { + + while (len-- && buf < last - 1) { + *buf++ = hex[*src >> 4]; + *buf++ = hex[*src++ & 0xf]; + } + } + + } else { /* hexadecimal == 2 */ + + if (len == (size_t) -1) { + + while (*src && buf < last - 1) { + *buf++ = HEX[*src >> 4]; + *buf++ = HEX[*src++ & 0xf]; + } + + } else { + + while (len-- && buf < last - 1) { + *buf++ = HEX[*src >> 4]; + *buf++ = HEX[*src++ & 0xf]; + } + } + } + + return buf; +} + + /* * We use ngx_strcasecmp()/ngx_strncasecmp() for 7-bit ASCII strings only, * and implement our own ngx_strcasecmp()/ngx_strncasecmp() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/src/event/ngx_event_openssl.c new/nginx-1.19.5/src/event/ngx_event_openssl.c --- old/nginx-1.19.4/src/event/ngx_event_openssl.c 2020-10-27 16:09:20.000000000 +0100 +++ new/nginx-1.19.5/src/event/ngx_event_openssl.c 2020-11-24 16:06:34.000000000 +0100 @@ -4057,9 +4057,6 @@ ngx_ssl_session_ticket_key_t *key; const EVP_MD *digest; const EVP_CIPHER *cipher; -#if (NGX_DEBUG) - u_char buf[32]; -#endif c = ngx_ssl_get_connection(ssl_conn); ssl_ctx = c->ssl->session_ctx; @@ -4081,8 +4078,8 @@ /* encrypt session ticket */ ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0, - "ssl session ticket encrypt, key: \"%*s\" (%s session)", - ngx_hex_dump(buf, key[0].name, 16) - buf, buf, + "ssl session ticket encrypt, key: \"%*xs\" (%s session)", + (size_t) 16, key[0].name, SSL_session_reused(ssl_conn) ? "reused" : "new"); if (key[0].size == 48) { @@ -4128,17 +4125,16 @@ } ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0, - "ssl session ticket decrypt, key: \"%*s\" not found", - ngx_hex_dump(buf, name, 16) - buf, buf); + "ssl session ticket decrypt, key: \"%*xs\" not found", + (size_t) 16, name); return 0; found: ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0, - "ssl session ticket decrypt, key: \"%*s\"%s", - ngx_hex_dump(buf, key[i].name, 16) - buf, buf, - (i == 0) ? " (default)" : ""); + "ssl session ticket decrypt, key: \"%*xs\"%s", + (size_t) 16, key[i].name, (i == 0) ? " (default)" : ""); if (key[i].size == 48) { cipher = EVP_aes_128_cbc(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/src/event/ngx_event_openssl_stapling.c new/nginx-1.19.5/src/event/ngx_event_openssl_stapling.c --- old/nginx-1.19.4/src/event/ngx_event_openssl_stapling.c 2020-10-27 16:09:20.000000000 +0100 +++ new/nginx-1.19.5/src/event/ngx_event_openssl_stapling.c 2020-11-24 16:06:34.000000000 +0100 @@ -2662,16 +2662,8 @@ p = ngx_cpymem(p, serial->data, serial->length); ngx_memzero(p, 20 - serial->length); -#if (NGX_DEBUG) - { - u_char buf[120]; - - ngx_hex_dump(buf, ctx->key.data, ctx->key.len); - - ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ctx->log, 0, - "ssl ocsp key %*s", sizeof(buf), buf); - } -#endif + ngx_log_debug1(NGX_LOG_DEBUG_EVENT, ctx->log, 0, + "ssl ocsp key %xV", &ctx->key); return NGX_OK; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/src/http/modules/ngx_http_grpc_module.c new/nginx-1.19.5/src/http/modules/ngx_http_grpc_module.c --- old/nginx-1.19.4/src/http/modules/ngx_http_grpc_module.c 2020-10-27 16:09:20.000000000 +0100 +++ new/nginx-1.19.5/src/http/modules/ngx_http_grpc_module.c 2020-11-24 16:06:34.000000000 +0100 @@ -1141,20 +1141,11 @@ f->flags |= NGX_HTTP_V2_END_HEADERS_FLAG; -#if (NGX_DEBUG) - if (r->connection->log->log_level & NGX_LOG_DEBUG_HTTP) { - u_char buf[512]; - size_t n, m; - - n = ngx_min(b->last - b->pos, 256); - m = ngx_hex_dump(buf, b->pos, n) - buf; - - ngx_log_debug4(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, - "grpc header: %*s%s, len: %uz", - m, buf, b->last - b->pos > 256 ? "..." : "", - b->last - b->pos); - } -#endif + ngx_log_debug4(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "grpc header: %*xs%s, len: %uz", + (size_t) ngx_min(b->last - b->pos, 256), b->pos, + b->last - b->pos > 256 ? "..." : "", + b->last - b->pos); if (r->request_body_no_buffering) { @@ -1604,20 +1595,11 @@ u = r->upstream; b = &u->buffer; -#if (NGX_DEBUG) - if (r->connection->log->log_level & NGX_LOG_DEBUG_HTTP) { - u_char buf[512]; - size_t n, m; - - n = ngx_min(b->last - b->pos, 256); - m = ngx_hex_dump(buf, b->pos, n) - buf; - - ngx_log_debug4(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, - "grpc response: %*s%s, len: %uz", - m, buf, b->last - b->pos > 256 ? "..." : "", - b->last - b->pos); - } -#endif + ngx_log_debug4(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "grpc response: %*xs%s, len: %uz", + (size_t) ngx_min(b->last - b->pos, 256), + b->pos, b->last - b->pos > 256 ? "..." : "", + b->last - b->pos); ctx = ngx_http_grpc_get_ctx(r); @@ -1987,6 +1969,7 @@ } u->length = 0; + ctx->done = 1; } else { u->length = 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/src/http/ngx_http_request.c new/nginx-1.19.5/src/http/ngx_http_request.c --- old/nginx-1.19.4/src/http/ngx_http_request.c 2020-10-27 16:09:20.000000000 +0100 +++ new/nginx-1.19.5/src/http/ngx_http_request.c 2020-11-24 16:06:34.000000000 +0100 @@ -49,7 +49,7 @@ static void ngx_http_set_keepalive(ngx_http_request_t *r); static void ngx_http_keepalive_handler(ngx_event_t *ev); -static void ngx_http_set_lingering_close(ngx_http_request_t *r); +static void ngx_http_set_lingering_close(ngx_connection_t *c); static void ngx_http_lingering_close_handler(ngx_event_t *ev); static ngx_int_t ngx_http_post_action(ngx_http_request_t *r); static void ngx_http_close_request(ngx_http_request_t *r, ngx_int_t error); @@ -2754,7 +2754,7 @@ || r->header_in->pos < r->header_in->last || r->connection->read->ready))) { - ngx_http_set_lingering_close(r); + ngx_http_set_lingering_close(r->connection); return; } @@ -3039,13 +3039,6 @@ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "set http keepalive handler"); - if (r->discard_body) { - r->write_event_handler = ngx_http_request_empty_handler; - r->lingering_time = ngx_time() + (time_t) (clcf->lingering_time / 1000); - ngx_add_timer(rev, clcf->lingering_timeout); - return; - } - c->log->action = "closing request"; hc = r->http_connection; @@ -3375,22 +3368,43 @@ static void -ngx_http_set_lingering_close(ngx_http_request_t *r) +ngx_http_set_lingering_close(ngx_connection_t *c) { ngx_event_t *rev, *wev; - ngx_connection_t *c; + ngx_http_request_t *r; ngx_http_core_loc_conf_t *clcf; - c = r->connection; + r = c->data; clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); + if (r->lingering_time == 0) { + r->lingering_time = ngx_time() + (time_t) (clcf->lingering_time / 1000); + } + +#if (NGX_HTTP_SSL) + if (c->ssl) { + ngx_int_t rc; + + rc = ngx_ssl_shutdown(c); + + if (rc == NGX_ERROR) { + ngx_http_close_request(r, 0); + return; + } + + if (rc == NGX_AGAIN) { + c->ssl->handler = ngx_http_set_lingering_close; + return; + } + + c->recv = ngx_recv; + } +#endif + rev = c->read; rev->handler = ngx_http_lingering_close_handler; - r->lingering_time = ngx_time() + (time_t) (clcf->lingering_time / 1000); - ngx_add_timer(rev, clcf->lingering_timeout); - if (ngx_handle_read_event(rev, 0) != NGX_OK) { ngx_http_close_request(r, 0); return; @@ -3413,6 +3427,8 @@ return; } + ngx_add_timer(rev, clcf->lingering_timeout); + if (rev->ready) { ngx_http_lingering_close_handler(rev); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/src/http/ngx_http_request_body.c new/nginx-1.19.5/src/http/ngx_http_request_body.c --- old/nginx-1.19.4/src/http/ngx_http_request_body.c 2020-10-27 16:09:20.000000000 +0100 +++ new/nginx-1.19.5/src/http/ngx_http_request_body.c 2020-11-24 16:06:34.000000000 +0100 @@ -137,8 +137,9 @@ } else { /* set rb->rest */ - if (ngx_http_request_body_filter(r, NULL) != NGX_OK) { - rc = NGX_HTTP_INTERNAL_SERVER_ERROR; + rc = ngx_http_request_body_filter(r, NULL); + + if (rc != NGX_OK) { goto done; } } @@ -305,6 +306,9 @@ return NGX_AGAIN; } + ngx_log_error(NGX_LOG_ALERT, c->log, 0, + "busy buffers after request body flush"); + return NGX_HTTP_INTERNAL_SERVER_ERROR; } @@ -674,6 +678,7 @@ if (rc == NGX_OK) { r->discard_body = 0; r->lingering_close = 0; + r->lingering_time = 0; ngx_http_finalize_request(r, NGX_DONE); return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-1.19.4/src/http/v2/ngx_http_v2.c new/nginx-1.19.5/src/http/v2/ngx_http_v2.c --- old/nginx-1.19.4/src/http/v2/ngx_http_v2.c 2020-10-27 16:09:20.000000000 +0100 +++ new/nginx-1.19.5/src/http/v2/ngx_http_v2.c 2020-11-24 16:06:34.000000000 +0100 @@ -60,7 +60,7 @@ static void ngx_http_v2_read_handler(ngx_event_t *rev); static void ngx_http_v2_write_handler(ngx_event_t *wev); static void ngx_http_v2_handle_connection(ngx_http_v2_connection_t *h2c); -static void ngx_http_v2_lingering_close(ngx_http_v2_connection_t *h2c); +static void ngx_http_v2_lingering_close(ngx_connection_t *c); static void ngx_http_v2_lingering_close_handler(ngx_event_t *rev); static u_char *ngx_http_v2_state_proxy_protocol(ngx_http_v2_connection_t *h2c, @@ -664,7 +664,7 @@ } if (h2c->goaway) { - ngx_http_v2_lingering_close(h2c); + ngx_http_v2_lingering_close(c); return; } @@ -703,13 +703,13 @@ static void -ngx_http_v2_lingering_close(ngx_http_v2_connection_t *h2c) +ngx_http_v2_lingering_close(ngx_connection_t *c) { ngx_event_t *rev, *wev; - ngx_connection_t *c; + ngx_http_v2_connection_t *h2c; ngx_http_core_loc_conf_t *clcf; - c = h2c->connection; + h2c = c->data; clcf = ngx_http_get_module_loc_conf(h2c->http_connection->conf_ctx, ngx_http_core_module); @@ -719,12 +719,34 @@ return; } + if (h2c->lingering_time == 0) { + h2c->lingering_time = ngx_time() + + (time_t) (clcf->lingering_time / 1000); + } + +#if (NGX_HTTP_SSL) + if (c->ssl) { + ngx_int_t rc; + + rc = ngx_ssl_shutdown(c); + + if (rc == NGX_ERROR) { + ngx_http_close_connection(c); + return; + } + + if (rc == NGX_AGAIN) { + c->ssl->handler = ngx_http_v2_lingering_close; + return; + } + + c->recv = ngx_recv; + } +#endif + rev = c->read; rev->handler = ngx_http_v2_lingering_close_handler; - h2c->lingering_time = ngx_time() + (time_t) (clcf->lingering_time / 1000); - ngx_add_timer(rev, clcf->lingering_timeout); - if (ngx_handle_read_event(rev, 0) != NGX_OK) { ngx_http_close_connection(c); return; @@ -747,6 +769,8 @@ return; } + ngx_add_timer(rev, clcf->lingering_timeout); + if (rev->ready) { ngx_http_v2_lingering_close_handler(rev); } @@ -4757,7 +4781,7 @@ return; } - ngx_http_v2_lingering_close(h2c); + ngx_http_v2_lingering_close(c); } _______________________________________________ openSUSE Commits mailing list -- [email protected] To unsubscribe, email [email protected] List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/[email protected]
