diff options
Diffstat (limited to 'usr.sbin/nginx')
325 files changed, 817 insertions, 295 deletions
diff --git a/usr.sbin/nginx/CHANGES b/usr.sbin/nginx/CHANGES index e2224eb5042..d0d48273981 100644 --- a/usr.sbin/nginx/CHANGES +++ b/usr.sbin/nginx/CHANGES @@ -1,4 +1,59 @@ +Changes with nginx 1.0.12 06 Feb 2012 + + *) Feature: the "TLSv1.1" and "TLSv1.2" parameters of the + "ssl_protocols" directive. + + *) Feature: the "if" SSI command supports captures in regular + expressions. + + *) Bugfix: the "if" SSI command did not work inside the "block" command. + + *) Bugfix: in AIO error handling on FreeBSD. + + *) Bugfix: in the OpenSSL library initialization. + + *) Bugfix: the "worker_cpu_affinity" directive might not work. + + *) Bugfix: the "limit_conn_log_level" and "limit_req_log_level" + directives might not work. + + *) Bugfix: the "read_ahead" directive might not work combined with + "try_files" and "open_file_cache". + + *) Bugfix: the "proxy_cache_use_stale" directive with "error" parameter + did not return answer from cache if there were no live upstreams. + + *) Bugfix: a segmentation fault might occur in a worker process if small + time was used in the "inactive" parameter of the "proxy_cache_path" + directive. + + *) Bugfix: responses from cache might hang. + + *) Bugfix: in error handling while connecting to a backend. + Thanks to Piotr Sikora. + + *) Bugfix: in the "epoll" event method. + Thanks to Yichun Zhang. + + *) Bugfix: the $sent_http_cache_control variable might contain a wrong + value if the "expires" directive was used. + Thanks to Yichun Zhang. + + *) Bugfix: the "limit_rate" directive did not allow to use full + throughput, even if limit value was very high. + + *) Bugfix: the "sendfile_max_chunk" directive did not work, if the + "limit_rate" directive was used. + + *) Bugfix: nginx could not be built on Solaris; the bug had appeared in + 1.0.11. + + *) Bugfix: in the ngx_http_scgi_module. + + *) Bugfix: in the ngx_http_mp4_module. + + Changes with nginx 1.0.11 15 Dec 2011 *) Change: now double quotes are encoded in an "echo" SSI-command @@ -4447,8 +4502,8 @@ Changes with nginx 0.3.6 24 Oct 2005 *) Bugfix: if at least in one server was no the "listen" directive, then nginx did not listen on the 80 port; the bug had appeared in 0.3.3. - *) Bugfix: if the URI part is omitted in "proxy_pass" directive, the the - 80 port was always used. + *) Bugfix: if the URI part is omitted in "proxy_pass" directive, the 80 + port was always used. Changes with nginx 0.3.5 21 Oct 2005 @@ -4693,7 +4748,7 @@ Changes with nginx 0.1.43 30 Aug 2005 *) Bugfix: the segmentation fault occurred or the worker process may got caught in an endless loop if the proxied or FastCGI server sent the "Cache-Control" header line and the "expires" directive was used; in - the proxied mode the the bug had appeared in 0.1.29. + the proxied mode the bug had appeared in 0.1.29. Changes with nginx 0.1.42 23 Aug 2005 @@ -4768,8 +4823,8 @@ Changes with nginx 0.1.39 14 Jul 2005 Changes with nginx 0.1.38 08 Jul 2005 - *) Feature: the "limit_rate" directive is supported in in proxy and - FastCGI mode. + *) Feature: the "limit_rate" directive is supported in proxy and FastCGI + mode. *) Feature: the "X-Accel-Limit-Rate" response header line is supported in proxy and FastCGI mode. @@ -4921,8 +4976,7 @@ Changes with nginx 0.1.30 14 May 2005 *) Bugfix: if the length of the response part received at once from proxied or FastCGI server was equal to 500, then nginx returns the - 500 response code; in proxy mode the the bug had appeared in 0.1.29 - only. + 500 response code; in proxy mode the bug had appeared in 0.1.29 only. *) Bugfix: nginx did not consider the directives with 8 or 9 parameters as invalid. @@ -5165,7 +5219,7 @@ Changes with nginx 0.1.19 16 Feb 2005 *) Bugfix: nginx could not be built on NetBSD 2.0. - *) Bugfix: the timeout may occur while reading of the the client request + *) Bugfix: the timeout may occur while reading of the client request body via SSL connections. diff --git a/usr.sbin/nginx/CHANGES.ru b/usr.sbin/nginx/CHANGES.ru index 3ce4bf91a8e..f8c3cd4a513 100644 --- a/usr.sbin/nginx/CHANGES.ru +++ b/usr.sbin/nginx/CHANGES.ru @@ -1,4 +1,59 @@ +Изменения в nginx 1.0.12 06.02.2012 + + *) Добавление: параметры TLSv1.1 и TLSv1.2 в директиве ssl_protocols. + + *) Добавление: SSI команда if поддерживает выделения в регулярных + выражениях. + + *) Исправление: SSI команда if не работала внутри команды block. + + *) Исправление: в обработке ошибок при использовании AIO на FreeBSD. + + *) Исправление: в инициализации библиотеки OpenSSL. + + *) Исправление: директива worker_cpu_affinity могла не работать. + + *) Исправление: директивы limit_conn_log_level и limit_req_log_level + могли не работать. + + *) Исправление: директива read_ahead могла не работать при использовании + совместно с try_files и open_file_cache. + + *) Исправление: директива proxy_cache_use_stale с параметром error не + возвращала ответ из кэша, если все бэкенды были признаны + неработающими. + + *) Исправление: если в параметре inactive директивы proxy_cache_path + было указано малое время, в рабочем процессе мог произойти + segmentation fault. + + *) Исправление: ответы из кэша могли зависать. + + *) Исправление: в обработке ошибок при соединении с бэкендом. + Спасибо Piotr Sikora. + + *) Исправление: в методе epoll. + Спасибо Yichun Zhang. + + *) Исправление: переменная $sent_http_cache_control могла содержать + неверное значение при использовании директивы expires. + Спасибо Yichun Zhang. + + *) Исправление: директива limit_rate не позволяла передавать на полной + скорости, даже если был указан очень большой лимит. + + *) Исправление: директива sendfile_max_chunk не работала, если + использовалась директива limit_rate. + + *) Исправление: nginx не собирался на Solaris; ошибка появилась в + 1.0.11. + + *) Исправление: в модуле ngx_http_scgi_module. + + *) Исправление: в модуле ngx_http_mp4_module. + + Изменения в nginx 1.0.11 15.12.2011 *) Изменение: теперь двойные кавычки экранируется при выводе diff --git a/usr.sbin/nginx/LICENSE b/usr.sbin/nginx/LICENSE index bf31fba7a9c..1bfc054da93 100644 --- a/usr.sbin/nginx/LICENSE +++ b/usr.sbin/nginx/LICENSE @@ -1,5 +1,6 @@ /* - * Copyright (C) 2002-2011 Igor Sysoev + * Copyright (C) 2002-2012 Igor Sysoev + * Copyright (C) 2011,2012 Nginx, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/usr.sbin/nginx/README.OpenBSD b/usr.sbin/nginx/README.OpenBSD index 1e7b669bf19..297db6e9730 100644 --- a/usr.sbin/nginx/README.OpenBSD +++ b/usr.sbin/nginx/README.OpenBSD @@ -1,4 +1,9 @@ Modified files by OpenBSD: +- auto/make +- auto/sources +- src/core/nginx.c +- src/core/ngx_cycle.c - src/os/unix/ngx_process_cycle.c +- src/os/unix/ngx_process_cycle.h - src/pcre/pcre_compile.c - src/pcre/pcre_fullinfo.c diff --git a/usr.sbin/nginx/auto/cc/acc b/usr.sbin/nginx/auto/cc/acc index f325bc56d11..6baee672ad4 100644 --- a/usr.sbin/nginx/auto/cc/acc +++ b/usr.sbin/nginx/auto/cc/acc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. # aCC: HP ANSI C++ B3910B A.03.55.02 diff --git a/usr.sbin/nginx/auto/cc/bcc b/usr.sbin/nginx/auto/cc/bcc index 9570a3c478b..ec82e60fb13 100644 --- a/usr.sbin/nginx/auto/cc/bcc +++ b/usr.sbin/nginx/auto/cc/bcc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. # Borland C++ 5.5 diff --git a/usr.sbin/nginx/auto/cc/ccc b/usr.sbin/nginx/auto/cc/ccc index 298f31e99c2..c964045105d 100644 --- a/usr.sbin/nginx/auto/cc/ccc +++ b/usr.sbin/nginx/auto/cc/ccc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. # Compaq C V6.5-207 diff --git a/usr.sbin/nginx/auto/cc/conf b/usr.sbin/nginx/auto/cc/conf index bdcce2c019d..c9118f2fd6f 100644 --- a/usr.sbin/nginx/auto/cc/conf +++ b/usr.sbin/nginx/auto/cc/conf @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. LINK="\$(CC)" diff --git a/usr.sbin/nginx/auto/cc/gcc b/usr.sbin/nginx/auto/cc/gcc index 8ea1f5846d4..de666a34c78 100644 --- a/usr.sbin/nginx/auto/cc/gcc +++ b/usr.sbin/nginx/auto/cc/gcc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. # gcc 2.7.2.3, 2.8.1, 2.95.4, egcs-1.1.2 diff --git a/usr.sbin/nginx/auto/cc/icc b/usr.sbin/nginx/auto/cc/icc index 91dd95ecfd1..1d83ed37a03 100644 --- a/usr.sbin/nginx/auto/cc/icc +++ b/usr.sbin/nginx/auto/cc/icc @@ -1,8 +1,9 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. -# Intel C++ compiler 7.1, 8.0, 8.1, 9.0 +# Intel C++ compiler 7.1, 8.0, 8.1, 9.0, 11.1 NGX_ICC_VER=`$CC -V 2>&1 | grep 'Version' 2>&1 \ | sed -e 's/^.* Version \([^ ]*\) *Build.*$/\1/'` @@ -15,32 +16,7 @@ have=NGX_COMPILER value="\"Intel C Compiler $NGX_ICC_VER\"" . auto/define # optimizations CFLAGS="$CFLAGS -O" -# inline the functions declared with __inline -#CFLAGS="$CFLAGS -Ob1" -# inline any function, at the compiler's discretion -CFLAGS="$CFLAGS -Ob2" -# multi-file IP optimizations -case "$NGX_ICC_VER" in - 9.*) - IPO="-ipo" - ;; - - # 8.1.38 under FreeBSD can not link -ipo - 8.1) - IPO="-ip" - ;; - - *) - IPO="-ipo -ipo_obj" - ;; -esac - -# single-file IP optimizations -#IPO="-ip" - -CFLAGS="$CFLAGS $IPO" -CORE_LINK="$CORE_LINK $IPO" CORE_LINK="$CORE_LINK -opt_report_file=$NGX_OBJS/opt_report_file" @@ -64,15 +40,15 @@ esac CFLAGS="$CFLAGS $CPU_OPT" if [ ".$PCRE_OPT" = "." ]; then - PCRE_OPT="-O $IPO $CPU_OPT" + PCRE_OPT="-O $CPU_OPT" fi if [ ".$MD5_OPT" = "." ]; then - MD5_OPT="-O $IPO $CPU_OPT" + MD5_OPT="-O $CPU_OPT" fi if [ ".$ZLIB_OPT" = "." ]; then - ZLIB_OPT="-O $IPO $CPU_OPT" + ZLIB_OPT="-O $CPU_OPT" fi diff --git a/usr.sbin/nginx/auto/cc/msvc b/usr.sbin/nginx/auto/cc/msvc index 01d6f7f2fa3..a99d5a92c2d 100644 --- a/usr.sbin/nginx/auto/cc/msvc +++ b/usr.sbin/nginx/auto/cc/msvc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. # MSVC 6.0 SP2 diff --git a/usr.sbin/nginx/auto/cc/name b/usr.sbin/nginx/auto/cc/name index 8788bc6627d..598f879a0d9 100644 --- a/usr.sbin/nginx/auto/cc/name +++ b/usr.sbin/nginx/auto/cc/name @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. if [ "$NGX_PLATFORM" != win32 ]; then diff --git a/usr.sbin/nginx/auto/cc/owc b/usr.sbin/nginx/auto/cc/owc index 39c180a26fd..22eb4c1259a 100644 --- a/usr.sbin/nginx/auto/cc/owc +++ b/usr.sbin/nginx/auto/cc/owc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. # Open Watcom C 1.0, 1.2, 1.3 diff --git a/usr.sbin/nginx/auto/cc/sunc b/usr.sbin/nginx/auto/cc/sunc index 69e6c2c7128..dd9ccedfbaa 100644 --- a/usr.sbin/nginx/auto/cc/sunc +++ b/usr.sbin/nginx/auto/cc/sunc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. # Sun C 5.7 Patch 117837-04 2005/05/11 Sun Studio 10 diff --git a/usr.sbin/nginx/auto/define b/usr.sbin/nginx/auto/define index 971f99df2ce..b5a7622590d 100644 --- a/usr.sbin/nginx/auto/define +++ b/usr.sbin/nginx/auto/define @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. cat << END >> $NGX_AUTO_CONFIG_H diff --git a/usr.sbin/nginx/auto/endianess b/usr.sbin/nginx/auto/endianess index 5ed22a8ec9b..452dd7c1268 100644 --- a/usr.sbin/nginx/auto/endianess +++ b/usr.sbin/nginx/auto/endianess @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. echo $ngx_n "checking for system endianess ...$ngx_c" diff --git a/usr.sbin/nginx/auto/feature b/usr.sbin/nginx/auto/feature index 98e757cafab..c13e51dfb82 100644 --- a/usr.sbin/nginx/auto/feature +++ b/usr.sbin/nginx/auto/feature @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. echo $ngx_n "checking for $ngx_feature ...$ngx_c" diff --git a/usr.sbin/nginx/auto/have b/usr.sbin/nginx/auto/have index 1b644ad3200..f8e3751c5f0 100644 --- a/usr.sbin/nginx/auto/have +++ b/usr.sbin/nginx/auto/have @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. cat << END >> $NGX_AUTO_CONFIG_H diff --git a/usr.sbin/nginx/auto/have_headers b/usr.sbin/nginx/auto/have_headers index 526ac47d404..a3a75430aa4 100644 --- a/usr.sbin/nginx/auto/have_headers +++ b/usr.sbin/nginx/auto/have_headers @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. cat << END >> $NGX_AUTO_HEADERS_H diff --git a/usr.sbin/nginx/auto/headers b/usr.sbin/nginx/auto/headers index 6f5225f81fd..5a2e6b9023f 100644 --- a/usr.sbin/nginx/auto/headers +++ b/usr.sbin/nginx/auto/headers @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. ngx_include="unistd.h"; . auto/include diff --git a/usr.sbin/nginx/auto/include b/usr.sbin/nginx/auto/include index 3a047d303de..3466fda15b3 100644 --- a/usr.sbin/nginx/auto/include +++ b/usr.sbin/nginx/auto/include @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. echo $ngx_n "checking for $ngx_include ...$ngx_c" diff --git a/usr.sbin/nginx/auto/init b/usr.sbin/nginx/auto/init index 56ecb1908d8..910f5294b66 100644 --- a/usr.sbin/nginx/auto/init +++ b/usr.sbin/nginx/auto/init @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. NGX_MAKEFILE=$NGX_OBJS/Makefile diff --git a/usr.sbin/nginx/auto/install b/usr.sbin/nginx/auto/install index d56be27ef93..c2c0ade5991 100644 --- a/usr.sbin/nginx/auto/install +++ b/usr.sbin/nginx/auto/install @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. if [ $USE_PERL = YES ]; then @@ -72,7 +73,7 @@ case ".$NGX_HTTP_LOG_PATH" in esac -if test -e man/nginx.8 ; then +if test -f man/nginx.8 ; then NGX_MAN=man/nginx.8 else NGX_MAN=docs/man/nginx.8 diff --git a/usr.sbin/nginx/auto/lib/conf b/usr.sbin/nginx/auto/lib/conf index 357e7810d69..e1e447557e9 100644 --- a/usr.sbin/nginx/auto/lib/conf +++ b/usr.sbin/nginx/auto/lib/conf @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. if [ $USE_PCRE = YES -o $PCRE != NONE ]; then diff --git a/usr.sbin/nginx/auto/lib/geoip/conf b/usr.sbin/nginx/auto/lib/geoip/conf index 5647e9167e6..3764d764979 100644 --- a/usr.sbin/nginx/auto/lib/geoip/conf +++ b/usr.sbin/nginx/auto/lib/geoip/conf @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. ngx_feature="GeoIP library" diff --git a/usr.sbin/nginx/auto/lib/google-perftools/conf b/usr.sbin/nginx/auto/lib/google-perftools/conf index 67df9f8ac0e..398ddd05e02 100644 --- a/usr.sbin/nginx/auto/lib/google-perftools/conf +++ b/usr.sbin/nginx/auto/lib/google-perftools/conf @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. ngx_feature="Google perftools" diff --git a/usr.sbin/nginx/auto/lib/libatomic/conf b/usr.sbin/nginx/auto/lib/libatomic/conf index 5cf16f381b5..d1e484ab32e 100644 --- a/usr.sbin/nginx/auto/lib/libatomic/conf +++ b/usr.sbin/nginx/auto/lib/libatomic/conf @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. if [ $NGX_LIBATOMIC != YES ]; then diff --git a/usr.sbin/nginx/auto/lib/libatomic/make b/usr.sbin/nginx/auto/lib/libatomic/make index e1672e324b4..b84267b63e4 100644 --- a/usr.sbin/nginx/auto/lib/libatomic/make +++ b/usr.sbin/nginx/auto/lib/libatomic/make @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. cat << END >> $NGX_MAKEFILE diff --git a/usr.sbin/nginx/auto/lib/libgd/conf b/usr.sbin/nginx/auto/lib/libgd/conf index 6378723706e..b0bc74c15f4 100644 --- a/usr.sbin/nginx/auto/lib/libgd/conf +++ b/usr.sbin/nginx/auto/lib/libgd/conf @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. ngx_feature="GD library" diff --git a/usr.sbin/nginx/auto/lib/libxslt/conf b/usr.sbin/nginx/auto/lib/libxslt/conf index 8c9ea8ba192..bc19d83ddce 100644 --- a/usr.sbin/nginx/auto/lib/libxslt/conf +++ b/usr.sbin/nginx/auto/lib/libxslt/conf @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. ngx_feature="libxslt" diff --git a/usr.sbin/nginx/auto/lib/make b/usr.sbin/nginx/auto/lib/make index f22767eb494..58a84a34cac 100644 --- a/usr.sbin/nginx/auto/lib/make +++ b/usr.sbin/nginx/auto/lib/make @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. if [ $PCRE != NONE -a $PCRE != NO -a $PCRE != YES ]; then diff --git a/usr.sbin/nginx/auto/lib/md5/conf b/usr.sbin/nginx/auto/lib/md5/conf index 9afe5b8deda..f9c1ed90296 100644 --- a/usr.sbin/nginx/auto/lib/md5/conf +++ b/usr.sbin/nginx/auto/lib/md5/conf @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. if [ $MD5 != NONE ]; then diff --git a/usr.sbin/nginx/auto/lib/md5/make b/usr.sbin/nginx/auto/lib/md5/make index 60af28ccad6..81f138ab671 100644 --- a/usr.sbin/nginx/auto/lib/md5/make +++ b/usr.sbin/nginx/auto/lib/md5/make @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. case "$NGX_CC_NAME" in diff --git a/usr.sbin/nginx/auto/lib/md5/makefile.bcc b/usr.sbin/nginx/auto/lib/md5/makefile.bcc index c02ef95bd1a..eb6fb624178 100644 --- a/usr.sbin/nginx/auto/lib/md5/makefile.bcc +++ b/usr.sbin/nginx/auto/lib/md5/makefile.bcc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. CFLAGS = -q -O2 -tWM $(CPU_OPT) -DL_ENDIAN diff --git a/usr.sbin/nginx/auto/lib/md5/makefile.msvc b/usr.sbin/nginx/auto/lib/md5/makefile.msvc index 233da0fb592..90d62fac7f0 100644 --- a/usr.sbin/nginx/auto/lib/md5/makefile.msvc +++ b/usr.sbin/nginx/auto/lib/md5/makefile.msvc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. CFLAGS = -nologo -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT) -D L_ENDIAN diff --git a/usr.sbin/nginx/auto/lib/md5/makefile.owc b/usr.sbin/nginx/auto/lib/md5/makefile.owc index c36c9369fcc..78c1e61dde7 100644 --- a/usr.sbin/nginx/auto/lib/md5/makefile.owc +++ b/usr.sbin/nginx/auto/lib/md5/makefile.owc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. CFLAGS = -zq -bt=nt -bm -ot -op -oi -oe -s $(CPU_OPT) diff --git a/usr.sbin/nginx/auto/lib/openssl/conf b/usr.sbin/nginx/auto/lib/openssl/conf index 8218a5b975a..528ee1794e9 100644 --- a/usr.sbin/nginx/auto/lib/openssl/conf +++ b/usr.sbin/nginx/auto/lib/openssl/conf @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. if [ $OPENSSL != NONE ]; then diff --git a/usr.sbin/nginx/auto/lib/openssl/make b/usr.sbin/nginx/auto/lib/openssl/make index a2025bbd669..9090fcbfd34 100644 --- a/usr.sbin/nginx/auto/lib/openssl/make +++ b/usr.sbin/nginx/auto/lib/openssl/make @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. case "$CC" in diff --git a/usr.sbin/nginx/auto/lib/openssl/makefile.bcc b/usr.sbin/nginx/auto/lib/openssl/makefile.bcc index 5938cbf6b3a..6a94ff74982 100644 --- a/usr.sbin/nginx/auto/lib/openssl/makefile.bcc +++ b/usr.sbin/nginx/auto/lib/openssl/makefile.bcc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. all: diff --git a/usr.sbin/nginx/auto/lib/openssl/makefile.msvc b/usr.sbin/nginx/auto/lib/openssl/makefile.msvc index 379b95dc028..fc9e57864ae 100644 --- a/usr.sbin/nginx/auto/lib/openssl/makefile.msvc +++ b/usr.sbin/nginx/auto/lib/openssl/makefile.msvc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. all: diff --git a/usr.sbin/nginx/auto/lib/pcre/conf b/usr.sbin/nginx/auto/lib/pcre/conf index bfa600c81ca..c8942caa77b 100644 --- a/usr.sbin/nginx/auto/lib/pcre/conf +++ b/usr.sbin/nginx/auto/lib/pcre/conf @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. if [ $PCRE != NONE ]; then @@ -83,7 +84,7 @@ if [ $PCRE != NONE ]; then else - if [ "$NGX_PLATFORM" != win32 -a `uname -s` != OpenBSD ]; then + if [ "$NGX_PLATFORM" != win32 ]; then PCRE=NO @@ -164,12 +165,6 @@ else fi fi - have=NGX_PCRE . auto/have - CORE_SRCS="$CORE_SRCS $PCRE_SRCS $REGEX_SRCS" - CORE_INCS="$CORE_INCS src/pcre" - CFLAGS="$CFLAGS -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10" - PCRE=YES - if [ $PCRE != YES ]; then cat << END diff --git a/usr.sbin/nginx/auto/lib/pcre/make b/usr.sbin/nginx/auto/lib/pcre/make index 9f2c658bf17..1695b934073 100644 --- a/usr.sbin/nginx/auto/lib/pcre/make +++ b/usr.sbin/nginx/auto/lib/pcre/make @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. case "$NGX_CC_NAME" in diff --git a/usr.sbin/nginx/auto/lib/pcre/makefile.bcc b/usr.sbin/nginx/auto/lib/pcre/makefile.bcc index 40d579fb59d..1c140d668b7 100644 --- a/usr.sbin/nginx/auto/lib/pcre/makefile.bcc +++ b/usr.sbin/nginx/auto/lib/pcre/makefile.bcc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. CFLAGS = -q -O2 -tWM -w-8004 $(CPU_OPT) diff --git a/usr.sbin/nginx/auto/lib/pcre/makefile.msvc b/usr.sbin/nginx/auto/lib/pcre/makefile.msvc index 47ae6991aee..7a8da715818 100644 --- a/usr.sbin/nginx/auto/lib/pcre/makefile.msvc +++ b/usr.sbin/nginx/auto/lib/pcre/makefile.msvc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. CFLAGS = -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT) diff --git a/usr.sbin/nginx/auto/lib/pcre/makefile.owc b/usr.sbin/nginx/auto/lib/pcre/makefile.owc index b2f1d1297b2..bfb69206879 100644 --- a/usr.sbin/nginx/auto/lib/pcre/makefile.owc +++ b/usr.sbin/nginx/auto/lib/pcre/makefile.owc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(CPU_OPT) diff --git a/usr.sbin/nginx/auto/lib/perl/conf b/usr.sbin/nginx/auto/lib/perl/conf index 3f7b908493f..52c7084e974 100644 --- a/usr.sbin/nginx/auto/lib/perl/conf +++ b/usr.sbin/nginx/auto/lib/perl/conf @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. echo "checking for perl" diff --git a/usr.sbin/nginx/auto/lib/perl/make b/usr.sbin/nginx/auto/lib/perl/make index 49eb5cf3430..f5d9ab50189 100644 --- a/usr.sbin/nginx/auto/lib/perl/make +++ b/usr.sbin/nginx/auto/lib/perl/make @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. cat << END >> $NGX_MAKEFILE diff --git a/usr.sbin/nginx/auto/lib/sha1/conf b/usr.sbin/nginx/auto/lib/sha1/conf index af3d3fba2e7..1e644c02f12 100644 --- a/usr.sbin/nginx/auto/lib/sha1/conf +++ b/usr.sbin/nginx/auto/lib/sha1/conf @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. if [ $SHA1 != NONE ]; then diff --git a/usr.sbin/nginx/auto/lib/sha1/make b/usr.sbin/nginx/auto/lib/sha1/make index 6c89acf1b10..fc10aaef38b 100644 --- a/usr.sbin/nginx/auto/lib/sha1/make +++ b/usr.sbin/nginx/auto/lib/sha1/make @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. case "$NGX_CC_NAME" in diff --git a/usr.sbin/nginx/auto/lib/sha1/makefile.bcc b/usr.sbin/nginx/auto/lib/sha1/makefile.bcc index 1d8b5e4c8b0..b0685fa4512 100644 --- a/usr.sbin/nginx/auto/lib/sha1/makefile.bcc +++ b/usr.sbin/nginx/auto/lib/sha1/makefile.bcc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. CFLAGS = -q -O2 -tWM $(CPU_OPT) -DL_ENDIAN diff --git a/usr.sbin/nginx/auto/lib/sha1/makefile.msvc b/usr.sbin/nginx/auto/lib/sha1/makefile.msvc index 4abd366cad3..3cbd21b3dbd 100644 --- a/usr.sbin/nginx/auto/lib/sha1/makefile.msvc +++ b/usr.sbin/nginx/auto/lib/sha1/makefile.msvc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. CFLAGS = -nologo -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT) -D L_ENDIAN diff --git a/usr.sbin/nginx/auto/lib/sha1/makefile.owc b/usr.sbin/nginx/auto/lib/sha1/makefile.owc index c1a3e04311c..fc095cc980a 100644 --- a/usr.sbin/nginx/auto/lib/sha1/makefile.owc +++ b/usr.sbin/nginx/auto/lib/sha1/makefile.owc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. CFLAGS = -zq -bt=nt -bm -ot -op -oi -oe -s $(CPU_OPT) diff --git a/usr.sbin/nginx/auto/lib/test b/usr.sbin/nginx/auto/lib/test index 6821b51da2a..907e2353b7f 100644 --- a/usr.sbin/nginx/auto/lib/test +++ b/usr.sbin/nginx/auto/lib/test @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. echo $ngx_n "checking for $ngx_lib ...$ngx_c" diff --git a/usr.sbin/nginx/auto/lib/zlib/conf b/usr.sbin/nginx/auto/lib/zlib/conf index 843dd5a557d..cefc874b222 100644 --- a/usr.sbin/nginx/auto/lib/zlib/conf +++ b/usr.sbin/nginx/auto/lib/zlib/conf @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. if [ $ZLIB != NONE ]; then diff --git a/usr.sbin/nginx/auto/lib/zlib/make b/usr.sbin/nginx/auto/lib/zlib/make index b874b04addd..9401a1d1a8e 100644 --- a/usr.sbin/nginx/auto/lib/zlib/make +++ b/usr.sbin/nginx/auto/lib/zlib/make @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. case "$NGX_CC_NAME" in diff --git a/usr.sbin/nginx/auto/lib/zlib/makefile.bcc b/usr.sbin/nginx/auto/lib/zlib/makefile.bcc index 69a728c76a9..56f8356884e 100644 --- a/usr.sbin/nginx/auto/lib/zlib/makefile.bcc +++ b/usr.sbin/nginx/auto/lib/zlib/makefile.bcc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. CFLAGS = -q -O2 -tWM -w-8004 -w-8012 $(CPU_OPT) diff --git a/usr.sbin/nginx/auto/lib/zlib/makefile.msvc b/usr.sbin/nginx/auto/lib/zlib/makefile.msvc index d02f2b68e37..2c7c1ae1025 100644 --- a/usr.sbin/nginx/auto/lib/zlib/makefile.msvc +++ b/usr.sbin/nginx/auto/lib/zlib/makefile.msvc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. CFLAGS = -nologo -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT) diff --git a/usr.sbin/nginx/auto/lib/zlib/makefile.owc b/usr.sbin/nginx/auto/lib/zlib/makefile.owc index 738e9a01b6e..f75e66d4f5b 100644 --- a/usr.sbin/nginx/auto/lib/zlib/makefile.owc +++ b/usr.sbin/nginx/auto/lib/zlib/makefile.owc @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. CFLAGS = -zq -bt=nt -ot -op -oi -oe -s -bm $(CPU_OPT) diff --git a/usr.sbin/nginx/auto/make b/usr.sbin/nginx/auto/make index 71324b09297..23d6a1ce172 100644 --- a/usr.sbin/nginx/auto/make +++ b/usr.sbin/nginx/auto/make @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. echo "creating $NGX_MAKEFILE" diff --git a/usr.sbin/nginx/auto/modules b/usr.sbin/nginx/auto/modules index b13bcb25b1f..f8d31a3833e 100644 --- a/usr.sbin/nginx/auto/modules +++ b/usr.sbin/nginx/auto/modules @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. if [ $EVENT_SELECT = NO -a $EVENT_FOUND = NO ]; then diff --git a/usr.sbin/nginx/auto/nohave b/usr.sbin/nginx/auto/nohave index bb5632aaf6c..dfb171837c5 100644 --- a/usr.sbin/nginx/auto/nohave +++ b/usr.sbin/nginx/auto/nohave @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. cat << END >> $NGX_AUTO_CONFIG_H diff --git a/usr.sbin/nginx/auto/options b/usr.sbin/nginx/auto/options index 07d22f51961..6eea8c4a8b8 100644 --- a/usr.sbin/nginx/auto/options +++ b/usr.sbin/nginx/auto/options @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. help=no diff --git a/usr.sbin/nginx/auto/os/conf b/usr.sbin/nginx/auto/os/conf index f4d08cb423d..8c18a63fc4b 100644 --- a/usr.sbin/nginx/auto/os/conf +++ b/usr.sbin/nginx/auto/os/conf @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. echo "checking for $NGX_SYSTEM specific features" diff --git a/usr.sbin/nginx/auto/os/darwin b/usr.sbin/nginx/auto/os/darwin index f9953b95cdc..590e03697db 100644 --- a/usr.sbin/nginx/auto/os/darwin +++ b/usr.sbin/nginx/auto/os/darwin @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. have=NGX_DARWIN . auto/have_headers diff --git a/usr.sbin/nginx/auto/os/freebsd b/usr.sbin/nginx/auto/os/freebsd index 082938800c9..88654ba60fb 100644 --- a/usr.sbin/nginx/auto/os/freebsd +++ b/usr.sbin/nginx/auto/os/freebsd @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. have=NGX_FREEBSD . auto/have_headers diff --git a/usr.sbin/nginx/auto/os/linux b/usr.sbin/nginx/auto/os/linux index 394cd87bce1..0b2173cae9c 100644 --- a/usr.sbin/nginx/auto/os/linux +++ b/usr.sbin/nginx/auto/os/linux @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. have=NGX_LINUX . auto/have_headers diff --git a/usr.sbin/nginx/auto/os/solaris b/usr.sbin/nginx/auto/os/solaris index 333f0aebd49..16da4b3fd31 100644 --- a/usr.sbin/nginx/auto/os/solaris +++ b/usr.sbin/nginx/auto/os/solaris @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. have=NGX_SOLARIS . auto/have_headers diff --git a/usr.sbin/nginx/auto/os/win32 b/usr.sbin/nginx/auto/os/win32 index 02b261cea5f..21a54ba11e5 100644 --- a/usr.sbin/nginx/auto/os/win32 +++ b/usr.sbin/nginx/auto/os/win32 @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. have=NGX_WIN32 . auto/have_headers diff --git a/usr.sbin/nginx/auto/sources b/usr.sbin/nginx/auto/sources index ffe144ce1b9..8946869dc41 100644 --- a/usr.sbin/nginx/auto/sources +++ b/usr.sbin/nginx/auto/sources @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. CORE_MODULES="ngx_core_module ngx_errlog_module ngx_conf_module" diff --git a/usr.sbin/nginx/auto/stubs b/usr.sbin/nginx/auto/stubs index 0031eaf8768..d8bc1f0e02a 100644 --- a/usr.sbin/nginx/auto/stubs +++ b/usr.sbin/nginx/auto/stubs @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. have=NGX_SUPPRESS_WARN . auto/have diff --git a/usr.sbin/nginx/auto/summary b/usr.sbin/nginx/auto/summary index 010a5be497e..f7f32a442a4 100644 --- a/usr.sbin/nginx/auto/summary +++ b/usr.sbin/nginx/auto/summary @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. ### STUB diff --git a/usr.sbin/nginx/auto/types/sizeof b/usr.sbin/nginx/auto/types/sizeof index 4d65dca16f7..e84a0905ef9 100644 --- a/usr.sbin/nginx/auto/types/sizeof +++ b/usr.sbin/nginx/auto/types/sizeof @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. echo $ngx_n "checking for $ngx_type size ...$ngx_c" diff --git a/usr.sbin/nginx/auto/types/typedef b/usr.sbin/nginx/auto/types/typedef index 884ef25d766..f121e8fc2ea 100644 --- a/usr.sbin/nginx/auto/types/typedef +++ b/usr.sbin/nginx/auto/types/typedef @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. echo $ngx_n "checking for $ngx_type ...$ngx_c" diff --git a/usr.sbin/nginx/auto/types/uintptr_t b/usr.sbin/nginx/auto/types/uintptr_t index 55024b820fe..07f7e7d7dba 100644 --- a/usr.sbin/nginx/auto/types/uintptr_t +++ b/usr.sbin/nginx/auto/types/uintptr_t @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. echo $ngx_n "checking for uintptr_t ...$ngx_c" diff --git a/usr.sbin/nginx/auto/types/value b/usr.sbin/nginx/auto/types/value index 698ba7d92af..ac88a3919ef 100644 --- a/usr.sbin/nginx/auto/types/value +++ b/usr.sbin/nginx/auto/types/value @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. cat << END >> $NGX_AUTO_CONFIG_H diff --git a/usr.sbin/nginx/auto/unix b/usr.sbin/nginx/auto/unix index 7621e8fa232..4988072f1ff 100755 --- a/usr.sbin/nginx/auto/unix +++ b/usr.sbin/nginx/auto/unix @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. NGX_USER=${NGX_USER:-nobody} diff --git a/usr.sbin/nginx/configure b/usr.sbin/nginx/configure index 6be54f7b2a5..45ea15473a7 100644 --- a/usr.sbin/nginx/configure +++ b/usr.sbin/nginx/configure @@ -1,6 +1,7 @@ #!/bin/sh # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. . auto/options diff --git a/usr.sbin/nginx/man/nginx.8 b/usr.sbin/nginx/man/nginx.8 index aba20c1a3c4..587fb457f85 100644 --- a/usr.sbin/nginx/man/nginx.8 +++ b/usr.sbin/nginx/man/nginx.8 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2010 Sergey A. Osokin +.\" Copyright (c) 2011,2012 Nginx, Inc. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without diff --git a/usr.sbin/nginx/src/core/nginx.c b/usr.sbin/nginx/src/core/nginx.c index 28c071e5541..bb539e55a13 100644 --- a/usr.sbin/nginx/src/core/nginx.c +++ b/usr.sbin/nginx/src/core/nginx.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/nginx.h b/usr.sbin/nginx/src/core/nginx.h index 735ad2af6b2..b8cbe9f7e17 100644 --- a/usr.sbin/nginx/src/core/nginx.h +++ b/usr.sbin/nginx/src/core/nginx.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -8,8 +9,8 @@ #define _NGINX_H_INCLUDED_ -#define nginx_version 1000011 -#define NGINX_VERSION "1.0.11" +#define nginx_version 1000012 +#define NGINX_VERSION "1.0.12" #define NGINX_VER "nginx/" NGINX_VERSION #define NGINX_VAR "NGINX" diff --git a/usr.sbin/nginx/src/core/ngx_array.c b/usr.sbin/nginx/src/core/ngx_array.c index a536d87b561..4627a9912f0 100644 --- a/usr.sbin/nginx/src/core/ngx_array.c +++ b/usr.sbin/nginx/src/core/ngx_array.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_array.h b/usr.sbin/nginx/src/core/ngx_array.h index 00206cb1be3..6a60e3088dd 100644 --- a/usr.sbin/nginx/src/core/ngx_array.h +++ b/usr.sbin/nginx/src/core/ngx_array.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_buf.c b/usr.sbin/nginx/src/core/ngx_buf.c index 2f2c4372185..817a96cda7c 100644 --- a/usr.sbin/nginx/src/core/ngx_buf.c +++ b/usr.sbin/nginx/src/core/ngx_buf.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_buf.h b/usr.sbin/nginx/src/core/ngx_buf.h index 847eaad05d6..39f31b34f2c 100644 --- a/usr.sbin/nginx/src/core/ngx_buf.h +++ b/usr.sbin/nginx/src/core/ngx_buf.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_conf_file.c b/usr.sbin/nginx/src/core/ngx_conf_file.c index 689b7e7a21d..83265014127 100644 --- a/usr.sbin/nginx/src/core/ngx_conf_file.c +++ b/usr.sbin/nginx/src/core/ngx_conf_file.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_conf_file.h b/usr.sbin/nginx/src/core/ngx_conf_file.h index 86c60a43c2c..e92668cd465 100644 --- a/usr.sbin/nginx/src/core/ngx_conf_file.h +++ b/usr.sbin/nginx/src/core/ngx_conf_file.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_config.h b/usr.sbin/nginx/src/core/ngx_config.h index 9762b18ca06..b0cb17fca80 100644 --- a/usr.sbin/nginx/src/core/ngx_config.h +++ b/usr.sbin/nginx/src/core/ngx_config.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_connection.c b/usr.sbin/nginx/src/core/ngx_connection.c index 3674b9a7408..b16c5572086 100644 --- a/usr.sbin/nginx/src/core/ngx_connection.c +++ b/usr.sbin/nginx/src/core/ngx_connection.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_connection.h b/usr.sbin/nginx/src/core/ngx_connection.h index f9bf5040105..928d661c0a5 100644 --- a/usr.sbin/nginx/src/core/ngx_connection.h +++ b/usr.sbin/nginx/src/core/ngx_connection.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_core.h b/usr.sbin/nginx/src/core/ngx_core.h index 9f179015341..1ae55163d53 100644 --- a/usr.sbin/nginx/src/core/ngx_core.h +++ b/usr.sbin/nginx/src/core/ngx_core.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_cpuinfo.c b/usr.sbin/nginx/src/core/ngx_cpuinfo.c index 39a6b05a056..72053192ffa 100644 --- a/usr.sbin/nginx/src/core/ngx_cpuinfo.c +++ b/usr.sbin/nginx/src/core/ngx_cpuinfo.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_crc.h b/usr.sbin/nginx/src/core/ngx_crc.h index c77f037abcd..35981bc15a7 100644 --- a/usr.sbin/nginx/src/core/ngx_crc.h +++ b/usr.sbin/nginx/src/core/ngx_crc.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_crc32.c b/usr.sbin/nginx/src/core/ngx_crc32.c index 624510cee32..a5b4017b87d 100644 --- a/usr.sbin/nginx/src/core/ngx_crc32.c +++ b/usr.sbin/nginx/src/core/ngx_crc32.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_crc32.h b/usr.sbin/nginx/src/core/ngx_crc32.h index 4435e4517e2..f6d6865b5aa 100644 --- a/usr.sbin/nginx/src/core/ngx_crc32.h +++ b/usr.sbin/nginx/src/core/ngx_crc32.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_crypt.h b/usr.sbin/nginx/src/core/ngx_crypt.h index 45ef81d4b0e..386911428ac 100644 --- a/usr.sbin/nginx/src/core/ngx_crypt.h +++ b/usr.sbin/nginx/src/core/ngx_crypt.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_cycle.c b/usr.sbin/nginx/src/core/ngx_cycle.c index e0f6f82c7ee..e6e1c003cff 100644 --- a/usr.sbin/nginx/src/core/ngx_cycle.c +++ b/usr.sbin/nginx/src/core/ngx_cycle.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_cycle.h b/usr.sbin/nginx/src/core/ngx_cycle.h index e14983d6f1b..dbc6e195e93 100644 --- a/usr.sbin/nginx/src/core/ngx_cycle.h +++ b/usr.sbin/nginx/src/core/ngx_cycle.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_file.c b/usr.sbin/nginx/src/core/ngx_file.c index 7704c3e1736..ce3a0a2827f 100644 --- a/usr.sbin/nginx/src/core/ngx_file.c +++ b/usr.sbin/nginx/src/core/ngx_file.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_file.h b/usr.sbin/nginx/src/core/ngx_file.h index 88035172d7f..7023e67784e 100644 --- a/usr.sbin/nginx/src/core/ngx_file.h +++ b/usr.sbin/nginx/src/core/ngx_file.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_hash.c b/usr.sbin/nginx/src/core/ngx_hash.c index 0c7285202fb..7d04f7484f9 100644 --- a/usr.sbin/nginx/src/core/ngx_hash.c +++ b/usr.sbin/nginx/src/core/ngx_hash.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -277,7 +278,7 @@ ngx_hash_init(ngx_hash_init_t *hinit, ngx_hash_key_t *names, ngx_uint_t nelts) start = nelts / (bucket_size / (2 * sizeof(void *))); start = start ? start : 1; - if (hinit->max_size > 10000 && hinit->max_size / nelts < 100) { + if (hinit->max_size > 10000 && nelts && hinit->max_size / nelts < 100) { start = hinit->max_size - 1000; } diff --git a/usr.sbin/nginx/src/core/ngx_hash.h b/usr.sbin/nginx/src/core/ngx_hash.h index beabcb7c306..abc3cbe5d93 100644 --- a/usr.sbin/nginx/src/core/ngx_hash.h +++ b/usr.sbin/nginx/src/core/ngx_hash.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_inet.c b/usr.sbin/nginx/src/core/ngx_inet.c index 4baa74aeecd..2785c8c8cf6 100644 --- a/usr.sbin/nginx/src/core/ngx_inet.c +++ b/usr.sbin/nginx/src/core/ngx_inet.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_inet.h b/usr.sbin/nginx/src/core/ngx_inet.h index 0b42abd8a64..c5a3d7677b1 100644 --- a/usr.sbin/nginx/src/core/ngx_inet.h +++ b/usr.sbin/nginx/src/core/ngx_inet.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_list.c b/usr.sbin/nginx/src/core/ngx_list.c index 84bc0026306..89ea8235275 100644 --- a/usr.sbin/nginx/src/core/ngx_list.c +++ b/usr.sbin/nginx/src/core/ngx_list.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_list.h b/usr.sbin/nginx/src/core/ngx_list.h index 75db8688686..e0fe6436b13 100644 --- a/usr.sbin/nginx/src/core/ngx_list.h +++ b/usr.sbin/nginx/src/core/ngx_list.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_log.c b/usr.sbin/nginx/src/core/ngx_log.c index e7d597e7e01..d7830fb4b1b 100644 --- a/usr.sbin/nginx/src/core/ngx_log.c +++ b/usr.sbin/nginx/src/core/ngx_log.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_log.h b/usr.sbin/nginx/src/core/ngx_log.h index a55ef449c1c..32336478639 100644 --- a/usr.sbin/nginx/src/core/ngx_log.h +++ b/usr.sbin/nginx/src/core/ngx_log.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -121,15 +122,38 @@ void ngx_cdecl ngx_log_debug_core(ngx_log_t *log, ngx_err_t err, #if (NGX_HAVE_VARIADIC_MACROS) -#define ngx_log_debug0 ngx_log_debug -#define ngx_log_debug1 ngx_log_debug -#define ngx_log_debug2 ngx_log_debug -#define ngx_log_debug3 ngx_log_debug -#define ngx_log_debug4 ngx_log_debug -#define ngx_log_debug5 ngx_log_debug -#define ngx_log_debug6 ngx_log_debug -#define ngx_log_debug7 ngx_log_debug -#define ngx_log_debug8 ngx_log_debug +#define ngx_log_debug0(level, log, err, fmt) \ + ngx_log_debug(level, log, err, fmt) + +#define ngx_log_debug1(level, log, err, fmt, arg1) \ + ngx_log_debug(level, log, err, fmt, arg1) + +#define ngx_log_debug2(level, log, err, fmt, arg1, arg2) \ + ngx_log_debug(level, log, err, fmt, arg1, arg2) + +#define ngx_log_debug3(level, log, err, fmt, arg1, arg2, arg3) \ + ngx_log_debug(level, log, err, fmt, arg1, arg2, arg3) + +#define ngx_log_debug4(level, log, err, fmt, arg1, arg2, arg3, arg4) \ + ngx_log_debug(level, log, err, fmt, arg1, arg2, arg3, arg4) + +#define ngx_log_debug5(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5) \ + ngx_log_debug(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5) + +#define ngx_log_debug6(level, log, err, fmt, \ + arg1, arg2, arg3, arg4, arg5, arg6) \ + ngx_log_debug(level, log, err, fmt, \ + arg1, arg2, arg3, arg4, arg5, arg6) + +#define ngx_log_debug7(level, log, err, fmt, \ + arg1, arg2, arg3, arg4, arg5, arg6, arg7) \ + ngx_log_debug(level, log, err, fmt, \ + arg1, arg2, arg3, arg4, arg5, arg6, arg7) + +#define ngx_log_debug8(level, log, err, fmt, \ + arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \ + ngx_log_debug(level, log, err, fmt, \ + arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) #else /* NO VARIADIC MACROS */ diff --git a/usr.sbin/nginx/src/core/ngx_md5.h b/usr.sbin/nginx/src/core/ngx_md5.h index 45a1011bb5d..18d09d6d59a 100644 --- a/usr.sbin/nginx/src/core/ngx_md5.h +++ b/usr.sbin/nginx/src/core/ngx_md5.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_murmurhash.h b/usr.sbin/nginx/src/core/ngx_murmurhash.h index ae40779d4b1..2b2b70d6ccf 100644 --- a/usr.sbin/nginx/src/core/ngx_murmurhash.h +++ b/usr.sbin/nginx/src/core/ngx_murmurhash.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_open_file_cache.c b/usr.sbin/nginx/src/core/ngx_open_file_cache.c index 0d605b527fb..9ac552111c2 100644 --- a/usr.sbin/nginx/src/core/ngx_open_file_cache.c +++ b/usr.sbin/nginx/src/core/ngx_open_file_cache.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_open_file_cache.h b/usr.sbin/nginx/src/core/ngx_open_file_cache.h index 638bc5dd115..436de30609d 100644 --- a/usr.sbin/nginx/src/core/ngx_open_file_cache.h +++ b/usr.sbin/nginx/src/core/ngx_open_file_cache.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_output_chain.c b/usr.sbin/nginx/src/core/ngx_output_chain.c index 4f100a81837..64500d52886 100644 --- a/usr.sbin/nginx/src/core/ngx_output_chain.c +++ b/usr.sbin/nginx/src/core/ngx_output_chain.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_palloc.c b/usr.sbin/nginx/src/core/ngx_palloc.c index 9eac114b7c7..efbc24452bd 100644 --- a/usr.sbin/nginx/src/core/ngx_palloc.c +++ b/usr.sbin/nginx/src/core/ngx_palloc.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_palloc.h b/usr.sbin/nginx/src/core/ngx_palloc.h index 6e6612cca7e..d6528291053 100644 --- a/usr.sbin/nginx/src/core/ngx_palloc.h +++ b/usr.sbin/nginx/src/core/ngx_palloc.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_parse.c b/usr.sbin/nginx/src/core/ngx_parse.c index dff59ff60f9..da24f4c7543 100644 --- a/usr.sbin/nginx/src/core/ngx_parse.c +++ b/usr.sbin/nginx/src/core/ngx_parse.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_parse.h b/usr.sbin/nginx/src/core/ngx_parse.h index e770623fde6..0c8114fb693 100644 --- a/usr.sbin/nginx/src/core/ngx_parse.h +++ b/usr.sbin/nginx/src/core/ngx_parse.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_queue.c b/usr.sbin/nginx/src/core/ngx_queue.c index a49b5c6638a..3cacaf3a883 100644 --- a/usr.sbin/nginx/src/core/ngx_queue.c +++ b/usr.sbin/nginx/src/core/ngx_queue.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_queue.h b/usr.sbin/nginx/src/core/ngx_queue.h index 9a1763d7b6c..038bf121138 100644 --- a/usr.sbin/nginx/src/core/ngx_queue.h +++ b/usr.sbin/nginx/src/core/ngx_queue.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_radix_tree.c b/usr.sbin/nginx/src/core/ngx_radix_tree.c index f339e6fab76..b95cbc01303 100644 --- a/usr.sbin/nginx/src/core/ngx_radix_tree.c +++ b/usr.sbin/nginx/src/core/ngx_radix_tree.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_radix_tree.h b/usr.sbin/nginx/src/core/ngx_radix_tree.h index 02a9f383b7e..65ee69b2682 100644 --- a/usr.sbin/nginx/src/core/ngx_radix_tree.h +++ b/usr.sbin/nginx/src/core/ngx_radix_tree.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_rbtree.c b/usr.sbin/nginx/src/core/ngx_rbtree.c index 749b601f2b2..6ae4d5c05ab 100644 --- a/usr.sbin/nginx/src/core/ngx_rbtree.c +++ b/usr.sbin/nginx/src/core/ngx_rbtree.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_rbtree.h b/usr.sbin/nginx/src/core/ngx_rbtree.h index 8531afcea71..6e47a5bbbaa 100644 --- a/usr.sbin/nginx/src/core/ngx_rbtree.h +++ b/usr.sbin/nginx/src/core/ngx_rbtree.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_regex.c b/usr.sbin/nginx/src/core/ngx_regex.c index 984a28aa983..979110e75cc 100644 --- a/usr.sbin/nginx/src/core/ngx_regex.c +++ b/usr.sbin/nginx/src/core/ngx_regex.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -137,23 +138,6 @@ failed: ngx_int_t -ngx_regex_capture_count(ngx_regex_t *re) -{ - int rc, n; - - n = 0; - - rc = pcre_fullinfo(re, NULL, PCRE_INFO_CAPTURECOUNT, &n); - - if (rc < 0) { - return (ngx_int_t) rc; - } - - return (ngx_int_t) n; -} - - -ngx_int_t ngx_regex_exec_array(ngx_array_t *a, ngx_str_t *s, ngx_log_t *log) { ngx_int_t n; diff --git a/usr.sbin/nginx/src/core/ngx_regex.h b/usr.sbin/nginx/src/core/ngx_regex.h index fc35059b3f6..58b9eef7621 100644 --- a/usr.sbin/nginx/src/core/ngx_regex.h +++ b/usr.sbin/nginx/src/core/ngx_regex.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_resolver.c b/usr.sbin/nginx/src/core/ngx_resolver.c index 32cd555b563..7291a1c5d53 100644 --- a/usr.sbin/nginx/src/core/ngx_resolver.c +++ b/usr.sbin/nginx/src/core/ngx_resolver.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_resolver.h b/usr.sbin/nginx/src/core/ngx_resolver.h index ef3c2082c24..2301623df94 100644 --- a/usr.sbin/nginx/src/core/ngx_resolver.h +++ b/usr.sbin/nginx/src/core/ngx_resolver.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_sha1.h b/usr.sbin/nginx/src/core/ngx_sha1.h index f158fd4dc92..81c909e2f3d 100644 --- a/usr.sbin/nginx/src/core/ngx_sha1.h +++ b/usr.sbin/nginx/src/core/ngx_sha1.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_shmtx.c b/usr.sbin/nginx/src/core/ngx_shmtx.c index 3b429c4f979..368456e14f8 100644 --- a/usr.sbin/nginx/src/core/ngx_shmtx.c +++ b/usr.sbin/nginx/src/core/ngx_shmtx.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_shmtx.h b/usr.sbin/nginx/src/core/ngx_shmtx.h index 714f73aa624..70a44cbc5fb 100644 --- a/usr.sbin/nginx/src/core/ngx_shmtx.h +++ b/usr.sbin/nginx/src/core/ngx_shmtx.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_slab.c b/usr.sbin/nginx/src/core/ngx_slab.c index 870c59bad3b..74f23a35e19 100644 --- a/usr.sbin/nginx/src/core/ngx_slab.c +++ b/usr.sbin/nginx/src/core/ngx_slab.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> diff --git a/usr.sbin/nginx/src/core/ngx_slab.h b/usr.sbin/nginx/src/core/ngx_slab.h index 291e1b51e13..efb5d01f3b3 100644 --- a/usr.sbin/nginx/src/core/ngx_slab.h +++ b/usr.sbin/nginx/src/core/ngx_slab.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_spinlock.c b/usr.sbin/nginx/src/core/ngx_spinlock.c index f6c80f76941..9c93afaf1b1 100644 --- a/usr.sbin/nginx/src/core/ngx_spinlock.c +++ b/usr.sbin/nginx/src/core/ngx_spinlock.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_string.c b/usr.sbin/nginx/src/core/ngx_string.c index f5e1d4bf3e2..1dec96cc4ca 100644 --- a/usr.sbin/nginx/src/core/ngx_string.c +++ b/usr.sbin/nginx/src/core/ngx_string.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_string.h b/usr.sbin/nginx/src/core/ngx_string.h index 2b9c59a5e62..fa386ca72f0 100644 --- a/usr.sbin/nginx/src/core/ngx_string.h +++ b/usr.sbin/nginx/src/core/ngx_string.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_times.c b/usr.sbin/nginx/src/core/ngx_times.c index f1685aaf6b2..745a4bd1b2e 100644 --- a/usr.sbin/nginx/src/core/ngx_times.c +++ b/usr.sbin/nginx/src/core/ngx_times.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/core/ngx_times.h b/usr.sbin/nginx/src/core/ngx_times.h index 7f2fafd5495..c4b26a2ed0b 100644 --- a/usr.sbin/nginx/src/core/ngx_times.h +++ b/usr.sbin/nginx/src/core/ngx_times.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/modules/ngx_aio_module.c b/usr.sbin/nginx/src/event/modules/ngx_aio_module.c index 71f7d40c63c..c881319d179 100644 --- a/usr.sbin/nginx/src/event/modules/ngx_aio_module.c +++ b/usr.sbin/nginx/src/event/modules/ngx_aio_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/modules/ngx_devpoll_module.c b/usr.sbin/nginx/src/event/modules/ngx_devpoll_module.c index e88c999b861..d09b5bc07ad 100644 --- a/usr.sbin/nginx/src/event/modules/ngx_devpoll_module.c +++ b/usr.sbin/nginx/src/event/modules/ngx_devpoll_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/modules/ngx_epoll_module.c b/usr.sbin/nginx/src/event/modules/ngx_epoll_module.c index 31c10c6dc86..ddf178927b4 100644 --- a/usr.sbin/nginx/src/event/modules/ngx_epoll_module.c +++ b/usr.sbin/nginx/src/event/modules/ngx_epoll_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -683,6 +684,18 @@ ngx_epoll_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, ngx_uint_t flags) if ((revents & EPOLLOUT) && wev->active) { + if (c->fd == -1 || wev->instance != instance) { + + /* + * the stale event from a file descriptor + * that was just closed in this iteration + */ + + ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, + "epoll: stale event %p", c); + continue; + } + if (flags & NGX_POST_THREAD_EVENTS) { wev->posted_ready = 1; diff --git a/usr.sbin/nginx/src/event/modules/ngx_eventport_module.c b/usr.sbin/nginx/src/event/modules/ngx_eventport_module.c index f4f0119a597..0bfb47e5ca3 100644 --- a/usr.sbin/nginx/src/event/modules/ngx_eventport_module.c +++ b/usr.sbin/nginx/src/event/modules/ngx_eventport_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/modules/ngx_kqueue_module.c b/usr.sbin/nginx/src/event/modules/ngx_kqueue_module.c index d78e56259d3..c0f70752f01 100644 --- a/usr.sbin/nginx/src/event/modules/ngx_kqueue_module.c +++ b/usr.sbin/nginx/src/event/modules/ngx_kqueue_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/modules/ngx_poll_module.c b/usr.sbin/nginx/src/event/modules/ngx_poll_module.c index ea947b7e5f7..ed64bc51a2f 100644 --- a/usr.sbin/nginx/src/event/modules/ngx_poll_module.c +++ b/usr.sbin/nginx/src/event/modules/ngx_poll_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/modules/ngx_rtsig_module.c b/usr.sbin/nginx/src/event/modules/ngx_rtsig_module.c index 4b011007b0e..2f0f9970f39 100644 --- a/usr.sbin/nginx/src/event/modules/ngx_rtsig_module.c +++ b/usr.sbin/nginx/src/event/modules/ngx_rtsig_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/modules/ngx_select_module.c b/usr.sbin/nginx/src/event/modules/ngx_select_module.c index 72dbe74bd69..ed71368e985 100644 --- a/usr.sbin/nginx/src/event/modules/ngx_select_module.c +++ b/usr.sbin/nginx/src/event/modules/ngx_select_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/modules/ngx_win32_select_module.c b/usr.sbin/nginx/src/event/modules/ngx_win32_select_module.c index 3d75d69a972..0a02ffca0b0 100644 --- a/usr.sbin/nginx/src/event/modules/ngx_win32_select_module.c +++ b/usr.sbin/nginx/src/event/modules/ngx_win32_select_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/ngx_event.c b/usr.sbin/nginx/src/event/ngx_event.c index 8a472ffe80d..88e151cc4b5 100644 --- a/usr.sbin/nginx/src/event/ngx_event.c +++ b/usr.sbin/nginx/src/event/ngx_event.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/ngx_event.h b/usr.sbin/nginx/src/event/ngx_event.h index 778da529d5b..aa2183a22f6 100644 --- a/usr.sbin/nginx/src/event/ngx_event.h +++ b/usr.sbin/nginx/src/event/ngx_event.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/ngx_event_accept.c b/usr.sbin/nginx/src/event/ngx_event_accept.c index 2355d1bdadd..a45afeb1f0b 100644 --- a/usr.sbin/nginx/src/event/ngx_event_accept.c +++ b/usr.sbin/nginx/src/event/ngx_event_accept.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/ngx_event_busy_lock.c b/usr.sbin/nginx/src/event/ngx_event_busy_lock.c index 249e20563a7..fdac0da8fd2 100644 --- a/usr.sbin/nginx/src/event/ngx_event_busy_lock.c +++ b/usr.sbin/nginx/src/event/ngx_event_busy_lock.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/ngx_event_busy_lock.h b/usr.sbin/nginx/src/event/ngx_event_busy_lock.h index 3e767704af5..254c233e776 100644 --- a/usr.sbin/nginx/src/event/ngx_event_busy_lock.h +++ b/usr.sbin/nginx/src/event/ngx_event_busy_lock.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/ngx_event_connect.c b/usr.sbin/nginx/src/event/ngx_event_connect.c index fb8fd21105a..978f39b42a5 100644 --- a/usr.sbin/nginx/src/event/ngx_event_connect.c +++ b/usr.sbin/nginx/src/event/ngx_event_connect.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -159,6 +160,9 @@ ngx_event_connect_peer(ngx_peer_connection_t *pc) ngx_log_error(level, c->log, err, "connect() to %V failed", pc->name); + ngx_close_connection(c); + pc->connection = NULL; + return NGX_DECLINED; } } @@ -240,12 +244,8 @@ ngx_event_connect_peer(ngx_peer_connection_t *pc) failed: - ngx_free_connection(c); - - if (ngx_close_socket(s) == -1) { - ngx_log_error(NGX_LOG_ALERT, pc->log, ngx_socket_errno, - ngx_close_socket_n " failed"); - } + ngx_close_connection(c); + pc->connection = NULL; return NGX_ERROR; } diff --git a/usr.sbin/nginx/src/event/ngx_event_connect.h b/usr.sbin/nginx/src/event/ngx_event_connect.h index d64f1bb101e..951c24f411c 100644 --- a/usr.sbin/nginx/src/event/ngx_event_connect.h +++ b/usr.sbin/nginx/src/event/ngx_event_connect.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/ngx_event_mutex.c b/usr.sbin/nginx/src/event/ngx_event_mutex.c index 2335e5bafd0..2bdfd5b4ecc 100644 --- a/usr.sbin/nginx/src/event/ngx_event_mutex.c +++ b/usr.sbin/nginx/src/event/ngx_event_mutex.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/ngx_event_openssl.c b/usr.sbin/nginx/src/event/ngx_event_openssl.c index 82936906f6a..f393334ade6 100644 --- a/usr.sbin/nginx/src/event/ngx_event_openssl.c +++ b/usr.sbin/nginx/src/event/ngx_event_openssl.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -78,18 +79,6 @@ ngx_module_t ngx_openssl_module = { }; -static long ngx_ssl_protocols[] = { - SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1, - SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1, - SSL_OP_NO_SSLv2|SSL_OP_NO_TLSv1, - SSL_OP_NO_TLSv1, - SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3, - SSL_OP_NO_SSLv3, - SSL_OP_NO_SSLv2, - 0, -}; - - int ngx_ssl_connection_index; int ngx_ssl_server_conf_index; int ngx_ssl_session_cache_index; @@ -103,8 +92,6 @@ ngx_ssl_init(ngx_log_t *log) SSL_library_init(); SSL_load_error_strings(); - ENGINE_load_builtin_engines(); - OpenSSL_add_all_algorithms(); ngx_ssl_connection_index = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL); @@ -171,9 +158,25 @@ ngx_ssl_create(ngx_ssl_t *ssl, ngx_uint_t protocols, void *data) SSL_CTX_set_options(ssl->ctx, SSL_OP_SINGLE_DH_USE); - if (ngx_ssl_protocols[protocols >> 1] != 0) { - SSL_CTX_set_options(ssl->ctx, ngx_ssl_protocols[protocols >> 1]); + if (!(protocols & NGX_SSL_SSLv2)) { + SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_SSLv2); + } + if (!(protocols & NGX_SSL_SSLv3)) { + SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_SSLv3); } + if (!(protocols & NGX_SSL_TLSv1)) { + SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_TLSv1); + } +#ifdef SSL_OP_NO_TLSv1_1 + if (!(protocols & NGX_SSL_TLSv1_1)) { + SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_TLSv1_1); + } +#endif +#ifdef SSL_OP_NO_TLSv1_2 + if (!(protocols & NGX_SSL_TLSv1_2)) { + SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_TLSv1_2); + } +#endif #ifdef SSL_OP_NO_COMPRESSION SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_COMPRESSION); diff --git a/usr.sbin/nginx/src/event/ngx_event_openssl.h b/usr.sbin/nginx/src/event/ngx_event_openssl.h index 33cab7b3ccb..cd6d88518bf 100644 --- a/usr.sbin/nginx/src/event/ngx_event_openssl.h +++ b/usr.sbin/nginx/src/event/ngx_event_openssl.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -81,9 +82,11 @@ typedef struct { -#define NGX_SSL_SSLv2 2 -#define NGX_SSL_SSLv3 4 -#define NGX_SSL_TLSv1 8 +#define NGX_SSL_SSLv2 0x0002 +#define NGX_SSL_SSLv3 0x0004 +#define NGX_SSL_TLSv1 0x0008 +#define NGX_SSL_TLSv1_1 0x0010 +#define NGX_SSL_TLSv1_2 0x0020 #define NGX_SSL_BUFFER 1 diff --git a/usr.sbin/nginx/src/event/ngx_event_pipe.c b/usr.sbin/nginx/src/event/ngx_event_pipe.c index bef62484e02..5f3b107ef03 100644 --- a/usr.sbin/nginx/src/event/ngx_event_pipe.c +++ b/usr.sbin/nginx/src/event/ngx_event_pipe.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/ngx_event_pipe.h b/usr.sbin/nginx/src/event/ngx_event_pipe.h index 00b8acf6689..ff63cf64af3 100644 --- a/usr.sbin/nginx/src/event/ngx_event_pipe.h +++ b/usr.sbin/nginx/src/event/ngx_event_pipe.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/ngx_event_posted.c b/usr.sbin/nginx/src/event/ngx_event_posted.c index a7b09fdd6ee..e548145ed73 100644 --- a/usr.sbin/nginx/src/event/ngx_event_posted.c +++ b/usr.sbin/nginx/src/event/ngx_event_posted.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/ngx_event_posted.h b/usr.sbin/nginx/src/event/ngx_event_posted.h index f9c55e5a3c5..abd2e261dff 100644 --- a/usr.sbin/nginx/src/event/ngx_event_posted.h +++ b/usr.sbin/nginx/src/event/ngx_event_posted.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/ngx_event_timer.c b/usr.sbin/nginx/src/event/ngx_event_timer.c index 76a1a1f41ae..7a810720930 100644 --- a/usr.sbin/nginx/src/event/ngx_event_timer.c +++ b/usr.sbin/nginx/src/event/ngx_event_timer.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/event/ngx_event_timer.h b/usr.sbin/nginx/src/event/ngx_event_timer.h index 61ffeaefe65..ec9b316bdc8 100644 --- a/usr.sbin/nginx/src/event/ngx_event_timer.h +++ b/usr.sbin/nginx/src/event/ngx_event_timer.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_access_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_access_module.c index a28ebf7b789..84a75d777ab 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_access_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_access_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_addition_filter_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_addition_filter_module.c index 9b22a0a122c..24747c564b8 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_addition_filter_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_addition_filter_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_auth_basic_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_auth_basic_module.c index 45168de8404..ec3b1cf9500 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_auth_basic_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_auth_basic_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_autoindex_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_autoindex_module.c index bd7388126ae..9b54d0cf91d 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_autoindex_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_autoindex_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_browser_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_browser_module.c index d400fec7fd6..13a7145385e 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_browser_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_browser_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_charset_filter_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_charset_filter_module.c index a6f9afcae50..27a00d09aee 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_charset_filter_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_charset_filter_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_chunked_filter_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_chunked_filter_module.c index 17f0b4583d1..f07a8442e4d 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_chunked_filter_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_chunked_filter_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_dav_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_dav_module.c index 3bd9d3e943e..dbb17ac3055 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_dav_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_dav_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_degradation_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_degradation_module.c index a5f83bb20a7..0b1368f3b5a 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_degradation_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_degradation_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_empty_gif_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_empty_gif_module.c index 7cef538acb1..04114dc3f41 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_empty_gif_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_empty_gif_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_fastcgi_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_fastcgi_module.c index dd555d49d70..5ae42ef628f 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_fastcgi_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_fastcgi_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -2214,6 +2215,10 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) |NGX_HTTP_UPSTREAM_FT_OFF; } + if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_ERROR) { + conf->upstream.cache_use_stale |= NGX_HTTP_UPSTREAM_FT_NOLIVE; + } + if (conf->upstream.cache_methods == 0) { conf->upstream.cache_methods = prev->upstream.cache_methods; } diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_flv_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_flv_module.c index 30af834ab6e..f6870235b34 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_flv_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_flv_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_geo_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_geo_module.c index 7c5019605e2..1d7599e5551 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_geo_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_geo_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_geoip_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_geoip_module.c index 311a30ce397..60d67574def 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_geoip_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_geoip_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_gzip_filter_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_gzip_filter_module.c index d624e36ff84..dccc554a312 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_gzip_filter_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_gzip_filter_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_gzip_static_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_gzip_static_module.c index 9e3b1ad6695..18c28d8f581 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_gzip_static_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_gzip_static_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_headers_filter_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_headers_filter_module.c index 754473355cc..daa17623c55 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_headers_filter_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_headers_filter_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_image_filter_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_image_filter_module.c index 66ed34541e6..dd3c9cee5ae 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_image_filter_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_image_filter_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_index_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_index_module.c index 15aeaf9c60e..0835a7cf8e9 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_index_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_index_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_limit_req_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_limit_req_module.c index 718fae8e2e2..1d156157f69 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_limit_req_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_limit_req_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -569,7 +570,9 @@ ngx_http_limit_req_merge_conf(ngx_conf_t *cf, void *parent, void *child) ngx_http_limit_req_conf_t *conf = child; if (conf->shm_zone == NULL) { - *conf = *prev; + conf->shm_zone = prev->shm_zone; + conf->burst = prev->burst; + conf->nodelay = prev->nodelay; } ngx_conf_merge_uint_value(conf->limit_log_level, prev->limit_log_level, diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_limit_zone_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_limit_zone_module.c index 31df316e483..d92f5354a63 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_limit_zone_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_limit_zone_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -421,7 +422,8 @@ ngx_http_limit_zone_merge_conf(ngx_conf_t *cf, void *parent, void *child) ngx_http_limit_zone_conf_t *conf = child; if (conf->shm_zone == NULL) { - *conf = *prev; + conf->shm_zone = prev->shm_zone; + conf->conn = prev->conn; } ngx_conf_merge_uint_value(conf->log_level, prev->log_level, NGX_LOG_ERR); diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_log_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_log_module.c index da6fbb619d4..ffb8b5f4c2a 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_log_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_log_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_map_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_map_module.c index 6b724b304e6..2fe925f1cc1 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_map_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_map_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_memcached_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_memcached_module.c index 745f73aa5b9..31d22f62597 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_memcached_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_memcached_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_mp4_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_mp4_module.c index 3c9f88cfc57..816cc4c83ff 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_mp4_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_mp4_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> @@ -165,10 +166,10 @@ typedef struct { ((u_char *) (p))[7] = n4 #define ngx_mp4_get_32value(p) \ - ( (((u_char *) (p))[0] << 24) \ - + (((u_char *) (p))[1] << 16) \ - + (((u_char *) (p))[2] << 8) \ - + (((u_char *) (p))[3]) ) + ( ((uint32_t) ((u_char *) (p))[0] << 24) \ + + ( ((u_char *) (p))[1] << 16) \ + + ( ((u_char *) (p))[2] << 8) \ + + ( ((u_char *) (p))[3]) ) #define ngx_mp4_set_32value(p, n) \ ((u_char *) (p))[0] = (u_char) ((n) >> 24); \ @@ -2382,6 +2383,8 @@ found: data->pos = (u_char *) entry; atom_size = sizeof(ngx_mp4_stsc_atom_t) + (data->last - data->pos); + ngx_mp4_set_32value(entry->chunk, 1); + if (trak->chunk_samples) { first = &trak->stsc_chunk_entry; diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_not_modified_filter_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_not_modified_filter_module.c index a778c70dcd9..488c36b72d5 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_not_modified_filter_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_not_modified_filter_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_proxy_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_proxy_module.c index 64a853c6df5..6a1bfc758a4 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_proxy_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_proxy_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -1903,17 +1904,21 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) (NGX_CONF_BITMASK_SET |NGX_HTTP_UPSTREAM_FT_OFF)); + if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) { + conf->upstream.cache_use_stale = NGX_CONF_BITMASK_SET + |NGX_HTTP_UPSTREAM_FT_OFF; + } + + if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_ERROR) { + conf->upstream.cache_use_stale |= NGX_HTTP_UPSTREAM_FT_NOLIVE; + } + if (conf->upstream.cache_methods == 0) { conf->upstream.cache_methods = prev->upstream.cache_methods; } conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD; - if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) { - conf->upstream.cache_use_stale = NGX_CONF_BITMASK_SET - |NGX_HTTP_UPSTREAM_FT_OFF; - } - ngx_conf_merge_ptr_value(conf->upstream.cache_bypass, prev->upstream.cache_bypass, NULL); @@ -2766,7 +2771,9 @@ ngx_http_proxy_set_ssl(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *plcf) plcf->upstream.ssl->log = cf->log; if (ngx_ssl_create(plcf->upstream.ssl, - NGX_SSL_SSLv2|NGX_SSL_SSLv3|NGX_SSL_TLSv1, NULL) + NGX_SSL_SSLv2|NGX_SSL_SSLv3|NGX_SSL_TLSv1 + |NGX_SSL_TLSv1_1|NGX_SSL_TLSv1_2, + NULL) != NGX_OK) { return NGX_ERROR; diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_random_index_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_random_index_module.c index 02bdc45f9ea..67f34f73918 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_random_index_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_random_index_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_range_filter_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_range_filter_module.c index 02d2bf925b4..3380e5e0e1b 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_range_filter_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_range_filter_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_realip_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_realip_module.c index b88b122425a..bb606beb74c 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_realip_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_realip_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_referer_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_referer_module.c index cf2d744f10d..d8a014c5be6 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_referer_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_referer_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_rewrite_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_rewrite_module.c index 2ef24405ccc..98da67f2797 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_rewrite_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_rewrite_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_scgi_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_scgi_module.c index 168f497ce0c..08483cd700f 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_scgi_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_scgi_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. * Copyright (C) Manlio Perillo (manlio.perillo@gmail.com) */ @@ -36,7 +37,6 @@ static ngx_int_t ngx_http_scgi_create_request(ngx_http_request_t *r); static ngx_int_t ngx_http_scgi_reinit_request(ngx_http_request_t *r); static ngx_int_t ngx_http_scgi_process_status_line(ngx_http_request_t *r); static ngx_int_t ngx_http_scgi_process_header(ngx_http_request_t *r); -static ngx_int_t ngx_http_scgi_process_header(ngx_http_request_t *r); static void ngx_http_scgi_abort_request(ngx_http_request_t *r); static void ngx_http_scgi_finalize_request(ngx_http_request_t *r, ngx_int_t rc); @@ -824,11 +824,7 @@ ngx_http_scgi_process_status_line(ngx_http_request_t *r) } if (rc == NGX_ERROR) { - - r->http_version = NGX_HTTP_VERSION_9; - u->process_header = ngx_http_scgi_process_header; - return ngx_http_scgi_process_header(r); } @@ -928,12 +924,12 @@ ngx_http_scgi_process_header(ngx_http_request_t *r) ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "http scgi header done"); - if (r->http_version > NGX_HTTP_VERSION_9) { + u = r->upstream; + + if (u->headers_in.status_n) { return NGX_OK; } - u = r->upstream; - if (u->headers_in.status) { status_line = &u->headers_in.status->value; @@ -945,20 +941,15 @@ ngx_http_scgi_process_header(ngx_http_request_t *r) return NGX_HTTP_UPSTREAM_INVALID_HEADER; } - r->http_version = NGX_HTTP_VERSION_10; u->headers_in.status_n = status; u->headers_in.status_line = *status_line; } else if (u->headers_in.location) { - r->http_version = NGX_HTTP_VERSION_10; u->headers_in.status_n = 302; ngx_str_set(&u->headers_in.status_line, "302 Moved Temporarily"); } else { - ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, - "upstream sent neither valid HTTP/1.0 header " - "nor \"Status\" header line"); u->headers_in.status_n = 200; ngx_str_set(&u->headers_in.status_line, "200 OK"); } @@ -1247,6 +1238,10 @@ ngx_http_scgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) |NGX_HTTP_UPSTREAM_FT_OFF; } + if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_ERROR) { + conf->upstream.cache_use_stale |= NGX_HTTP_UPSTREAM_FT_NOLIVE; + } + if (conf->upstream.cache_methods == 0) { conf->upstream.cache_methods = prev->upstream.cache_methods; } diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_secure_link_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_secure_link_module.c index 6c4be6191da..b69b5526f4f 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_secure_link_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_secure_link_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_split_clients_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_split_clients_module.c index 0b726f777a1..f2160b149de 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_split_clients_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_split_clients_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_ssi_filter_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_ssi_filter_module.c index 0b8bc9bf83a..b02300f39f7 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_ssi_filter_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_ssi_filter_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -78,6 +79,8 @@ static ngx_str_t *ngx_http_ssi_get_variable(ngx_http_request_t *r, ngx_str_t *name, ngx_uint_t key); static ngx_int_t ngx_http_ssi_evaluate_string(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, ngx_str_t *text, ngx_uint_t flags); +static ngx_int_t ngx_http_ssi_regex_match(ngx_http_request_t *r, + ngx_str_t *pattern, ngx_str_t *str); static ngx_int_t ngx_http_ssi_include(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, ngx_str_t **params); @@ -624,16 +627,6 @@ ngx_http_ssi_body_filter(ngx_http_request_t *r, ngx_chain_t *in) continue; } - if (cmd->conditional - && (ctx->conditional == 0 - || ctx->conditional > cmd->conditional)) - { - ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, - "invalid context of SSI command: \"%V\"", - &ctx->command); - goto ssi_error; - } - if (!ctx->output && !cmd->block) { if (ctx->block) { @@ -709,6 +702,16 @@ ngx_http_ssi_body_filter(ngx_http_request_t *r, ngx_chain_t *in) } } + if (cmd->conditional + && (ctx->conditional == 0 + || ctx->conditional > cmd->conditional)) + { + ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, + "invalid context of SSI command: \"%V\"", + &ctx->command); + goto ssi_error; + } + if (ctx->params.nelts > NGX_HTTP_SSI_MAX_PARAMS) { ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "too many SSI command paramters: \"%V\"", @@ -1531,6 +1534,30 @@ ngx_http_ssi_get_variable(ngx_http_request_t *r, ngx_str_t *name, ctx = ngx_http_get_module_ctx(r->main, ngx_http_ssi_filter_module); +#if (NGX_PCRE) + { + ngx_str_t *value; + + if (key >= '0' && key <= '9') { + i = key - '0'; + + if (i < ctx->ncaptures) { + value = ngx_palloc(r->pool, sizeof(ngx_str_t)); + if (value == NULL) { + return NULL; + } + + i *= 2; + + value->data = ctx->captures_data + ctx->captures[i]; + value->len = ctx->captures[i + 1] - ctx->captures[i]; + + return value; + } + } + } +#endif + if (ctx->variables == NULL) { return NULL; } @@ -1820,6 +1847,115 @@ invalid_variable: static ngx_int_t +ngx_http_ssi_regex_match(ngx_http_request_t *r, ngx_str_t *pattern, + ngx_str_t *str) +{ +#if (NGX_PCRE) + int rc, *captures; + u_char *p, errstr[NGX_MAX_CONF_ERRSTR]; + size_t size; + ngx_int_t key; + ngx_str_t *vv, name, value; + ngx_uint_t i, n; + ngx_http_ssi_ctx_t *ctx; + ngx_http_ssi_var_t *var; + ngx_regex_compile_t rgc; + + ngx_memzero(&rgc, sizeof(ngx_regex_compile_t)); + + rgc.pattern = *pattern; + rgc.pool = r->pool; + rgc.err.len = NGX_MAX_CONF_ERRSTR; + rgc.err.data = errstr; + + if (ngx_regex_compile(&rgc) != NGX_OK) { + ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "%V", &rgc.err); + return NGX_HTTP_SSI_ERROR; + } + + n = (rgc.captures + 1) * 3; + + captures = ngx_palloc(r->pool, n * sizeof(int)); + if (captures == NULL) { + return NGX_ERROR; + } + + rc = ngx_regex_exec(rgc.regex, str, captures, n); + + if (rc < NGX_REGEX_NO_MATCHED) { + ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, + ngx_regex_exec_n " failed: %i on \"%V\" using \"%V\"", + rc, str, pattern); + return NGX_HTTP_SSI_ERROR; + } + + if (rc == NGX_REGEX_NO_MATCHED) { + return NGX_DECLINED; + } + + ctx = ngx_http_get_module_ctx(r->main, ngx_http_ssi_filter_module); + + ctx->ncaptures = rc; + ctx->captures = captures; + ctx->captures_data = str->data; + + if (rgc.named_captures > 0) { + + if (ctx->variables == NULL) { + ctx->variables = ngx_list_create(r->pool, 4, + sizeof(ngx_http_ssi_var_t)); + if (ctx->variables == NULL) { + return NGX_ERROR; + } + } + + size = rgc.name_size; + p = rgc.names; + + for (i = 0; i < (ngx_uint_t) rgc.named_captures; i++, p += size) { + + name.data = &p[2]; + name.len = ngx_strlen(name.data); + + n = 2 * ((p[0] << 8) + p[1]); + + value.data = &str->data[captures[n]]; + value.len = captures[n + 1] - captures[n]; + + key = ngx_hash_strlow(name.data, name.data, name.len); + + vv = ngx_http_ssi_get_variable(r, &name, key); + + if (vv) { + *vv = value; + continue; + } + + var = ngx_list_push(ctx->variables); + if (var == NULL) { + return NGX_ERROR; + } + + var->name = name; + var->key = key; + var->value = value; + } + } + + return NGX_OK; + +#else + + ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, + "the using of the regex \"%V\" in SSI requires PCRE library", + pattern); + return NGX_HTTP_SSI_ERROR; + +#endif +} + + +static ngx_int_t ngx_http_ssi_include(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, ngx_str_t **params) { @@ -2451,39 +2587,17 @@ ngx_http_ssi_if(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, } } else { -#if (NGX_PCRE) - ngx_regex_compile_t rgc; - u_char errstr[NGX_MAX_CONF_ERRSTR]; - right.data[right.len] = '\0'; - ngx_memzero(&rgc, sizeof(ngx_regex_compile_t)); - - rgc.pattern = right; - rgc.pool = r->pool; - rgc.err.len = NGX_MAX_CONF_ERRSTR; - rgc.err.data = errstr; - - if (ngx_regex_compile(&rgc) != NGX_OK) { - ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "%V", &rgc.err); - return NGX_HTTP_SSI_ERROR; - } + rc = ngx_http_ssi_regex_match(r, &right, &left); - rc = ngx_regex_exec(rgc.regex, &left, NULL, 0); - - if (rc < NGX_REGEX_NO_MATCHED) { - ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, - ngx_regex_exec_n " failed: %i on \"%V\" using \"%V\"", - rc, &left, &right); - return NGX_HTTP_SSI_ERROR; + if (rc == NGX_OK) { + rc = 0; + } else if (rc == NGX_DECLINED) { + rc = -1; + } else { + return rc; } -#else - ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, - "the using of the regex \"%V\" in SSI " - "requires PCRE library", &right); - - return NGX_HTTP_SSI_ERROR; -#endif } if ((rc == 0 && !negative) || (rc != 0 && negative)) { diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_ssi_filter_module.h b/usr.sbin/nginx/src/http/modules/ngx_http_ssi_filter_module.h index 6ab18841c82..0bd01a06775 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_ssi_filter_module.h +++ b/usr.sbin/nginx/src/http/modules/ngx_http_ssi_filter_module.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -64,6 +65,12 @@ typedef struct { ngx_list_t *variables; ngx_array_t *blocks; +#if (NGX_PCRE) + ngx_uint_t ncaptures; + int *captures; + u_char *captures_data; +#endif + unsigned conditional:2; unsigned encoding:2; unsigned block:1; diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_ssl_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_ssl_module.c index 0ac744ca1e2..d759489a614 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_ssl_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_ssl_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -37,6 +38,8 @@ static ngx_conf_bitmask_t ngx_http_ssl_protocols[] = { { ngx_string("SSLv2"), NGX_SSL_SSLv2 }, { ngx_string("SSLv3"), NGX_SSL_SSLv3 }, { ngx_string("TLSv1"), NGX_SSL_TLSv1 }, + { ngx_string("TLSv1.1"), NGX_SSL_TLSv1_1 }, + { ngx_string("TLSv1.2"), NGX_SSL_TLSv1_2 }, { ngx_null_string, 0 } }; @@ -364,7 +367,8 @@ ngx_http_ssl_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child) prev->prefer_server_ciphers, 0); ngx_conf_merge_bitmask_value(conf->protocols, prev->protocols, - (NGX_CONF_BITMASK_SET|NGX_SSL_SSLv3|NGX_SSL_TLSv1)); + (NGX_CONF_BITMASK_SET|NGX_SSL_SSLv3|NGX_SSL_TLSv1 + |NGX_SSL_TLSv1_1|NGX_SSL_TLSv1_2)); ngx_conf_merge_uint_value(conf->verify, prev->verify, 0); ngx_conf_merge_uint_value(conf->verify_depth, prev->verify_depth, 1); diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_ssl_module.h b/usr.sbin/nginx/src/http/modules/ngx_http_ssl_module.h index 0a5dd1d8d35..58659ab959e 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_ssl_module.h +++ b/usr.sbin/nginx/src/http/modules/ngx_http_ssl_module.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_static_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_static_module.c index cea050a948a..a0e302ad1d5 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_static_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_static_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_stub_status_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_stub_status_module.c index 4b74eb8845a..f780869811d 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_stub_status_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_stub_status_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_sub_filter_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_sub_filter_module.c index ddc69ba52c3..be5e90c4e9a 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_sub_filter_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_sub_filter_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_upstream_ip_hash_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_upstream_ip_hash_module.c index dffbf22b28f..fd9ecbe0bff 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_upstream_ip_hash_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_upstream_ip_hash_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_userid_filter_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_userid_filter_module.c index 195d9dc4fa4..894e2c14e90 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_userid_filter_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_userid_filter_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_uwsgi_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_uwsgi_module.c index d6081293298..367388e63f3 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_uwsgi_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_uwsgi_module.c @@ -3,6 +3,7 @@ * Copyright (C) Unbit S.a.s. 2009-2010 * Copyright (C) 2008 Manlio Perillo (manlio.perillo@gmail.com) * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -1298,6 +1299,10 @@ ngx_http_uwsgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) |NGX_HTTP_UPSTREAM_FT_OFF; } + if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_ERROR) { + conf->upstream.cache_use_stale |= NGX_HTTP_UPSTREAM_FT_NOLIVE; + } + if (conf->upstream.cache_methods == 0) { conf->upstream.cache_methods = prev->upstream.cache_methods; } diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_xslt_filter_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_xslt_filter_module.c index d67ec804742..f86c3038102 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_xslt_filter_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_xslt_filter_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/perl/Makefile.PL b/usr.sbin/nginx/src/http/modules/perl/Makefile.PL index c33b1fc72ff..6575f284cbe 100644 --- a/usr.sbin/nginx/src/http/modules/perl/Makefile.PL +++ b/usr.sbin/nginx/src/http/modules/perl/Makefile.PL @@ -1,5 +1,6 @@ # Copyright (C) Igor Sysoev +# Copyright (C) Nginx, Inc. use 5.006001; use ExtUtils::MakeMaker; diff --git a/usr.sbin/nginx/src/http/modules/perl/nginx.pm b/usr.sbin/nginx/src/http/modules/perl/nginx.pm index 24071ed38fa..a10ff1afbab 100644 --- a/usr.sbin/nginx/src/http/modules/perl/nginx.pm +++ b/usr.sbin/nginx/src/http/modules/perl/nginx.pm @@ -48,7 +48,7 @@ our @EXPORT = qw( HTTP_INSUFFICIENT_STORAGE ); -our $VERSION = '1.0.11'; +our $VERSION = '1.0.12'; require XSLoader; XSLoader::load('nginx', $VERSION); diff --git a/usr.sbin/nginx/src/http/modules/perl/nginx.xs b/usr.sbin/nginx/src/http/modules/perl/nginx.xs index e3a9dd5c9fd..dc69d509ae3 100644 --- a/usr.sbin/nginx/src/http/modules/perl/nginx.xs +++ b/usr.sbin/nginx/src/http/modules/perl/nginx.xs @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/perl/ngx_http_perl_module.c b/usr.sbin/nginx/src/http/modules/perl/ngx_http_perl_module.c index d89e96a5722..90e32e80efa 100644 --- a/usr.sbin/nginx/src/http/modules/perl/ngx_http_perl_module.c +++ b/usr.sbin/nginx/src/http/modules/perl/ngx_http_perl_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/modules/perl/ngx_http_perl_module.h b/usr.sbin/nginx/src/http/modules/perl/ngx_http_perl_module.h index 23969bcd485..5e60b031ec2 100644 --- a/usr.sbin/nginx/src/http/modules/perl/ngx_http_perl_module.h +++ b/usr.sbin/nginx/src/http/modules/perl/ngx_http_perl_module.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http.c b/usr.sbin/nginx/src/http/ngx_http.c index 1eb22f81e1c..8f45b71c9ed 100644 --- a/usr.sbin/nginx/src/http/ngx_http.c +++ b/usr.sbin/nginx/src/http/ngx_http.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http.h b/usr.sbin/nginx/src/http/ngx_http.h index e3619e148b4..930ac71ce06 100644 --- a/usr.sbin/nginx/src/http/ngx_http.h +++ b/usr.sbin/nginx/src/http/ngx_http.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_busy_lock.c b/usr.sbin/nginx/src/http/ngx_http_busy_lock.c index fd382433117..35a03acaac9 100644 --- a/usr.sbin/nginx/src/http/ngx_http_busy_lock.c +++ b/usr.sbin/nginx/src/http/ngx_http_busy_lock.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_busy_lock.h b/usr.sbin/nginx/src/http/ngx_http_busy_lock.h index d793e296641..c676382f29d 100644 --- a/usr.sbin/nginx/src/http/ngx_http_busy_lock.h +++ b/usr.sbin/nginx/src/http/ngx_http_busy_lock.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_cache.h b/usr.sbin/nginx/src/http/ngx_http_cache.h index 3cf113f4a0a..cb5d766882f 100644 --- a/usr.sbin/nginx/src/http/ngx_http_cache.h +++ b/usr.sbin/nginx/src/http/ngx_http_cache.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_config.h b/usr.sbin/nginx/src/http/ngx_http_config.h index 435ce9a84ca..2208c601b96 100644 --- a/usr.sbin/nginx/src/http/ngx_http_config.h +++ b/usr.sbin/nginx/src/http/ngx_http_config.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_copy_filter_module.c b/usr.sbin/nginx/src/http/ngx_http_copy_filter_module.c index 0f9917e2e8d..d52fbebe869 100644 --- a/usr.sbin/nginx/src/http/ngx_http_copy_filter_module.c +++ b/usr.sbin/nginx/src/http/ngx_http_copy_filter_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -189,7 +190,7 @@ ngx_http_copy_filter(ngx_http_request_t *r, ngx_chain_t *in) rc = n; - if (file->aio) { + if (rc == NGX_AGAIN) { file->aio->data = r; file->aio->handler = ngx_http_copy_aio_sendfile_event_handler; diff --git a/usr.sbin/nginx/src/http/ngx_http_core_module.c b/usr.sbin/nginx/src/http/ngx_http_core_module.c index c1fab30923c..43e6f56faad 100644 --- a/usr.sbin/nginx/src/http/ngx_http_core_module.c +++ b/usr.sbin/nginx/src/http/ngx_http_core_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -1289,6 +1290,7 @@ ngx_http_core_try_files_phase(ngx_http_request_t *r, ngx_memzero(&of, sizeof(ngx_open_file_info_t)); + of.read_ahead = clcf->read_ahead; of.directio = clcf->directio; of.valid = clcf->open_file_cache_valid; of.min_uses = clcf->open_file_cache_min_uses; diff --git a/usr.sbin/nginx/src/http/ngx_http_core_module.h b/usr.sbin/nginx/src/http/ngx_http_core_module.h index d2764fe0d26..ffe04a2075c 100644 --- a/usr.sbin/nginx/src/http/ngx_http_core_module.h +++ b/usr.sbin/nginx/src/http/ngx_http_core_module.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_file_cache.c b/usr.sbin/nginx/src/http/ngx_http_file_cache.c index efad6a32679..0fe2c4af831 100644 --- a/usr.sbin/nginx/src/http/ngx_http_file_cache.c +++ b/usr.sbin/nginx/src/http/ngx_http_file_cache.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -387,6 +388,13 @@ ngx_http_file_cache_read(ngx_http_request_t *r, ngx_http_cache_t *c) return NGX_DECLINED; } + if (h->body_start > c->body_start) { + ngx_log_error(NGX_LOG_CRIT, r->connection->log, 0, + "cache file \"%s\" has too long header", + c->file.name.data); + return NGX_DECLINED; + } + c->buf->last += n; c->valid_sec = h->valid_sec; @@ -1107,12 +1115,12 @@ ngx_http_file_cache_expire(ngx_http_file_cache_t *cache) /* * abnormally exited workers may leave locked cache entries, * and although it may be safe to remove them completely, - * we prefer to remove them from inactive queue and rbtree - * only, and to allow other leaks + * we prefer to just move them to the top of the inactive queue */ ngx_queue_remove(q); - ngx_rbtree_delete(&cache->sh->rbtree, &fcn->node); + fcn->expire = ngx_time() + cache->inactive; + ngx_queue_insert_head(&cache->sh->queue, &fcn->queue); ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0, "ignore long locked inactive cache entry %*s, count:%d", @@ -1710,69 +1718,3 @@ ngx_http_file_cache_valid_set_slot(ngx_conf_t *cf, ngx_command_t *cmd, return NGX_CONF_OK; } - - -ngx_int_t -ngx_http_cache(ngx_http_request_t *r, ngx_array_t *no_cache) -{ - ngx_str_t val; - ngx_uint_t i; - ngx_http_complex_value_t *cv; - - cv = no_cache->elts; - - for (i = 0; i < no_cache->nelts; i++) { - if (ngx_http_complex_value(r, &cv[i], &val) != NGX_OK) { - return NGX_ERROR; - } - - if (val.len && val.data[0] != '0') { - return NGX_DECLINED; - } - } - - return NGX_OK; -} - - -char * -ngx_http_no_cache_set_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) -{ - char *p = conf; - - ngx_str_t *value; - ngx_uint_t i; - ngx_array_t **a; - ngx_http_complex_value_t *cv; - ngx_http_compile_complex_value_t ccv; - - a = (ngx_array_t **) (p + cmd->offset); - - if (*a == NGX_CONF_UNSET_PTR) { - *a = ngx_array_create(cf->pool, 1, sizeof(ngx_http_complex_value_t)); - if (*a == NULL) { - return NGX_CONF_ERROR; - } - } - - value = cf->args->elts; - - for (i = 1; i < cf->args->nelts; i++) { - cv = ngx_array_push(*a); - if (cv == NULL) { - return NGX_CONF_ERROR; - } - - ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t)); - - ccv.cf = cf; - ccv.value = &value[i]; - ccv.complex_value = cv; - - if (ngx_http_compile_complex_value(&ccv) != NGX_OK) { - return NGX_CONF_ERROR; - } - } - - return NGX_CONF_OK; -} diff --git a/usr.sbin/nginx/src/http/ngx_http_header_filter_module.c b/usr.sbin/nginx/src/http/ngx_http_header_filter_module.c index bccf63624fa..1d8fee9d72f 100644 --- a/usr.sbin/nginx/src/http/ngx_http_header_filter_module.c +++ b/usr.sbin/nginx/src/http/ngx_http_header_filter_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -61,8 +62,8 @@ static ngx_str_t ngx_http_status_lines[] = { /* ngx_null_string, */ /* "207 Multi-Status" */ -#define NGX_HTTP_LAST_LEVEL_200 207 -#define NGX_HTTP_LEVEL_200 (NGX_HTTP_LAST_LEVEL_200 - 200) +#define NGX_HTTP_LAST_2XX 207 +#define NGX_HTTP_OFF_3XX (NGX_HTTP_LAST_2XX - 200) /* ngx_null_string, */ /* "300 Multiple Choices" */ @@ -75,8 +76,8 @@ static ngx_str_t ngx_http_status_lines[] = { /* ngx_null_string, */ /* "306 unused" */ /* ngx_null_string, */ /* "307 Temporary Redirect" */ -#define NGX_HTTP_LAST_LEVEL_300 305 -#define NGX_HTTP_LEVEL_300 (NGX_HTTP_LAST_LEVEL_300 - 301) +#define NGX_HTTP_LAST_3XX 305 +#define NGX_HTTP_OFF_4XX (NGX_HTTP_LAST_3XX - 301 + NGX_HTTP_OFF_3XX) ngx_string("400 Bad Request"), ngx_string("401 Unauthorized"), @@ -108,8 +109,8 @@ static ngx_str_t ngx_http_status_lines[] = { /* ngx_null_string, */ /* "423 Locked" */ /* ngx_null_string, */ /* "424 Failed Dependency" */ -#define NGX_HTTP_LAST_LEVEL_400 417 -#define NGX_HTTP_LEVEL_400 (NGX_HTTP_LAST_LEVEL_400 - 400) +#define NGX_HTTP_LAST_4XX 417 +#define NGX_HTTP_OFF_5XX (NGX_HTTP_LAST_4XX - 400 + NGX_HTTP_OFF_4XX) ngx_string("500 Internal Server Error"), ngx_string("501 Method Not Implemented"), @@ -124,7 +125,7 @@ static ngx_str_t ngx_http_status_lines[] = { /* ngx_null_string, */ /* "509 unused" */ /* ngx_null_string, */ /* "510 Not Extended" */ -#define NGX_HTTP_LAST_LEVEL_500 508 +#define NGX_HTTP_LAST_5XX 508 }; @@ -216,7 +217,7 @@ ngx_http_header_filter(ngx_http_request_t *r) status = r->headers_out.status; if (status >= NGX_HTTP_OK - && status < NGX_HTTP_LAST_LEVEL_200) + && status < NGX_HTTP_LAST_2XX) { /* 2XX */ @@ -234,7 +235,7 @@ ngx_http_header_filter(ngx_http_request_t *r) len += ngx_http_status_lines[status].len; } else if (status >= NGX_HTTP_MOVED_PERMANENTLY - && status < NGX_HTTP_LAST_LEVEL_300) + && status < NGX_HTTP_LAST_3XX) { /* 3XX */ @@ -242,29 +243,26 @@ ngx_http_header_filter(ngx_http_request_t *r) r->header_only = 1; } - status = status - NGX_HTTP_MOVED_PERMANENTLY + NGX_HTTP_LEVEL_200; + status = status - NGX_HTTP_MOVED_PERMANENTLY + NGX_HTTP_OFF_3XX; status_line = &ngx_http_status_lines[status]; len += ngx_http_status_lines[status].len; } else if (status >= NGX_HTTP_BAD_REQUEST - && status < NGX_HTTP_LAST_LEVEL_400) + && status < NGX_HTTP_LAST_4XX) { /* 4XX */ status = status - NGX_HTTP_BAD_REQUEST - + NGX_HTTP_LEVEL_200 - + NGX_HTTP_LEVEL_300; + + NGX_HTTP_OFF_4XX; status_line = &ngx_http_status_lines[status]; len += ngx_http_status_lines[status].len; } else if (status >= NGX_HTTP_INTERNAL_SERVER_ERROR - && status < NGX_HTTP_LAST_LEVEL_500) + && status < NGX_HTTP_LAST_5XX) { /* 5XX */ status = status - NGX_HTTP_INTERNAL_SERVER_ERROR - + NGX_HTTP_LEVEL_200 - + NGX_HTTP_LEVEL_300 - + NGX_HTTP_LEVEL_400; + + NGX_HTTP_OFF_5XX; status_line = &ngx_http_status_lines[status]; len += ngx_http_status_lines[status].len; diff --git a/usr.sbin/nginx/src/http/ngx_http_parse.c b/usr.sbin/nginx/src/http/ngx_http_parse.c index 949006b47a2..61081a414eb 100644 --- a/usr.sbin/nginx/src/http/ngx_http_parse.c +++ b/usr.sbin/nginx/src/http/ngx_http_parse.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_parse_time.c b/usr.sbin/nginx/src/http/ngx_http_parse_time.c index 2e7b40addf7..7d3aeaeffe0 100644 --- a/usr.sbin/nginx/src/http/ngx_http_parse_time.c +++ b/usr.sbin/nginx/src/http/ngx_http_parse_time.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_postpone_filter_module.c b/usr.sbin/nginx/src/http/ngx_http_postpone_filter_module.c index 156401b3292..cf49b2fa8ce 100644 --- a/usr.sbin/nginx/src/http/ngx_http_postpone_filter_module.c +++ b/usr.sbin/nginx/src/http/ngx_http_postpone_filter_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_request.c b/usr.sbin/nginx/src/http/ngx_http_request.c index aea2228fdd8..13cabbad5c5 100644 --- a/usr.sbin/nginx/src/http/ngx_http_request.c +++ b/usr.sbin/nginx/src/http/ngx_http_request.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_request.h b/usr.sbin/nginx/src/http/ngx_http_request.h index 6198d7ef2ab..3b246169a58 100644 --- a/usr.sbin/nginx/src/http/ngx_http_request.h +++ b/usr.sbin/nginx/src/http/ngx_http_request.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_request_body.c b/usr.sbin/nginx/src/http/ngx_http_request_body.c index 817b48e4555..ac09d56f197 100644 --- a/usr.sbin/nginx/src/http/ngx_http_request_body.c +++ b/usr.sbin/nginx/src/http/ngx_http_request_body.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_script.c b/usr.sbin/nginx/src/http/ngx_http_script.c index 6d81b4435c7..77ac9a629f5 100644 --- a/usr.sbin/nginx/src/http/ngx_http_script.c +++ b/usr.sbin/nginx/src/http/ngx_http_script.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_script.h b/usr.sbin/nginx/src/http/ngx_http_script.h index c5b1e406694..46592ab0155 100644 --- a/usr.sbin/nginx/src/http/ngx_http_script.h +++ b/usr.sbin/nginx/src/http/ngx_http_script.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_special_response.c b/usr.sbin/nginx/src/http/ngx_http_special_response.c index d30b781e5a5..a07ebe28da5 100644 --- a/usr.sbin/nginx/src/http/ngx_http_special_response.c +++ b/usr.sbin/nginx/src/http/ngx_http_special_response.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_upstream.c b/usr.sbin/nginx/src/http/ngx_http_upstream.c index 99b252ebbfd..d4f50a3685e 100644 --- a/usr.sbin/nginx/src/http/ngx_http_upstream.c +++ b/usr.sbin/nginx/src/http/ngx_http_upstream.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_upstream.h b/usr.sbin/nginx/src/http/ngx_http_upstream.h index 74f21356575..17fe538bdbf 100644 --- a/usr.sbin/nginx/src/http/ngx_http_upstream.h +++ b/usr.sbin/nginx/src/http/ngx_http_upstream.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_upstream_round_robin.c b/usr.sbin/nginx/src/http/ngx_http_upstream_round_robin.c index bb9a704b895..afc9b2e085a 100644 --- a/usr.sbin/nginx/src/http/ngx_http_upstream_round_robin.c +++ b/usr.sbin/nginx/src/http/ngx_http_upstream_round_robin.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_upstream_round_robin.h b/usr.sbin/nginx/src/http/ngx_http_upstream_round_robin.h index a9cb257c74f..6d285ab75e1 100644 --- a/usr.sbin/nginx/src/http/ngx_http_upstream_round_robin.h +++ b/usr.sbin/nginx/src/http/ngx_http_upstream_round_robin.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_variables.c b/usr.sbin/nginx/src/http/ngx_http_variables.c index 4afd884059f..c936cc43d71 100644 --- a/usr.sbin/nginx/src/http/ngx_http_variables.c +++ b/usr.sbin/nginx/src/http/ngx_http_variables.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -640,8 +641,8 @@ static ngx_int_t ngx_http_variable_headers(ngx_http_request_t *r, ngx_http_variable_value_t *v, uintptr_t data) { - ssize_t len; - u_char *p; + size_t len; + u_char *p, *end; ngx_uint_t i, n; ngx_array_t *a; ngx_table_elt_t **h; @@ -649,18 +650,30 @@ ngx_http_variable_headers(ngx_http_request_t *r, ngx_http_variable_value_t *v, a = (ngx_array_t *) ((char *) r + data); n = a->nelts; + h = a->elts; - if (n == 0) { + len = 0; + + for (i = 0; i < n; i++) { + + if (h[i]->hash == 0) { + continue; + } + + len += h[i]->value.len + sizeof("; ") - 1; + } + + if (len == 0) { v->not_found = 1; return NGX_OK; } + len -= sizeof("; ") - 1; + v->valid = 1; v->no_cacheable = 0; v->not_found = 0; - h = a->elts; - if (n == 1) { v->len = (*h)->value.len; v->data = (*h)->value.data; @@ -668,12 +681,6 @@ ngx_http_variable_headers(ngx_http_request_t *r, ngx_http_variable_value_t *v, return NGX_OK; } - len = - (ssize_t) (sizeof("; ") - 1); - - for (i = 0; i < n; i++) { - len += h[i]->value.len + sizeof("; ") - 1; - } - p = ngx_pnalloc(r->pool, len); if (p == NULL) { return NGX_ERROR; @@ -682,10 +689,17 @@ ngx_http_variable_headers(ngx_http_request_t *r, ngx_http_variable_value_t *v, v->len = len; v->data = p; + end = p + len; + for (i = 0; /* void */ ; i++) { + + if (h[i]->hash == 0) { + continue; + } + p = ngx_copy(p, h[i]->value.data, h[i]->value.len); - if (i == n - 1) { + if (p == end) { break; } @@ -738,6 +752,10 @@ ngx_http_variable_unknown_header(ngx_http_variable_value_t *v, ngx_str_t *var, i = 0; } + if (header[i].hash == 0) { + continue; + } + for (n = 0; n + prefix < var->len && n < header[i].key.len; n++) { ch = header[i].key.data[n]; diff --git a/usr.sbin/nginx/src/http/ngx_http_variables.h b/usr.sbin/nginx/src/http/ngx_http_variables.h index b0114e3006d..d2bb4db882b 100644 --- a/usr.sbin/nginx/src/http/ngx_http_variables.h +++ b/usr.sbin/nginx/src/http/ngx_http_variables.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/http/ngx_http_write_filter_module.c b/usr.sbin/nginx/src/http/ngx_http_write_filter_module.c index 46351349cf5..72b1f9b2fd7 100644 --- a/usr.sbin/nginx/src/http/ngx_http_write_filter_module.c +++ b/usr.sbin/nginx/src/http/ngx_http_write_filter_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -223,11 +224,14 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in) return NGX_AGAIN; } - } else if (clcf->sendfile_max_chunk) { - limit = clcf->sendfile_max_chunk; + if (clcf->sendfile_max_chunk + && (off_t) clcf->sendfile_max_chunk < limit) + { + limit = clcf->sendfile_max_chunk; + } } else { - limit = 0; + limit = clcf->sendfile_max_chunk; } sent = c->sent; @@ -262,17 +266,18 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in) } } - delay = (ngx_msec_t) ((nsent - sent) * 1000 / r->limit_rate + 1); + delay = (ngx_msec_t) ((nsent - sent) * 1000 / r->limit_rate); if (delay > 0) { + limit = 0; c->write->delayed = 1; ngx_add_timer(c->write, delay); } + } - } else if (c->write->ready - && clcf->sendfile_max_chunk - && (size_t) (c->sent - sent) - >= clcf->sendfile_max_chunk - 2 * ngx_pagesize) + if (limit + && c->write->ready + && c->sent - sent >= limit - (off_t) (2 * ngx_pagesize)) { c->write->delayed = 1; ngx_add_timer(c->write, 1); diff --git a/usr.sbin/nginx/src/mail/ngx_mail.c b/usr.sbin/nginx/src/mail/ngx_mail.c index 3eeb97fe0d2..c94281a15a2 100644 --- a/usr.sbin/nginx/src/mail/ngx_mail.c +++ b/usr.sbin/nginx/src/mail/ngx_mail.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/mail/ngx_mail.h b/usr.sbin/nginx/src/mail/ngx_mail.h index fd6d318a5d4..46a42dff62c 100644 --- a/usr.sbin/nginx/src/mail/ngx_mail.h +++ b/usr.sbin/nginx/src/mail/ngx_mail.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/mail/ngx_mail_auth_http_module.c b/usr.sbin/nginx/src/mail/ngx_mail_auth_http_module.c index c823326902c..c23c4bad73d 100644 --- a/usr.sbin/nginx/src/mail/ngx_mail_auth_http_module.c +++ b/usr.sbin/nginx/src/mail/ngx_mail_auth_http_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/mail/ngx_mail_core_module.c b/usr.sbin/nginx/src/mail/ngx_mail_core_module.c index bd2c916d5a4..c3528599cb0 100644 --- a/usr.sbin/nginx/src/mail/ngx_mail_core_module.c +++ b/usr.sbin/nginx/src/mail/ngx_mail_core_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/mail/ngx_mail_handler.c b/usr.sbin/nginx/src/mail/ngx_mail_handler.c index 0e37daf4879..a1c4464f7e5 100644 --- a/usr.sbin/nginx/src/mail/ngx_mail_handler.c +++ b/usr.sbin/nginx/src/mail/ngx_mail_handler.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/mail/ngx_mail_imap_handler.c b/usr.sbin/nginx/src/mail/ngx_mail_imap_handler.c index f15dbec805e..57e2fb77daa 100644 --- a/usr.sbin/nginx/src/mail/ngx_mail_imap_handler.c +++ b/usr.sbin/nginx/src/mail/ngx_mail_imap_handler.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/mail/ngx_mail_imap_module.c b/usr.sbin/nginx/src/mail/ngx_mail_imap_module.c index daf2a433ff8..dc80b4fb4c1 100644 --- a/usr.sbin/nginx/src/mail/ngx_mail_imap_module.c +++ b/usr.sbin/nginx/src/mail/ngx_mail_imap_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/mail/ngx_mail_imap_module.h b/usr.sbin/nginx/src/mail/ngx_mail_imap_module.h index c206ce05a5a..131b44597f8 100644 --- a/usr.sbin/nginx/src/mail/ngx_mail_imap_module.h +++ b/usr.sbin/nginx/src/mail/ngx_mail_imap_module.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/mail/ngx_mail_parse.c b/usr.sbin/nginx/src/mail/ngx_mail_parse.c index 67f4d5edf6d..ae0f7e39a92 100644 --- a/usr.sbin/nginx/src/mail/ngx_mail_parse.c +++ b/usr.sbin/nginx/src/mail/ngx_mail_parse.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/mail/ngx_mail_pop3_handler.c b/usr.sbin/nginx/src/mail/ngx_mail_pop3_handler.c index 56726dbcf20..0a073288daf 100644 --- a/usr.sbin/nginx/src/mail/ngx_mail_pop3_handler.c +++ b/usr.sbin/nginx/src/mail/ngx_mail_pop3_handler.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/mail/ngx_mail_pop3_module.c b/usr.sbin/nginx/src/mail/ngx_mail_pop3_module.c index 648c57ce81a..b59747290e2 100644 --- a/usr.sbin/nginx/src/mail/ngx_mail_pop3_module.c +++ b/usr.sbin/nginx/src/mail/ngx_mail_pop3_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/mail/ngx_mail_pop3_module.h b/usr.sbin/nginx/src/mail/ngx_mail_pop3_module.h index ce75c2a00e0..86947a77251 100644 --- a/usr.sbin/nginx/src/mail/ngx_mail_pop3_module.h +++ b/usr.sbin/nginx/src/mail/ngx_mail_pop3_module.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/mail/ngx_mail_proxy_module.c b/usr.sbin/nginx/src/mail/ngx_mail_proxy_module.c index 298e8d96a86..4ea608ceafa 100644 --- a/usr.sbin/nginx/src/mail/ngx_mail_proxy_module.c +++ b/usr.sbin/nginx/src/mail/ngx_mail_proxy_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/mail/ngx_mail_smtp_handler.c b/usr.sbin/nginx/src/mail/ngx_mail_smtp_handler.c index 0f69ce9681a..21714239fcc 100644 --- a/usr.sbin/nginx/src/mail/ngx_mail_smtp_handler.c +++ b/usr.sbin/nginx/src/mail/ngx_mail_smtp_handler.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/mail/ngx_mail_smtp_module.c b/usr.sbin/nginx/src/mail/ngx_mail_smtp_module.c index 463bb6e0b6c..cdd4e5eb188 100644 --- a/usr.sbin/nginx/src/mail/ngx_mail_smtp_module.c +++ b/usr.sbin/nginx/src/mail/ngx_mail_smtp_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/mail/ngx_mail_smtp_module.h b/usr.sbin/nginx/src/mail/ngx_mail_smtp_module.h index 21f2287be03..04ffab60ade 100644 --- a/usr.sbin/nginx/src/mail/ngx_mail_smtp_module.h +++ b/usr.sbin/nginx/src/mail/ngx_mail_smtp_module.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/mail/ngx_mail_ssl_module.c b/usr.sbin/nginx/src/mail/ngx_mail_ssl_module.c index 4f4c9a20d0d..dd6f2ac416a 100644 --- a/usr.sbin/nginx/src/mail/ngx_mail_ssl_module.c +++ b/usr.sbin/nginx/src/mail/ngx_mail_ssl_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -37,6 +38,8 @@ static ngx_conf_bitmask_t ngx_mail_ssl_protocols[] = { { ngx_string("SSLv2"), NGX_SSL_SSLv2 }, { ngx_string("SSLv3"), NGX_SSL_SSLv3 }, { ngx_string("TLSv1"), NGX_SSL_TLSv1 }, + { ngx_string("TLSv1.1"), NGX_SSL_TLSv1_1 }, + { ngx_string("TLSv1.2"), NGX_SSL_TLSv1_2 }, { ngx_null_string, 0 } }; @@ -206,7 +209,8 @@ ngx_mail_ssl_merge_conf(ngx_conf_t *cf, void *parent, void *child) prev->prefer_server_ciphers, 0); ngx_conf_merge_bitmask_value(conf->protocols, prev->protocols, - (NGX_CONF_BITMASK_SET|NGX_SSL_SSLv3|NGX_SSL_TLSv1)); + (NGX_CONF_BITMASK_SET|NGX_SSL_SSLv3|NGX_SSL_TLSv1 + |NGX_SSL_TLSv1_1|NGX_SSL_TLSv1_2)); ngx_conf_merge_str_value(conf->certificate, prev->certificate, ""); ngx_conf_merge_str_value(conf->certificate_key, prev->certificate_key, ""); diff --git a/usr.sbin/nginx/src/mail/ngx_mail_ssl_module.h b/usr.sbin/nginx/src/mail/ngx_mail_ssl_module.h index 61a275b36f5..7f59b38ae39 100644 --- a/usr.sbin/nginx/src/mail/ngx_mail_ssl_module.h +++ b/usr.sbin/nginx/src/mail/ngx_mail_ssl_module.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/misc/ngx_google_perftools_module.c b/usr.sbin/nginx/src/misc/ngx_google_perftools_module.c index 8be5b97ec9b..f2f8221b560 100644 --- a/usr.sbin/nginx/src/misc/ngx_google_perftools_module.c +++ b/usr.sbin/nginx/src/misc/ngx_google_perftools_module.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_aio_read.c b/usr.sbin/nginx/src/os/unix/ngx_aio_read.c index 1e41bac5f8d..7849881730f 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_aio_read.c +++ b/usr.sbin/nginx/src/os/unix/ngx_aio_read.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_aio_read_chain.c b/usr.sbin/nginx/src/os/unix/ngx_aio_read_chain.c index 28b9c8fa94a..8c831b95129 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_aio_read_chain.c +++ b/usr.sbin/nginx/src/os/unix/ngx_aio_read_chain.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_aio_write.c b/usr.sbin/nginx/src/os/unix/ngx_aio_write.c index 9138af16aa7..f0d93918e3b 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_aio_write.c +++ b/usr.sbin/nginx/src/os/unix/ngx_aio_write.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_aio_write_chain.c b/usr.sbin/nginx/src/os/unix/ngx_aio_write_chain.c index 7167896901b..b0c25085d1f 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_aio_write_chain.c +++ b/usr.sbin/nginx/src/os/unix/ngx_aio_write_chain.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_alloc.c b/usr.sbin/nginx/src/os/unix/ngx_alloc.c index c71a10254c6..5c2f7870256 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_alloc.c +++ b/usr.sbin/nginx/src/os/unix/ngx_alloc.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_alloc.h b/usr.sbin/nginx/src/os/unix/ngx_alloc.h index c7a31aa54b2..655db257f41 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_alloc.h +++ b/usr.sbin/nginx/src/os/unix/ngx_alloc.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_atomic.h b/usr.sbin/nginx/src/os/unix/ngx_atomic.h index 57826ffcfaf..104ac376a2c 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_atomic.h +++ b/usr.sbin/nginx/src/os/unix/ngx_atomic.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_channel.c b/usr.sbin/nginx/src/os/unix/ngx_channel.c index a0bdc2b8e96..29c69da4065 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_channel.c +++ b/usr.sbin/nginx/src/os/unix/ngx_channel.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_channel.h b/usr.sbin/nginx/src/os/unix/ngx_channel.h index 365d4394b34..d7a9f6b54c5 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_channel.h +++ b/usr.sbin/nginx/src/os/unix/ngx_channel.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_daemon.c b/usr.sbin/nginx/src/os/unix/ngx_daemon.c index 7255b7a7eba..f18860bbe2f 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_daemon.c +++ b/usr.sbin/nginx/src/os/unix/ngx_daemon.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_darwin.h b/usr.sbin/nginx/src/os/unix/ngx_darwin.h index 7fa60ff0c9f..b3aba906be7 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_darwin.h +++ b/usr.sbin/nginx/src/os/unix/ngx_darwin.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_darwin_config.h b/usr.sbin/nginx/src/os/unix/ngx_darwin_config.h index a3a14c493a4..a24e43c2002 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_darwin_config.h +++ b/usr.sbin/nginx/src/os/unix/ngx_darwin_config.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_darwin_init.c b/usr.sbin/nginx/src/os/unix/ngx_darwin_init.c index 7d291365707..5c542cda818 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_darwin_init.c +++ b/usr.sbin/nginx/src/os/unix/ngx_darwin_init.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_darwin_sendfile_chain.c b/usr.sbin/nginx/src/os/unix/ngx_darwin_sendfile_chain.c index 59d46534bdb..c869765491b 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_darwin_sendfile_chain.c +++ b/usr.sbin/nginx/src/os/unix/ngx_darwin_sendfile_chain.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_errno.c b/usr.sbin/nginx/src/os/unix/ngx_errno.c index faae4782932..75176c49a47 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_errno.c +++ b/usr.sbin/nginx/src/os/unix/ngx_errno.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_errno.h b/usr.sbin/nginx/src/os/unix/ngx_errno.h index 3d51f3cfce9..092d05a0b7c 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_errno.h +++ b/usr.sbin/nginx/src/os/unix/ngx_errno.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_file_aio_read.c b/usr.sbin/nginx/src/os/unix/ngx_file_aio_read.c index 49662365f90..0bb383de551 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_file_aio_read.c +++ b/usr.sbin/nginx/src/os/unix/ngx_file_aio_read.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -156,24 +157,15 @@ ngx_file_aio_result(ngx_file_t *file, ngx_event_aio_t *aio, ngx_event_t *ev) return NGX_ERROR; } - if (n != 0) { - if (n == NGX_EINPROGRESS) { - if (ev->ready) { - ev->ready = 0; - ngx_log_error(NGX_LOG_ALERT, file->log, n, - "aio_read(\"%V\") still in progress", - &file->name); - } - - return NGX_AGAIN; + if (n == NGX_EINPROGRESS) { + if (ev->ready) { + ev->ready = 0; + ngx_log_error(NGX_LOG_ALERT, file->log, n, + "aio_read(\"%V\") still in progress", + &file->name); } - aio->err = n; - ev->ready = 0; - - ngx_log_error(NGX_LOG_CRIT, file->log, n, - "aio_read(\"%V\") failed", &file->name); - return NGX_ERROR; + return NGX_AGAIN; } n = aio_return(&aio->aiocb); @@ -181,9 +173,9 @@ ngx_file_aio_result(ngx_file_t *file, ngx_event_aio_t *aio, ngx_event_t *ev) if (n == -1) { err = ngx_errno; aio->err = err; - ev->ready = 0; + ev->ready = 1; - ngx_log_error(NGX_LOG_ALERT, file->log, err, + ngx_log_error(NGX_LOG_CRIT, file->log, err, "aio_return(\"%V\") failed", &file->name); return NGX_ERROR; } diff --git a/usr.sbin/nginx/src/os/unix/ngx_files.c b/usr.sbin/nginx/src/os/unix/ngx_files.c index 196323727d7..ca5458104e8 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_files.c +++ b/usr.sbin/nginx/src/os/unix/ngx_files.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_files.h b/usr.sbin/nginx/src/os/unix/ngx_files.h index 7c7f1fcd3f0..abeb1570b7a 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_files.h +++ b/usr.sbin/nginx/src/os/unix/ngx_files.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_freebsd.h b/usr.sbin/nginx/src/os/unix/ngx_freebsd.h index 67fce3eb7ba..95bf57a702f 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_freebsd.h +++ b/usr.sbin/nginx/src/os/unix/ngx_freebsd.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_freebsd_config.h b/usr.sbin/nginx/src/os/unix/ngx_freebsd_config.h index 3169c277a81..f13793619b0 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_freebsd_config.h +++ b/usr.sbin/nginx/src/os/unix/ngx_freebsd_config.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_freebsd_init.c b/usr.sbin/nginx/src/os/unix/ngx_freebsd_init.c index 2fa222dacc6..02b3f2a7890 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_freebsd_init.c +++ b/usr.sbin/nginx/src/os/unix/ngx_freebsd_init.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_freebsd_rfork_thread.c b/usr.sbin/nginx/src/os/unix/ngx_freebsd_rfork_thread.c index 3c550fb8af4..9506b9de3ea 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_freebsd_rfork_thread.c +++ b/usr.sbin/nginx/src/os/unix/ngx_freebsd_rfork_thread.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_freebsd_rfork_thread.h b/usr.sbin/nginx/src/os/unix/ngx_freebsd_rfork_thread.h index 9826822b245..2c238f79ca6 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_freebsd_rfork_thread.h +++ b/usr.sbin/nginx/src/os/unix/ngx_freebsd_rfork_thread.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_freebsd_sendfile_chain.c b/usr.sbin/nginx/src/os/unix/ngx_freebsd_sendfile_chain.c index 039243e96bd..610697d77fb 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_freebsd_sendfile_chain.c +++ b/usr.sbin/nginx/src/os/unix/ngx_freebsd_sendfile_chain.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -246,9 +247,14 @@ ngx_freebsd_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit) } } - hdtr.headers = (struct iovec *) header.elts; + /* + * sendfile() does unneeded work if sf_hdtr's count is 0, + * but corresponding pointer is not NULL + */ + + hdtr.headers = header.nelts ? (struct iovec *) header.elts: NULL; hdtr.hdr_cnt = header.nelts; - hdtr.trailers = (struct iovec *) trailer.elts; + hdtr.trailers = trailer.nelts ? (struct iovec *) trailer.elts: NULL; hdtr.trl_cnt = trailer.nelts; /* diff --git a/usr.sbin/nginx/src/os/unix/ngx_gcc_atomic_amd64.h b/usr.sbin/nginx/src/os/unix/ngx_gcc_atomic_amd64.h index 1008a60177a..159a2974270 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_gcc_atomic_amd64.h +++ b/usr.sbin/nginx/src/os/unix/ngx_gcc_atomic_amd64.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_gcc_atomic_ppc.h b/usr.sbin/nginx/src/os/unix/ngx_gcc_atomic_ppc.h index e82e75574b3..45afc4b9eac 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_gcc_atomic_ppc.h +++ b/usr.sbin/nginx/src/os/unix/ngx_gcc_atomic_ppc.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_gcc_atomic_sparc64.h b/usr.sbin/nginx/src/os/unix/ngx_gcc_atomic_sparc64.h index e5a6254ec74..d26e1307cb5 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_gcc_atomic_sparc64.h +++ b/usr.sbin/nginx/src/os/unix/ngx_gcc_atomic_sparc64.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_gcc_atomic_x86.h b/usr.sbin/nginx/src/os/unix/ngx_gcc_atomic_x86.h index 1951d00e246..54e01aebf0b 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_gcc_atomic_x86.h +++ b/usr.sbin/nginx/src/os/unix/ngx_gcc_atomic_x86.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_linux.h b/usr.sbin/nginx/src/os/unix/ngx_linux.h index e871ba9b0e6..1b8bdac51a4 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_linux.h +++ b/usr.sbin/nginx/src/os/unix/ngx_linux.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_linux_aio_read.c b/usr.sbin/nginx/src/os/unix/ngx_linux_aio_read.c index d31c4a0641d..8273c13f960 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_linux_aio_read.c +++ b/usr.sbin/nginx/src/os/unix/ngx_linux_aio_read.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_linux_config.h b/usr.sbin/nginx/src/os/unix/ngx_linux_config.h index a2ef512374f..7cf4eac4179 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_linux_config.h +++ b/usr.sbin/nginx/src/os/unix/ngx_linux_config.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_linux_init.c b/usr.sbin/nginx/src/os/unix/ngx_linux_init.c index 277be95371b..b910380d7ce 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_linux_init.c +++ b/usr.sbin/nginx/src/os/unix/ngx_linux_init.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_linux_sendfile_chain.c b/usr.sbin/nginx/src/os/unix/ngx_linux_sendfile_chain.c index a2225d9c6d5..4f6fdf5876c 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_linux_sendfile_chain.c +++ b/usr.sbin/nginx/src/os/unix/ngx_linux_sendfile_chain.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_os.h b/usr.sbin/nginx/src/os/unix/ngx_os.h index f1d8e68248c..705bc5870c3 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_os.h +++ b/usr.sbin/nginx/src/os/unix/ngx_os.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_posix_config.h b/usr.sbin/nginx/src/os/unix/ngx_posix_config.h index aec8a0a3550..263ee69f889 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_posix_config.h +++ b/usr.sbin/nginx/src/os/unix/ngx_posix_config.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_posix_init.c b/usr.sbin/nginx/src/os/unix/ngx_posix_init.c index 2357ab31f46..02642bd7ccf 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_posix_init.c +++ b/usr.sbin/nginx/src/os/unix/ngx_posix_init.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_process.c b/usr.sbin/nginx/src/os/unix/ngx_process.c index 08069c4b698..f771b5aeda3 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_process.c +++ b/usr.sbin/nginx/src/os/unix/ngx_process.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_process.h b/usr.sbin/nginx/src/os/unix/ngx_process.h index aba0b516952..bd0252bd85f 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_process.h +++ b/usr.sbin/nginx/src/os/unix/ngx_process.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_process_cycle.c b/usr.sbin/nginx/src/os/unix/ngx_process_cycle.c index 5b5939d8278..cff6d8c6168 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_process_cycle.c +++ b/usr.sbin/nginx/src/os/unix/ngx_process_cycle.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ @@ -957,7 +958,10 @@ nochroot: ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "sched_setaffinity(0x%08Xl)", cpu_affinity); - if (sched_setaffinity(0, 32, (cpu_set_t *) &cpu_affinity) == -1) { + if (sched_setaffinity(0, sizeof(cpu_affinity), + (cpu_set_t *) &cpu_affinity) + == -1) + { ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, "sched_setaffinity(0x%08Xl) failed", cpu_affinity); } diff --git a/usr.sbin/nginx/src/os/unix/ngx_process_cycle.h b/usr.sbin/nginx/src/os/unix/ngx_process_cycle.h index 3bd292dfa0b..d7f83171e55 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_process_cycle.h +++ b/usr.sbin/nginx/src/os/unix/ngx_process_cycle.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_pthread_thread.c b/usr.sbin/nginx/src/os/unix/ngx_pthread_thread.c index 676c7609830..1cf31c3bc2b 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_pthread_thread.c +++ b/usr.sbin/nginx/src/os/unix/ngx_pthread_thread.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_readv_chain.c b/usr.sbin/nginx/src/os/unix/ngx_readv_chain.c index b65a0d7b85e..373c4027cb3 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_readv_chain.c +++ b/usr.sbin/nginx/src/os/unix/ngx_readv_chain.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_recv.c b/usr.sbin/nginx/src/os/unix/ngx_recv.c index 316e0516d14..6a4a0996624 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_recv.c +++ b/usr.sbin/nginx/src/os/unix/ngx_recv.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_send.c b/usr.sbin/nginx/src/os/unix/ngx_send.c index e0d69007738..80995ab3a50 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_send.c +++ b/usr.sbin/nginx/src/os/unix/ngx_send.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_setproctitle.c b/usr.sbin/nginx/src/os/unix/ngx_setproctitle.c index b814610b763..a61fe1b9427 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_setproctitle.c +++ b/usr.sbin/nginx/src/os/unix/ngx_setproctitle.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_setproctitle.h b/usr.sbin/nginx/src/os/unix/ngx_setproctitle.h index 09973e990b8..2323408c46e 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_setproctitle.h +++ b/usr.sbin/nginx/src/os/unix/ngx_setproctitle.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_shmem.c b/usr.sbin/nginx/src/os/unix/ngx_shmem.c index f7f831fdb96..3ec7cbf1fd3 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_shmem.c +++ b/usr.sbin/nginx/src/os/unix/ngx_shmem.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_shmem.h b/usr.sbin/nginx/src/os/unix/ngx_shmem.h index b5f6697010d..566a7d3300b 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_shmem.h +++ b/usr.sbin/nginx/src/os/unix/ngx_shmem.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_socket.c b/usr.sbin/nginx/src/os/unix/ngx_socket.c index 27ae48dc509..3978f655c04 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_socket.c +++ b/usr.sbin/nginx/src/os/unix/ngx_socket.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_socket.h b/usr.sbin/nginx/src/os/unix/ngx_socket.h index 9e6a859bb20..fcc51533568 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_socket.h +++ b/usr.sbin/nginx/src/os/unix/ngx_socket.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_solaris.h b/usr.sbin/nginx/src/os/unix/ngx_solaris.h index 44ce7967983..7b167d830ab 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_solaris.h +++ b/usr.sbin/nginx/src/os/unix/ngx_solaris.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_solaris_config.h b/usr.sbin/nginx/src/os/unix/ngx_solaris_config.h index 6b3d42eaae2..278bfd29556 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_solaris_config.h +++ b/usr.sbin/nginx/src/os/unix/ngx_solaris_config.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_solaris_init.c b/usr.sbin/nginx/src/os/unix/ngx_solaris_init.c index 57a859e6806..f2f3600dab1 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_solaris_init.c +++ b/usr.sbin/nginx/src/os/unix/ngx_solaris_init.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_solaris_sendfilev_chain.c b/usr.sbin/nginx/src/os/unix/ngx_solaris_sendfilev_chain.c index 3a9356cdbba..d68220dc32f 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_solaris_sendfilev_chain.c +++ b/usr.sbin/nginx/src/os/unix/ngx_solaris_sendfilev_chain.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_sunpro_amd64.il b/usr.sbin/nginx/src/os/unix/ngx_sunpro_amd64.il index c6519574d70..dc454b20b2f 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_sunpro_amd64.il +++ b/usr.sbin/nginx/src/os/unix/ngx_sunpro_amd64.il @@ -1,5 +1,6 @@ / / Copyright (C) Igor Sysoev +/ Copyright (C) Nginx, Inc. / / ngx_atomic_uint_t ngx_atomic_cmp_set(ngx_atomic_t *lock, diff --git a/usr.sbin/nginx/src/os/unix/ngx_sunpro_atomic_sparc64.h b/usr.sbin/nginx/src/os/unix/ngx_sunpro_atomic_sparc64.h index b12603009ee..5f280553c9e 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_sunpro_atomic_sparc64.h +++ b/usr.sbin/nginx/src/os/unix/ngx_sunpro_atomic_sparc64.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_sunpro_sparc64.il b/usr.sbin/nginx/src/os/unix/ngx_sunpro_sparc64.il index 2dd83204a26..bdeef612507 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_sunpro_sparc64.il +++ b/usr.sbin/nginx/src/os/unix/ngx_sunpro_sparc64.il @@ -1,5 +1,6 @@ / / Copyright (C) Igor Sysoev +/ Copyright (C) Nginx, Inc. / diff --git a/usr.sbin/nginx/src/os/unix/ngx_sunpro_x86.il b/usr.sbin/nginx/src/os/unix/ngx_sunpro_x86.il index e32ea8cc119..fd1cc00492e 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_sunpro_x86.il +++ b/usr.sbin/nginx/src/os/unix/ngx_sunpro_x86.il @@ -1,5 +1,6 @@ / / Copyright (C) Igor Sysoev +/ Copyright (C) Nginx, Inc. / / ngx_atomic_uint_t ngx_atomic_cmp_set(ngx_atomic_t *lock, diff --git a/usr.sbin/nginx/src/os/unix/ngx_thread.h b/usr.sbin/nginx/src/os/unix/ngx_thread.h index eec297a8cdc..49c5d5656a7 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_thread.h +++ b/usr.sbin/nginx/src/os/unix/ngx_thread.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_time.c b/usr.sbin/nginx/src/os/unix/ngx_time.c index 4ca8be67249..cc760b2eb01 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_time.c +++ b/usr.sbin/nginx/src/os/unix/ngx_time.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_time.h b/usr.sbin/nginx/src/os/unix/ngx_time.h index 5d9406cdebc..c128c9aa043 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_time.h +++ b/usr.sbin/nginx/src/os/unix/ngx_time.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_udp_recv.c b/usr.sbin/nginx/src/os/unix/ngx_udp_recv.c index fdcd7fa79ca..1c807a08bb2 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_udp_recv.c +++ b/usr.sbin/nginx/src/os/unix/ngx_udp_recv.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_user.c b/usr.sbin/nginx/src/os/unix/ngx_user.c index c46fb2bfd8d..cb452e62b11 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_user.c +++ b/usr.sbin/nginx/src/os/unix/ngx_user.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_user.h b/usr.sbin/nginx/src/os/unix/ngx_user.h index 68d1c6e5f05..6e82204f4d1 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_user.h +++ b/usr.sbin/nginx/src/os/unix/ngx_user.h @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/ngx_writev_chain.c b/usr.sbin/nginx/src/os/unix/ngx_writev_chain.c index 695cb49789a..579fdecc897 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_writev_chain.c +++ b/usr.sbin/nginx/src/os/unix/ngx_writev_chain.c @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ diff --git a/usr.sbin/nginx/src/os/unix/rfork_thread.S b/usr.sbin/nginx/src/os/unix/rfork_thread.S index 161007d6be3..e570349f93b 100644 --- a/usr.sbin/nginx/src/os/unix/rfork_thread.S +++ b/usr.sbin/nginx/src/os/unix/rfork_thread.S @@ -1,6 +1,7 @@ /* * Copyright (C) Igor Sysoev + * Copyright (C) Nginx, Inc. */ |
