[Groonga-commit] groonga/groonga at f80bcec [master] nginx: update to latest release

Back to archive index

Kentaro Hayashi null+****@clear*****
Wed Oct 26 17:22:59 JST 2016


Kentaro Hayashi	2016-10-26 17:22:59 +0900 (Wed, 26 Oct 2016)

  New Revision: f80bcec351bdad68e2c37c69a1d6c0db225eb034
  https://github.com/groonga/groonga/commit/f80bcec351bdad68e2c37c69a1d6c0db225eb034

  Message:
    nginx: update to latest release
    
      % ./update_nginx.sh 1.11.5

  Added files:
    vendor/nginx-1.11.5/src/stream/ngx_stream_ssl_preread_module.c
  Copied files:
    vendor/nginx-1.11.5/src/http/ngx_http_write_filter_module.c
      (from vendor/nginx-1.11.4/src/http/ngx_http_write_filter_module.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_udp_sendmsg_chain.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_writev_chain.c)
  Modified files:
    nginx_version
  Renamed files:
    vendor/nginx-1.11.5/auto/cc/acc
      (from vendor/nginx-1.11.4/auto/cc/acc)
    vendor/nginx-1.11.5/auto/cc/bcc
      (from vendor/nginx-1.11.4/auto/cc/bcc)
    vendor/nginx-1.11.5/auto/cc/ccc
      (from vendor/nginx-1.11.4/auto/cc/ccc)
    vendor/nginx-1.11.5/auto/cc/clang
      (from vendor/nginx-1.11.4/auto/cc/clang)
    vendor/nginx-1.11.5/auto/cc/conf
      (from vendor/nginx-1.11.4/auto/cc/conf)
    vendor/nginx-1.11.5/auto/cc/gcc
      (from vendor/nginx-1.11.4/auto/cc/gcc)
    vendor/nginx-1.11.5/auto/cc/icc
      (from vendor/nginx-1.11.4/auto/cc/icc)
    vendor/nginx-1.11.5/auto/cc/msvc
      (from vendor/nginx-1.11.4/auto/cc/msvc)
    vendor/nginx-1.11.5/auto/cc/name
      (from vendor/nginx-1.11.4/auto/cc/name)
    vendor/nginx-1.11.5/auto/cc/owc
      (from vendor/nginx-1.11.4/auto/cc/owc)
    vendor/nginx-1.11.5/auto/cc/sunc
      (from vendor/nginx-1.11.4/auto/cc/sunc)
    vendor/nginx-1.11.5/auto/configure
      (from vendor/nginx-1.11.4/auto/configure)
    vendor/nginx-1.11.5/auto/define
      (from vendor/nginx-1.11.4/auto/define)
    vendor/nginx-1.11.5/auto/endianness
      (from vendor/nginx-1.11.4/auto/endianness)
    vendor/nginx-1.11.5/auto/feature
      (from vendor/nginx-1.11.4/auto/feature)
    vendor/nginx-1.11.5/auto/have
      (from vendor/nginx-1.11.4/auto/have)
    vendor/nginx-1.11.5/auto/have_headers
      (from vendor/nginx-1.11.4/auto/have_headers)
    vendor/nginx-1.11.5/auto/headers
      (from vendor/nginx-1.11.4/auto/headers)
    vendor/nginx-1.11.5/auto/include
      (from vendor/nginx-1.11.4/auto/include)
    vendor/nginx-1.11.5/auto/init
      (from vendor/nginx-1.11.4/auto/init)
    vendor/nginx-1.11.5/auto/install
      (from vendor/nginx-1.11.4/auto/install)
    vendor/nginx-1.11.5/auto/lib/conf
      (from vendor/nginx-1.11.4/auto/lib/conf)
    vendor/nginx-1.11.5/auto/lib/geoip/conf
      (from vendor/nginx-1.11.4/auto/lib/geoip/conf)
    vendor/nginx-1.11.5/auto/lib/google-perftools/conf
      (from vendor/nginx-1.11.4/auto/lib/google-perftools/conf)
    vendor/nginx-1.11.5/auto/lib/libatomic/conf
      (from vendor/nginx-1.11.4/auto/lib/libatomic/conf)
    vendor/nginx-1.11.5/auto/lib/libatomic/make
      (from vendor/nginx-1.11.4/auto/lib/libatomic/make)
    vendor/nginx-1.11.5/auto/lib/libgd/conf
      (from vendor/nginx-1.11.4/auto/lib/libgd/conf)
    vendor/nginx-1.11.5/auto/lib/libxslt/conf
      (from vendor/nginx-1.11.4/auto/lib/libxslt/conf)
    vendor/nginx-1.11.5/auto/lib/make
      (from vendor/nginx-1.11.4/auto/lib/make)
    vendor/nginx-1.11.5/auto/lib/openssl/conf
      (from vendor/nginx-1.11.4/auto/lib/openssl/conf)
    vendor/nginx-1.11.5/auto/lib/openssl/make
      (from vendor/nginx-1.11.4/auto/lib/openssl/make)
    vendor/nginx-1.11.5/auto/lib/openssl/makefile.bcc
      (from vendor/nginx-1.11.4/auto/lib/openssl/makefile.bcc)
    vendor/nginx-1.11.5/auto/lib/openssl/makefile.msvc
      (from vendor/nginx-1.11.4/auto/lib/openssl/makefile.msvc)
    vendor/nginx-1.11.5/auto/lib/pcre/conf
      (from vendor/nginx-1.11.4/auto/lib/pcre/conf)
    vendor/nginx-1.11.5/auto/lib/pcre/make
      (from vendor/nginx-1.11.4/auto/lib/pcre/make)
    vendor/nginx-1.11.5/auto/lib/pcre/makefile.bcc
      (from vendor/nginx-1.11.4/auto/lib/pcre/makefile.bcc)
    vendor/nginx-1.11.5/auto/lib/pcre/makefile.msvc
      (from vendor/nginx-1.11.4/auto/lib/pcre/makefile.msvc)
    vendor/nginx-1.11.5/auto/lib/pcre/makefile.owc
      (from vendor/nginx-1.11.4/auto/lib/pcre/makefile.owc)
    vendor/nginx-1.11.5/auto/lib/perl/conf
      (from vendor/nginx-1.11.4/auto/lib/perl/conf)
    vendor/nginx-1.11.5/auto/lib/perl/make
      (from vendor/nginx-1.11.4/auto/lib/perl/make)
    vendor/nginx-1.11.5/auto/lib/zlib/conf
      (from vendor/nginx-1.11.4/auto/lib/zlib/conf)
    vendor/nginx-1.11.5/auto/lib/zlib/make
      (from vendor/nginx-1.11.4/auto/lib/zlib/make)
    vendor/nginx-1.11.5/auto/lib/zlib/makefile.bcc
      (from vendor/nginx-1.11.4/auto/lib/zlib/makefile.bcc)
    vendor/nginx-1.11.5/auto/lib/zlib/makefile.msvc
      (from vendor/nginx-1.11.4/auto/lib/zlib/makefile.msvc)
    vendor/nginx-1.11.5/auto/lib/zlib/makefile.owc
      (from vendor/nginx-1.11.4/auto/lib/zlib/makefile.owc)
    vendor/nginx-1.11.5/auto/make
      (from vendor/nginx-1.11.4/auto/make)
    vendor/nginx-1.11.5/auto/module
      (from vendor/nginx-1.11.4/auto/module)
    vendor/nginx-1.11.5/auto/modules
      (from vendor/nginx-1.11.4/auto/modules)
    vendor/nginx-1.11.5/auto/nohave
      (from vendor/nginx-1.11.4/auto/nohave)
    vendor/nginx-1.11.5/auto/options
      (from vendor/nginx-1.11.4/auto/options)
    vendor/nginx-1.11.5/auto/os/conf
      (from vendor/nginx-1.11.4/auto/os/conf)
    vendor/nginx-1.11.5/auto/os/darwin
      (from vendor/nginx-1.11.4/auto/os/darwin)
    vendor/nginx-1.11.5/auto/os/freebsd
      (from vendor/nginx-1.11.4/auto/os/freebsd)
    vendor/nginx-1.11.5/auto/os/linux
      (from vendor/nginx-1.11.4/auto/os/linux)
    vendor/nginx-1.11.5/auto/os/solaris
      (from vendor/nginx-1.11.4/auto/os/solaris)
    vendor/nginx-1.11.5/auto/os/win32
      (from vendor/nginx-1.11.4/auto/os/win32)
    vendor/nginx-1.11.5/auto/sources
      (from vendor/nginx-1.11.4/auto/sources)
    vendor/nginx-1.11.5/auto/stubs
      (from vendor/nginx-1.11.4/auto/stubs)
    vendor/nginx-1.11.5/auto/summary
      (from vendor/nginx-1.11.4/auto/summary)
    vendor/nginx-1.11.5/auto/threads
      (from vendor/nginx-1.11.4/auto/threads)
    vendor/nginx-1.11.5/auto/types/sizeof
      (from vendor/nginx-1.11.4/auto/types/sizeof)
    vendor/nginx-1.11.5/auto/types/typedef
      (from vendor/nginx-1.11.4/auto/types/typedef)
    vendor/nginx-1.11.5/auto/types/uintptr_t
      (from vendor/nginx-1.11.4/auto/types/uintptr_t)
    vendor/nginx-1.11.5/auto/types/value
      (from vendor/nginx-1.11.4/auto/types/value)
    vendor/nginx-1.11.5/auto/unix
      (from vendor/nginx-1.11.4/auto/unix)
    vendor/nginx-1.11.5/conf/fastcgi.conf
      (from vendor/nginx-1.11.4/conf/fastcgi.conf)
    vendor/nginx-1.11.5/conf/fastcgi_params
      (from vendor/nginx-1.11.4/conf/fastcgi_params)
    vendor/nginx-1.11.5/conf/koi-utf
      (from vendor/nginx-1.11.4/conf/koi-utf)
    vendor/nginx-1.11.5/conf/koi-win
      (from vendor/nginx-1.11.4/conf/koi-win)
    vendor/nginx-1.11.5/conf/mime.types
      (from vendor/nginx-1.11.4/conf/mime.types)
    vendor/nginx-1.11.5/conf/nginx.conf
      (from vendor/nginx-1.11.4/conf/nginx.conf)
    vendor/nginx-1.11.5/conf/scgi_params
      (from vendor/nginx-1.11.4/conf/scgi_params)
    vendor/nginx-1.11.5/conf/uwsgi_params
      (from vendor/nginx-1.11.4/conf/uwsgi_params)
    vendor/nginx-1.11.5/conf/win-utf
      (from vendor/nginx-1.11.4/conf/win-utf)
    vendor/nginx-1.11.5/contrib/README
      (from vendor/nginx-1.11.4/contrib/README)
    vendor/nginx-1.11.5/contrib/geo2nginx.pl
      (from vendor/nginx-1.11.4/contrib/geo2nginx.pl)
    vendor/nginx-1.11.5/contrib/unicode2nginx/koi-utf
      (from vendor/nginx-1.11.4/contrib/unicode2nginx/koi-utf)
    vendor/nginx-1.11.5/contrib/unicode2nginx/unicode-to-nginx.pl
      (from vendor/nginx-1.11.4/contrib/unicode2nginx/unicode-to-nginx.pl)
    vendor/nginx-1.11.5/contrib/unicode2nginx/win-utf
      (from vendor/nginx-1.11.4/contrib/unicode2nginx/win-utf)
    vendor/nginx-1.11.5/contrib/vim/ftdetect/nginx.vim
      (from vendor/nginx-1.11.4/contrib/vim/ftdetect/nginx.vim)
    vendor/nginx-1.11.5/contrib/vim/indent/nginx.vim
      (from vendor/nginx-1.11.4/contrib/vim/indent/nginx.vim)
    vendor/nginx-1.11.5/contrib/vim/syntax/nginx.vim
      (from vendor/nginx-1.11.4/contrib/vim/syntax/nginx.vim)
    vendor/nginx-1.11.5/docs/GNUmakefile
      (from vendor/nginx-1.11.4/docs/GNUmakefile)
    vendor/nginx-1.11.5/docs/dtd/change_log_conf.dtd
      (from vendor/nginx-1.11.4/docs/dtd/change_log_conf.dtd)
    vendor/nginx-1.11.5/docs/dtd/changes.dtd
      (from vendor/nginx-1.11.4/docs/dtd/changes.dtd)
    vendor/nginx-1.11.5/docs/html/50x.html
      (from vendor/nginx-1.11.4/docs/html/50x.html)
    vendor/nginx-1.11.5/docs/html/index.html
      (from vendor/nginx-1.11.4/docs/html/index.html)
    vendor/nginx-1.11.5/docs/man/nginx.8
      (from vendor/nginx-1.11.4/docs/man/nginx.8)
    vendor/nginx-1.11.5/docs/text/LICENSE
      (from vendor/nginx-1.11.4/docs/text/LICENSE)
    vendor/nginx-1.11.5/docs/text/README
      (from vendor/nginx-1.11.4/docs/text/README)
    vendor/nginx-1.11.5/docs/xml/change_log_conf.xml
      (from vendor/nginx-1.11.4/docs/xml/change_log_conf.xml)
    vendor/nginx-1.11.5/docs/xml/nginx/changes.xml
      (from vendor/nginx-1.11.4/docs/xml/nginx/changes.xml)
    vendor/nginx-1.11.5/docs/xsls/changes.xsls
      (from vendor/nginx-1.11.4/docs/xsls/changes.xsls)
    vendor/nginx-1.11.5/docs/xslt/changes.xslt
      (from vendor/nginx-1.11.4/docs/xslt/changes.xslt)
    vendor/nginx-1.11.5/misc/GNUmakefile
      (from vendor/nginx-1.11.4/misc/GNUmakefile)
    vendor/nginx-1.11.5/misc/README
      (from vendor/nginx-1.11.4/misc/README)
    vendor/nginx-1.11.5/src/core/nginx.c
      (from vendor/nginx-1.11.4/src/core/nginx.c)
    vendor/nginx-1.11.5/src/core/nginx.h
      (from vendor/nginx-1.11.4/src/core/nginx.h)
    vendor/nginx-1.11.5/src/core/ngx_array.c
      (from vendor/nginx-1.11.4/src/core/ngx_array.c)
    vendor/nginx-1.11.5/src/core/ngx_array.h
      (from vendor/nginx-1.11.4/src/core/ngx_array.h)
    vendor/nginx-1.11.5/src/core/ngx_buf.c
      (from vendor/nginx-1.11.4/src/core/ngx_buf.c)
    vendor/nginx-1.11.5/src/core/ngx_buf.h
      (from vendor/nginx-1.11.4/src/core/ngx_buf.h)
    vendor/nginx-1.11.5/src/core/ngx_conf_file.c
      (from vendor/nginx-1.11.4/src/core/ngx_conf_file.c)
    vendor/nginx-1.11.5/src/core/ngx_conf_file.h
      (from vendor/nginx-1.11.4/src/core/ngx_conf_file.h)
    vendor/nginx-1.11.5/src/core/ngx_config.h
      (from vendor/nginx-1.11.4/src/core/ngx_config.h)
    vendor/nginx-1.11.5/src/core/ngx_connection.c
      (from vendor/nginx-1.11.4/src/core/ngx_connection.c)
    vendor/nginx-1.11.5/src/core/ngx_connection.h
      (from vendor/nginx-1.11.4/src/core/ngx_connection.h)
    vendor/nginx-1.11.5/src/core/ngx_core.h
      (from vendor/nginx-1.11.4/src/core/ngx_core.h)
    vendor/nginx-1.11.5/src/core/ngx_cpuinfo.c
      (from vendor/nginx-1.11.4/src/core/ngx_cpuinfo.c)
    vendor/nginx-1.11.5/src/core/ngx_crc.h
      (from vendor/nginx-1.11.4/src/core/ngx_crc.h)
    vendor/nginx-1.11.5/src/core/ngx_crc32.c
      (from vendor/nginx-1.11.4/src/core/ngx_crc32.c)
    vendor/nginx-1.11.5/src/core/ngx_crc32.h
      (from vendor/nginx-1.11.4/src/core/ngx_crc32.h)
    vendor/nginx-1.11.5/src/core/ngx_crypt.c
      (from vendor/nginx-1.11.4/src/core/ngx_crypt.c)
    vendor/nginx-1.11.5/src/core/ngx_crypt.h
      (from vendor/nginx-1.11.4/src/core/ngx_crypt.h)
    vendor/nginx-1.11.5/src/core/ngx_cycle.c
      (from vendor/nginx-1.11.4/src/core/ngx_cycle.c)
    vendor/nginx-1.11.5/src/core/ngx_cycle.h
      (from vendor/nginx-1.11.4/src/core/ngx_cycle.h)
    vendor/nginx-1.11.5/src/core/ngx_file.c
      (from vendor/nginx-1.11.4/src/core/ngx_file.c)
    vendor/nginx-1.11.5/src/core/ngx_file.h
      (from vendor/nginx-1.11.4/src/core/ngx_file.h)
    vendor/nginx-1.11.5/src/core/ngx_hash.c
      (from vendor/nginx-1.11.4/src/core/ngx_hash.c)
    vendor/nginx-1.11.5/src/core/ngx_hash.h
      (from vendor/nginx-1.11.4/src/core/ngx_hash.h)
    vendor/nginx-1.11.5/src/core/ngx_inet.c
      (from vendor/nginx-1.11.4/src/core/ngx_inet.c)
    vendor/nginx-1.11.5/src/core/ngx_inet.h
      (from vendor/nginx-1.11.4/src/core/ngx_inet.h)
    vendor/nginx-1.11.5/src/core/ngx_list.c
      (from vendor/nginx-1.11.4/src/core/ngx_list.c)
    vendor/nginx-1.11.5/src/core/ngx_list.h
      (from vendor/nginx-1.11.4/src/core/ngx_list.h)
    vendor/nginx-1.11.5/src/core/ngx_log.c
      (from vendor/nginx-1.11.4/src/core/ngx_log.c)
    vendor/nginx-1.11.5/src/core/ngx_log.h
      (from vendor/nginx-1.11.4/src/core/ngx_log.h)
    vendor/nginx-1.11.5/src/core/ngx_md5.c
      (from vendor/nginx-1.11.4/src/core/ngx_md5.c)
    vendor/nginx-1.11.5/src/core/ngx_md5.h
      (from vendor/nginx-1.11.4/src/core/ngx_md5.h)
    vendor/nginx-1.11.5/src/core/ngx_module.c
      (from vendor/nginx-1.11.4/src/core/ngx_module.c)
    vendor/nginx-1.11.5/src/core/ngx_module.h
      (from vendor/nginx-1.11.4/src/core/ngx_module.h)
    vendor/nginx-1.11.5/src/core/ngx_murmurhash.c
      (from vendor/nginx-1.11.4/src/core/ngx_murmurhash.c)
    vendor/nginx-1.11.5/src/core/ngx_murmurhash.h
      (from vendor/nginx-1.11.4/src/core/ngx_murmurhash.h)
    vendor/nginx-1.11.5/src/core/ngx_open_file_cache.c
      (from vendor/nginx-1.11.4/src/core/ngx_open_file_cache.c)
    vendor/nginx-1.11.5/src/core/ngx_open_file_cache.h
      (from vendor/nginx-1.11.4/src/core/ngx_open_file_cache.h)
    vendor/nginx-1.11.5/src/core/ngx_output_chain.c
      (from vendor/nginx-1.11.4/src/core/ngx_output_chain.c)
    vendor/nginx-1.11.5/src/core/ngx_palloc.c
      (from vendor/nginx-1.11.4/src/core/ngx_palloc.c)
    vendor/nginx-1.11.5/src/core/ngx_palloc.h
      (from vendor/nginx-1.11.4/src/core/ngx_palloc.h)
    vendor/nginx-1.11.5/src/core/ngx_parse.c
      (from vendor/nginx-1.11.4/src/core/ngx_parse.c)
    vendor/nginx-1.11.5/src/core/ngx_parse.h
      (from vendor/nginx-1.11.4/src/core/ngx_parse.h)
    vendor/nginx-1.11.5/src/core/ngx_parse_time.c
      (from vendor/nginx-1.11.4/src/core/ngx_parse_time.c)
    vendor/nginx-1.11.5/src/core/ngx_parse_time.h
      (from vendor/nginx-1.11.4/src/core/ngx_parse_time.h)
    vendor/nginx-1.11.5/src/core/ngx_proxy_protocol.c
      (from vendor/nginx-1.11.4/src/core/ngx_proxy_protocol.c)
    vendor/nginx-1.11.5/src/core/ngx_proxy_protocol.h
      (from vendor/nginx-1.11.4/src/core/ngx_proxy_protocol.h)
    vendor/nginx-1.11.5/src/core/ngx_queue.c
      (from vendor/nginx-1.11.4/src/core/ngx_queue.c)
    vendor/nginx-1.11.5/src/core/ngx_queue.h
      (from vendor/nginx-1.11.4/src/core/ngx_queue.h)
    vendor/nginx-1.11.5/src/core/ngx_radix_tree.c
      (from vendor/nginx-1.11.4/src/core/ngx_radix_tree.c)
    vendor/nginx-1.11.5/src/core/ngx_radix_tree.h
      (from vendor/nginx-1.11.4/src/core/ngx_radix_tree.h)
    vendor/nginx-1.11.5/src/core/ngx_rbtree.c
      (from vendor/nginx-1.11.4/src/core/ngx_rbtree.c)
    vendor/nginx-1.11.5/src/core/ngx_rbtree.h
      (from vendor/nginx-1.11.4/src/core/ngx_rbtree.h)
    vendor/nginx-1.11.5/src/core/ngx_regex.c
      (from vendor/nginx-1.11.4/src/core/ngx_regex.c)
    vendor/nginx-1.11.5/src/core/ngx_regex.h
      (from vendor/nginx-1.11.4/src/core/ngx_regex.h)
    vendor/nginx-1.11.5/src/core/ngx_resolver.c
      (from vendor/nginx-1.11.4/src/core/ngx_resolver.c)
    vendor/nginx-1.11.5/src/core/ngx_resolver.h
      (from vendor/nginx-1.11.4/src/core/ngx_resolver.h)
    vendor/nginx-1.11.5/src/core/ngx_rwlock.c
      (from vendor/nginx-1.11.4/src/core/ngx_rwlock.c)
    vendor/nginx-1.11.5/src/core/ngx_rwlock.h
      (from vendor/nginx-1.11.4/src/core/ngx_rwlock.h)
    vendor/nginx-1.11.5/src/core/ngx_sha1.c
      (from vendor/nginx-1.11.4/src/core/ngx_sha1.c)
    vendor/nginx-1.11.5/src/core/ngx_sha1.h
      (from vendor/nginx-1.11.4/src/core/ngx_sha1.h)
    vendor/nginx-1.11.5/src/core/ngx_shmtx.c
      (from vendor/nginx-1.11.4/src/core/ngx_shmtx.c)
    vendor/nginx-1.11.5/src/core/ngx_shmtx.h
      (from vendor/nginx-1.11.4/src/core/ngx_shmtx.h)
    vendor/nginx-1.11.5/src/core/ngx_slab.c
      (from vendor/nginx-1.11.4/src/core/ngx_slab.c)
    vendor/nginx-1.11.5/src/core/ngx_slab.h
      (from vendor/nginx-1.11.4/src/core/ngx_slab.h)
    vendor/nginx-1.11.5/src/core/ngx_spinlock.c
      (from vendor/nginx-1.11.4/src/core/ngx_spinlock.c)
    vendor/nginx-1.11.5/src/core/ngx_string.c
      (from vendor/nginx-1.11.4/src/core/ngx_string.c)
    vendor/nginx-1.11.5/src/core/ngx_string.h
      (from vendor/nginx-1.11.4/src/core/ngx_string.h)
    vendor/nginx-1.11.5/src/core/ngx_syslog.c
      (from vendor/nginx-1.11.4/src/core/ngx_syslog.c)
    vendor/nginx-1.11.5/src/core/ngx_syslog.h
      (from vendor/nginx-1.11.4/src/core/ngx_syslog.h)
    vendor/nginx-1.11.5/src/core/ngx_thread_pool.c
      (from vendor/nginx-1.11.4/src/core/ngx_thread_pool.c)
    vendor/nginx-1.11.5/src/core/ngx_thread_pool.h
      (from vendor/nginx-1.11.4/src/core/ngx_thread_pool.h)
    vendor/nginx-1.11.5/src/core/ngx_times.c
      (from vendor/nginx-1.11.4/src/core/ngx_times.c)
    vendor/nginx-1.11.5/src/core/ngx_times.h
      (from vendor/nginx-1.11.4/src/core/ngx_times.h)
    vendor/nginx-1.11.5/src/event/modules/ngx_devpoll_module.c
      (from vendor/nginx-1.11.4/src/event/modules/ngx_devpoll_module.c)
    vendor/nginx-1.11.5/src/event/modules/ngx_epoll_module.c
      (from vendor/nginx-1.11.4/src/event/modules/ngx_epoll_module.c)
    vendor/nginx-1.11.5/src/event/modules/ngx_eventport_module.c
      (from vendor/nginx-1.11.4/src/event/modules/ngx_eventport_module.c)
    vendor/nginx-1.11.5/src/event/modules/ngx_iocp_module.c
      (from vendor/nginx-1.11.4/src/event/modules/ngx_iocp_module.c)
    vendor/nginx-1.11.5/src/event/modules/ngx_iocp_module.h
      (from vendor/nginx-1.11.4/src/event/modules/ngx_iocp_module.h)
    vendor/nginx-1.11.5/src/event/modules/ngx_kqueue_module.c
      (from vendor/nginx-1.11.4/src/event/modules/ngx_kqueue_module.c)
    vendor/nginx-1.11.5/src/event/modules/ngx_poll_module.c
      (from vendor/nginx-1.11.4/src/event/modules/ngx_poll_module.c)
    vendor/nginx-1.11.5/src/event/modules/ngx_select_module.c
      (from vendor/nginx-1.11.4/src/event/modules/ngx_select_module.c)
    vendor/nginx-1.11.5/src/event/modules/ngx_win32_select_module.c
      (from vendor/nginx-1.11.4/src/event/modules/ngx_win32_select_module.c)
    vendor/nginx-1.11.5/src/event/ngx_event.c
      (from vendor/nginx-1.11.4/src/event/ngx_event.c)
    vendor/nginx-1.11.5/src/event/ngx_event.h
      (from vendor/nginx-1.11.4/src/event/ngx_event.h)
    vendor/nginx-1.11.5/src/event/ngx_event_accept.c
      (from vendor/nginx-1.11.4/src/event/ngx_event_accept.c)
    vendor/nginx-1.11.5/src/event/ngx_event_acceptex.c
      (from vendor/nginx-1.11.4/src/event/ngx_event_acceptex.c)
    vendor/nginx-1.11.5/src/event/ngx_event_connect.c
      (from vendor/nginx-1.11.4/src/event/ngx_event_connect.c)
    vendor/nginx-1.11.5/src/event/ngx_event_connect.h
      (from vendor/nginx-1.11.4/src/event/ngx_event_connect.h)
    vendor/nginx-1.11.5/src/event/ngx_event_connectex.c
      (from vendor/nginx-1.11.4/src/event/ngx_event_connectex.c)
    vendor/nginx-1.11.5/src/event/ngx_event_openssl.c
      (from vendor/nginx-1.11.4/src/event/ngx_event_openssl.c)
    vendor/nginx-1.11.5/src/event/ngx_event_openssl.h
      (from vendor/nginx-1.11.4/src/event/ngx_event_openssl.h)
    vendor/nginx-1.11.5/src/event/ngx_event_openssl_stapling.c
      (from vendor/nginx-1.11.4/src/event/ngx_event_openssl_stapling.c)
    vendor/nginx-1.11.5/src/event/ngx_event_pipe.c
      (from vendor/nginx-1.11.4/src/event/ngx_event_pipe.c)
    vendor/nginx-1.11.5/src/event/ngx_event_pipe.h
      (from vendor/nginx-1.11.4/src/event/ngx_event_pipe.h)
    vendor/nginx-1.11.5/src/event/ngx_event_posted.c
      (from vendor/nginx-1.11.4/src/event/ngx_event_posted.c)
    vendor/nginx-1.11.5/src/event/ngx_event_posted.h
      (from vendor/nginx-1.11.4/src/event/ngx_event_posted.h)
    vendor/nginx-1.11.5/src/event/ngx_event_timer.c
      (from vendor/nginx-1.11.4/src/event/ngx_event_timer.c)
    vendor/nginx-1.11.5/src/event/ngx_event_timer.h
      (from vendor/nginx-1.11.4/src/event/ngx_event_timer.h)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_access_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_access_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_addition_filter_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_addition_filter_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_auth_basic_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_auth_basic_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_auth_request_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_auth_request_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_autoindex_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_autoindex_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_browser_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_browser_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_charset_filter_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_charset_filter_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_chunked_filter_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_chunked_filter_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_dav_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_dav_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_degradation_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_degradation_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_empty_gif_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_empty_gif_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_fastcgi_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_fastcgi_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_flv_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_flv_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_geo_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_geo_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_geoip_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_geoip_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_gunzip_filter_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_gunzip_filter_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_gzip_filter_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_gzip_filter_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_gzip_static_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_gzip_static_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_headers_filter_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_headers_filter_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_image_filter_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_image_filter_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_index_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_index_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_limit_conn_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_limit_conn_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_limit_req_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_limit_req_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_log_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_log_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_map_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_map_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_memcached_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_memcached_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_mp4_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_mp4_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_not_modified_filter_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_not_modified_filter_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_proxy_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_proxy_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_random_index_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_random_index_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_range_filter_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_range_filter_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_realip_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_realip_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_referer_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_referer_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_rewrite_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_rewrite_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_scgi_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_scgi_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_secure_link_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_secure_link_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_slice_filter_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_slice_filter_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_split_clients_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_split_clients_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_ssi_filter_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_ssi_filter_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_ssi_filter_module.h
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_ssi_filter_module.h)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_ssl_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_ssl_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_ssl_module.h
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_ssl_module.h)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_static_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_static_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_stub_status_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_stub_status_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_sub_filter_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_sub_filter_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_upstream_hash_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_upstream_hash_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_upstream_ip_hash_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_upstream_ip_hash_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_upstream_keepalive_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_upstream_keepalive_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_upstream_least_conn_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_upstream_least_conn_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_upstream_zone_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_upstream_zone_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_userid_filter_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_userid_filter_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_uwsgi_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_uwsgi_module.c)
    vendor/nginx-1.11.5/src/http/modules/ngx_http_xslt_filter_module.c
      (from vendor/nginx-1.11.4/src/http/modules/ngx_http_xslt_filter_module.c)
    vendor/nginx-1.11.5/src/http/modules/perl/Makefile.PL
      (from vendor/nginx-1.11.4/src/http/modules/perl/Makefile.PL)
    vendor/nginx-1.11.5/src/http/modules/perl/nginx.pm
      (from vendor/nginx-1.11.4/src/http/modules/perl/nginx.pm)
    vendor/nginx-1.11.5/src/http/modules/perl/nginx.xs
      (from vendor/nginx-1.11.4/src/http/modules/perl/nginx.xs)
    vendor/nginx-1.11.5/src/http/modules/perl/ngx_http_perl_module.c
      (from vendor/nginx-1.11.4/src/http/modules/perl/ngx_http_perl_module.c)
    vendor/nginx-1.11.5/src/http/modules/perl/ngx_http_perl_module.h
      (from vendor/nginx-1.11.4/src/http/modules/perl/ngx_http_perl_module.h)
    vendor/nginx-1.11.5/src/http/modules/perl/typemap
      (from vendor/nginx-1.11.4/src/http/modules/perl/typemap)
    vendor/nginx-1.11.5/src/http/ngx_http.c
      (from vendor/nginx-1.11.4/src/http/ngx_http.c)
    vendor/nginx-1.11.5/src/http/ngx_http.h
      (from vendor/nginx-1.11.4/src/http/ngx_http.h)
    vendor/nginx-1.11.5/src/http/ngx_http_cache.h
      (from vendor/nginx-1.11.4/src/http/ngx_http_cache.h)
    vendor/nginx-1.11.5/src/http/ngx_http_config.h
      (from vendor/nginx-1.11.4/src/http/ngx_http_config.h)
    vendor/nginx-1.11.5/src/http/ngx_http_copy_filter_module.c
      (from vendor/nginx-1.11.4/src/http/ngx_http_copy_filter_module.c)
    vendor/nginx-1.11.5/src/http/ngx_http_core_module.c
      (from vendor/nginx-1.11.4/src/http/ngx_http_core_module.c)
    vendor/nginx-1.11.5/src/http/ngx_http_core_module.h
      (from vendor/nginx-1.11.4/src/http/ngx_http_core_module.h)
    vendor/nginx-1.11.5/src/http/ngx_http_file_cache.c
      (from vendor/nginx-1.11.4/src/http/ngx_http_file_cache.c)
    vendor/nginx-1.11.5/src/http/ngx_http_header_filter_module.c
      (from vendor/nginx-1.11.4/src/http/ngx_http_header_filter_module.c)
    vendor/nginx-1.11.5/src/http/ngx_http_parse.c
      (from vendor/nginx-1.11.4/src/http/ngx_http_parse.c)
    vendor/nginx-1.11.5/src/http/ngx_http_postpone_filter_module.c
      (from vendor/nginx-1.11.4/src/http/ngx_http_postpone_filter_module.c)
    vendor/nginx-1.11.5/src/http/ngx_http_request.c
      (from vendor/nginx-1.11.4/src/http/ngx_http_request.c)
    vendor/nginx-1.11.5/src/http/ngx_http_request.h
      (from vendor/nginx-1.11.4/src/http/ngx_http_request.h)
    vendor/nginx-1.11.5/src/http/ngx_http_request_body.c
      (from vendor/nginx-1.11.4/src/http/ngx_http_request_body.c)
    vendor/nginx-1.11.5/src/http/ngx_http_script.c
      (from vendor/nginx-1.11.4/src/http/ngx_http_script.c)
    vendor/nginx-1.11.5/src/http/ngx_http_script.h
      (from vendor/nginx-1.11.4/src/http/ngx_http_script.h)
    vendor/nginx-1.11.5/src/http/ngx_http_special_response.c
      (from vendor/nginx-1.11.4/src/http/ngx_http_special_response.c)
    vendor/nginx-1.11.5/src/http/ngx_http_upstream.c
      (from vendor/nginx-1.11.4/src/http/ngx_http_upstream.c)
    vendor/nginx-1.11.5/src/http/ngx_http_upstream.h
      (from vendor/nginx-1.11.4/src/http/ngx_http_upstream.h)
    vendor/nginx-1.11.5/src/http/ngx_http_upstream_round_robin.c
      (from vendor/nginx-1.11.4/src/http/ngx_http_upstream_round_robin.c)
    vendor/nginx-1.11.5/src/http/ngx_http_upstream_round_robin.h
      (from vendor/nginx-1.11.4/src/http/ngx_http_upstream_round_robin.h)
    vendor/nginx-1.11.5/src/http/ngx_http_variables.c
      (from vendor/nginx-1.11.4/src/http/ngx_http_variables.c)
    vendor/nginx-1.11.5/src/http/ngx_http_variables.h
      (from vendor/nginx-1.11.4/src/http/ngx_http_variables.h)
    vendor/nginx-1.11.5/src/http/v2/ngx_http_v2.c
      (from vendor/nginx-1.11.4/src/http/v2/ngx_http_v2.c)
    vendor/nginx-1.11.5/src/http/v2/ngx_http_v2.h
      (from vendor/nginx-1.11.4/src/http/v2/ngx_http_v2.h)
    vendor/nginx-1.11.5/src/http/v2/ngx_http_v2_filter_module.c
      (from vendor/nginx-1.11.4/src/http/v2/ngx_http_v2_filter_module.c)
    vendor/nginx-1.11.5/src/http/v2/ngx_http_v2_huff_decode.c
      (from vendor/nginx-1.11.4/src/http/v2/ngx_http_v2_huff_decode.c)
    vendor/nginx-1.11.5/src/http/v2/ngx_http_v2_huff_encode.c
      (from vendor/nginx-1.11.4/src/http/v2/ngx_http_v2_huff_encode.c)
    vendor/nginx-1.11.5/src/http/v2/ngx_http_v2_module.c
      (from vendor/nginx-1.11.4/src/http/v2/ngx_http_v2_module.c)
    vendor/nginx-1.11.5/src/http/v2/ngx_http_v2_module.h
      (from vendor/nginx-1.11.4/src/http/v2/ngx_http_v2_module.h)
    vendor/nginx-1.11.5/src/http/v2/ngx_http_v2_table.c
      (from vendor/nginx-1.11.4/src/http/v2/ngx_http_v2_table.c)
    vendor/nginx-1.11.5/src/mail/ngx_mail.c
      (from vendor/nginx-1.11.4/src/mail/ngx_mail.c)
    vendor/nginx-1.11.5/src/mail/ngx_mail.h
      (from vendor/nginx-1.11.4/src/mail/ngx_mail.h)
    vendor/nginx-1.11.5/src/mail/ngx_mail_auth_http_module.c
      (from vendor/nginx-1.11.4/src/mail/ngx_mail_auth_http_module.c)
    vendor/nginx-1.11.5/src/mail/ngx_mail_core_module.c
      (from vendor/nginx-1.11.4/src/mail/ngx_mail_core_module.c)
    vendor/nginx-1.11.5/src/mail/ngx_mail_handler.c
      (from vendor/nginx-1.11.4/src/mail/ngx_mail_handler.c)
    vendor/nginx-1.11.5/src/mail/ngx_mail_imap_handler.c
      (from vendor/nginx-1.11.4/src/mail/ngx_mail_imap_handler.c)
    vendor/nginx-1.11.5/src/mail/ngx_mail_imap_module.c
      (from vendor/nginx-1.11.4/src/mail/ngx_mail_imap_module.c)
    vendor/nginx-1.11.5/src/mail/ngx_mail_imap_module.h
      (from vendor/nginx-1.11.4/src/mail/ngx_mail_imap_module.h)
    vendor/nginx-1.11.5/src/mail/ngx_mail_parse.c
      (from vendor/nginx-1.11.4/src/mail/ngx_mail_parse.c)
    vendor/nginx-1.11.5/src/mail/ngx_mail_pop3_handler.c
      (from vendor/nginx-1.11.4/src/mail/ngx_mail_pop3_handler.c)
    vendor/nginx-1.11.5/src/mail/ngx_mail_pop3_module.c
      (from vendor/nginx-1.11.4/src/mail/ngx_mail_pop3_module.c)
    vendor/nginx-1.11.5/src/mail/ngx_mail_pop3_module.h
      (from vendor/nginx-1.11.4/src/mail/ngx_mail_pop3_module.h)
    vendor/nginx-1.11.5/src/mail/ngx_mail_proxy_module.c
      (from vendor/nginx-1.11.4/src/mail/ngx_mail_proxy_module.c)
    vendor/nginx-1.11.5/src/mail/ngx_mail_smtp_handler.c
      (from vendor/nginx-1.11.4/src/mail/ngx_mail_smtp_handler.c)
    vendor/nginx-1.11.5/src/mail/ngx_mail_smtp_module.c
      (from vendor/nginx-1.11.4/src/mail/ngx_mail_smtp_module.c)
    vendor/nginx-1.11.5/src/mail/ngx_mail_smtp_module.h
      (from vendor/nginx-1.11.4/src/mail/ngx_mail_smtp_module.h)
    vendor/nginx-1.11.5/src/mail/ngx_mail_ssl_module.c
      (from vendor/nginx-1.11.4/src/mail/ngx_mail_ssl_module.c)
    vendor/nginx-1.11.5/src/mail/ngx_mail_ssl_module.h
      (from vendor/nginx-1.11.4/src/mail/ngx_mail_ssl_module.h)
    vendor/nginx-1.11.5/src/misc/ngx_cpp_test_module.cpp
      (from vendor/nginx-1.11.4/src/misc/ngx_cpp_test_module.cpp)
    vendor/nginx-1.11.5/src/misc/ngx_google_perftools_module.c
      (from vendor/nginx-1.11.4/src/misc/ngx_google_perftools_module.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_alloc.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_alloc.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_alloc.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_alloc.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_atomic.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_atomic.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_channel.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_channel.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_channel.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_channel.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_daemon.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_daemon.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_darwin.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_darwin.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_darwin_config.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_darwin_config.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_darwin_init.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_darwin_init.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_darwin_sendfile_chain.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_darwin_sendfile_chain.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_dlopen.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_dlopen.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_dlopen.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_dlopen.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_errno.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_errno.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_errno.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_errno.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_file_aio_read.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_file_aio_read.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_files.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_files.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_files.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_files.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_freebsd.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_freebsd.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_freebsd_config.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_freebsd_config.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_freebsd_init.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_freebsd_init.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_freebsd_sendfile_chain.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_freebsd_sendfile_chain.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_gcc_atomic_amd64.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_gcc_atomic_amd64.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_gcc_atomic_ppc.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_gcc_atomic_ppc.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_gcc_atomic_sparc64.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_gcc_atomic_sparc64.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_gcc_atomic_x86.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_gcc_atomic_x86.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_linux.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_linux.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_linux_aio_read.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_linux_aio_read.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_linux_config.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_linux_config.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_linux_init.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_linux_init.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_linux_sendfile_chain.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_linux_sendfile_chain.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_os.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_os.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_posix_config.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_posix_config.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_posix_init.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_posix_init.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_process.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_process.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_process.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_process.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_process_cycle.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_process_cycle.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_process_cycle.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_process_cycle.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_readv_chain.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_readv_chain.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_recv.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_recv.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_send.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_send.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_setaffinity.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_setaffinity.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_setaffinity.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_setaffinity.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_setproctitle.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_setproctitle.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_setproctitle.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_setproctitle.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_shmem.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_shmem.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_shmem.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_shmem.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_socket.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_socket.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_socket.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_socket.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_solaris.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_solaris.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_solaris_config.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_solaris_config.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_solaris_init.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_solaris_init.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_solaris_sendfilev_chain.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_solaris_sendfilev_chain.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_sunpro_amd64.il
      (from vendor/nginx-1.11.4/src/os/unix/ngx_sunpro_amd64.il)
    vendor/nginx-1.11.5/src/os/unix/ngx_sunpro_atomic_sparc64.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_sunpro_atomic_sparc64.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_sunpro_sparc64.il
      (from vendor/nginx-1.11.4/src/os/unix/ngx_sunpro_sparc64.il)
    vendor/nginx-1.11.5/src/os/unix/ngx_sunpro_x86.il
      (from vendor/nginx-1.11.4/src/os/unix/ngx_sunpro_x86.il)
    vendor/nginx-1.11.5/src/os/unix/ngx_thread.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_thread.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_thread_cond.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_thread_cond.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_thread_id.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_thread_id.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_thread_mutex.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_thread_mutex.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_time.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_time.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_time.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_time.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_udp_recv.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_udp_recv.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_udp_send.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_udp_send.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_user.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_user.c)
    vendor/nginx-1.11.5/src/os/unix/ngx_user.h
      (from vendor/nginx-1.11.4/src/os/unix/ngx_user.h)
    vendor/nginx-1.11.5/src/os/unix/ngx_writev_chain.c
      (from vendor/nginx-1.11.4/src/os/unix/ngx_writev_chain.c)
    vendor/nginx-1.11.5/src/os/win32/nginx.ico
      (from vendor/nginx-1.11.4/src/os/win32/nginx.ico)
    vendor/nginx-1.11.5/src/os/win32/nginx.rc
      (from vendor/nginx-1.11.4/src/os/win32/nginx.rc)
    vendor/nginx-1.11.5/src/os/win32/nginx_icon16.xpm
      (from vendor/nginx-1.11.4/src/os/win32/nginx_icon16.xpm)
    vendor/nginx-1.11.5/src/os/win32/nginx_icon32.xpm
      (from vendor/nginx-1.11.4/src/os/win32/nginx_icon32.xpm)
    vendor/nginx-1.11.5/src/os/win32/nginx_icon48.xpm
      (from vendor/nginx-1.11.4/src/os/win32/nginx_icon48.xpm)
    vendor/nginx-1.11.5/src/os/win32/ngx_alloc.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_alloc.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_alloc.h
      (from vendor/nginx-1.11.4/src/os/win32/ngx_alloc.h)
    vendor/nginx-1.11.5/src/os/win32/ngx_atomic.h
      (from vendor/nginx-1.11.4/src/os/win32/ngx_atomic.h)
    vendor/nginx-1.11.5/src/os/win32/ngx_dlopen.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_dlopen.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_dlopen.h
      (from vendor/nginx-1.11.4/src/os/win32/ngx_dlopen.h)
    vendor/nginx-1.11.5/src/os/win32/ngx_errno.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_errno.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_errno.h
      (from vendor/nginx-1.11.4/src/os/win32/ngx_errno.h)
    vendor/nginx-1.11.5/src/os/win32/ngx_event_log.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_event_log.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_files.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_files.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_files.h
      (from vendor/nginx-1.11.4/src/os/win32/ngx_files.h)
    vendor/nginx-1.11.5/src/os/win32/ngx_os.h
      (from vendor/nginx-1.11.4/src/os/win32/ngx_os.h)
    vendor/nginx-1.11.5/src/os/win32/ngx_process.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_process.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_process.h
      (from vendor/nginx-1.11.4/src/os/win32/ngx_process.h)
    vendor/nginx-1.11.5/src/os/win32/ngx_process_cycle.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_process_cycle.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_process_cycle.h
      (from vendor/nginx-1.11.4/src/os/win32/ngx_process_cycle.h)
    vendor/nginx-1.11.5/src/os/win32/ngx_service.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_service.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_shmem.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_shmem.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_shmem.h
      (from vendor/nginx-1.11.4/src/os/win32/ngx_shmem.h)
    vendor/nginx-1.11.5/src/os/win32/ngx_socket.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_socket.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_socket.h
      (from vendor/nginx-1.11.4/src/os/win32/ngx_socket.h)
    vendor/nginx-1.11.5/src/os/win32/ngx_stat.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_stat.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_thread.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_thread.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_thread.h
      (from vendor/nginx-1.11.4/src/os/win32/ngx_thread.h)
    vendor/nginx-1.11.5/src/os/win32/ngx_time.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_time.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_time.h
      (from vendor/nginx-1.11.4/src/os/win32/ngx_time.h)
    vendor/nginx-1.11.5/src/os/win32/ngx_udp_wsarecv.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_udp_wsarecv.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_user.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_user.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_user.h
      (from vendor/nginx-1.11.4/src/os/win32/ngx_user.h)
    vendor/nginx-1.11.5/src/os/win32/ngx_win32_config.h
      (from vendor/nginx-1.11.4/src/os/win32/ngx_win32_config.h)
    vendor/nginx-1.11.5/src/os/win32/ngx_win32_init.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_win32_init.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_wsarecv.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_wsarecv.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_wsarecv_chain.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_wsarecv_chain.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_wsasend.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_wsasend.c)
    vendor/nginx-1.11.5/src/os/win32/ngx_wsasend_chain.c
      (from vendor/nginx-1.11.4/src/os/win32/ngx_wsasend_chain.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream.h
      (from vendor/nginx-1.11.4/src/stream/ngx_stream.h)
    vendor/nginx-1.11.5/src/stream/ngx_stream_access_module.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_access_module.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_core_module.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_core_module.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_geo_module.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_geo_module.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_geoip_module.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_geoip_module.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_handler.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_handler.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_limit_conn_module.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_limit_conn_module.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_log_module.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_log_module.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_map_module.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_map_module.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_proxy_module.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_proxy_module.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_realip_module.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_realip_module.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_return_module.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_return_module.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_script.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_script.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_script.h
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_script.h)
    vendor/nginx-1.11.5/src/stream/ngx_stream_split_clients_module.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_split_clients_module.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_ssl_module.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_ssl_module.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_ssl_module.h
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_ssl_module.h)
    vendor/nginx-1.11.5/src/stream/ngx_stream_upstream.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_upstream.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_upstream.h
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_upstream.h)
    vendor/nginx-1.11.5/src/stream/ngx_stream_upstream_hash_module.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_upstream_hash_module.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_upstream_least_conn_module.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_upstream_least_conn_module.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_upstream_round_robin.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_upstream_round_robin.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_upstream_round_robin.h
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_upstream_round_robin.h)
    vendor/nginx-1.11.5/src/stream/ngx_stream_upstream_zone_module.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_upstream_zone_module.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_variables.c
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_variables.c)
    vendor/nginx-1.11.5/src/stream/ngx_stream_variables.h
      (from vendor/nginx-1.11.4/src/stream/ngx_stream_variables.h)
    vendor/nginx-1.11.5/src/stream/ngx_stream_write_filter_module.c
      (from vendor/nginx-1.11.4/src/http/ngx_http_write_filter_module.c)

  Modified: nginx_version (+1 -1)
===================================================================
--- nginx_version    2016-10-26 16:45:24 +0900 (3d0e623)
+++ nginx_version    2016-10-26 17:22:59 +0900 (e6dbb7c)
@@ -1 +1 @@
-1.11.4
+1.11.5

  Renamed: vendor/nginx-1.11.5/auto/cc/acc (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/cc/bcc (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/cc/ccc (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/cc/clang (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/cc/conf (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/cc/gcc (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/cc/icc (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/cc/msvc (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/cc/name (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/cc/owc (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/cc/sunc (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/configure (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/define (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/endianness (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/feature (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/have (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/have_headers (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/headers (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/include (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/init (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/install (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/conf (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/geoip/conf (+9 -11) 80%
===================================================================
--- vendor/nginx-1.11.4/auto/lib/geoip/conf    2016-10-26 16:45:24 +0900 (ebd2e15)
+++ vendor/nginx-1.11.5/auto/lib/geoip/conf    2016-10-26 17:22:59 +0900 (8302aae)
@@ -74,17 +74,15 @@ if [ $ngx_found = yes ]; then
 
     NGX_LIB_GEOIP=$ngx_feature_libs
 
-    if [ $NGX_IPV6 = YES ]; then
-        ngx_feature="GeoIP IPv6 support"
-        ngx_feature_name="NGX_HAVE_GEOIP_V6"
-        ngx_feature_run=no
-        ngx_feature_incs="#include <stdio.h>
-                          #include <GeoIP.h>"
-        #ngx_feature_path=
-        #ngx_feature_libs=
-        ngx_feature_test="printf(\"%d\", GEOIP_CITY_EDITION_REV0_V6);"
-        . auto/feature
-    fi
+    ngx_feature="GeoIP IPv6 support"
+    ngx_feature_name="NGX_HAVE_GEOIP_V6"
+    ngx_feature_run=no
+    ngx_feature_incs="#include <stdio.h>
+                      #include <GeoIP.h>"
+    #ngx_feature_path=
+    #ngx_feature_libs=
+    ngx_feature_test="printf(\"%d\", GEOIP_CITY_EDITION_REV0_V6);"
+    . auto/feature
 
 else
 

  Renamed: vendor/nginx-1.11.5/auto/lib/google-perftools/conf (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/libatomic/conf (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/libatomic/make (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/libgd/conf (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/libxslt/conf (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/make (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/openssl/conf (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/openssl/make (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/openssl/makefile.bcc (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/openssl/makefile.msvc (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/pcre/conf (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/pcre/make (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/pcre/makefile.bcc (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/pcre/makefile.msvc (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/pcre/makefile.owc (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/perl/conf (+3 -1) 97%
===================================================================
--- vendor/nginx-1.11.4/auto/lib/perl/conf    2016-10-26 16:45:24 +0900 (f5f5d3e)
+++ vendor/nginx-1.11.5/auto/lib/perl/conf    2016-10-26 17:22:59 +0900 (d891d82)
@@ -28,8 +28,10 @@ if test -n "$NGX_PERL_VER"; then
         exit 1;
     fi
 
-    NGX_PERL_CFLAGS="$CFLAGS `$NGX_PERL -MExtUtils::Embed -e ccopts`"
     NGX_PM_CFLAGS=`$NGX_PERL -MExtUtils::Embed -e ccopts`
+    NGX_PM_LDFLAGS=`$NGX_PERL -MConfig -e 'print $Config{lddlflags}'`
+
+    NGX_PERL_CFLAGS="$CFLAGS `$NGX_PERL -MExtUtils::Embed -e ccopts`"
 
     # gcc 4.1/4.2 warn about unused values in pTHX_
     NGX_PERL_CFLAGS=`echo $NGX_PERL_CFLAGS \

  Renamed: vendor/nginx-1.11.5/auto/lib/perl/make (+1 -0) 96%
===================================================================
--- vendor/nginx-1.11.4/auto/lib/perl/make    2016-10-26 16:45:24 +0900 (8af8902)
+++ vendor/nginx-1.11.5/auto/lib/perl/make    2016-10-26 17:22:59 +0900 (350090c)
@@ -35,6 +35,7 @@ $NGX_OBJS/src/http/modules/perl/Makefile: \\
 
 	cd $NGX_OBJS/src/http/modules/perl \\
 		&& NGX_PM_CFLAGS="\$(NGX_PM_CFLAGS) -g $NGX_CC_OPT" \\
+			NGX_PM_LDFLAGS="$NGX_LD_OPT \$(NGX_PM_LDFLAGS)" \\
 			NGX_INCS="$CORE_INCS $NGX_OBJS $HTTP_INCS" \\
 			NGX_DEPS="\$(CORE_DEPS) \$(HTTP_DEPS)" \\
 		$NGX_PERL Makefile.PL \\

  Renamed: vendor/nginx-1.11.5/auto/lib/zlib/conf (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/zlib/make (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/zlib/makefile.bcc (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/zlib/makefile.msvc (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/lib/zlib/makefile.owc (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/make (+1 -0) 99%
===================================================================
--- vendor/nginx-1.11.4/auto/make    2016-10-26 16:45:24 +0900 (5589bee)
+++ vendor/nginx-1.11.5/auto/make    2016-10-26 17:22:59 +0900 (84d2668)
@@ -31,6 +31,7 @@ END
 if test -n "$NGX_PERL_CFLAGS"; then
     echo NGX_PERL_CFLAGS = $NGX_PERL_CFLAGS                   >> $NGX_MAKEFILE
     echo NGX_PM_CFLAGS = $NGX_PM_CFLAGS                       >> $NGX_MAKEFILE
+    echo NGX_PM_LDFLAGS = $NGX_PM_LDFLAGS                     >> $NGX_MAKEFILE
 fi
 
 

  Renamed: vendor/nginx-1.11.5/auto/module (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/modules (+26 -2) 97%
===================================================================
--- vendor/nginx-1.11.4/auto/modules    2016-10-26 16:45:24 +0900 (433767a)
+++ vendor/nginx-1.11.5/auto/modules    2016-10-26 17:22:59 +0900 (89377bf)
@@ -973,7 +973,8 @@ if [ $STREAM != NO ]; then
                      ngx_stream_core_module \
                      ngx_stream_log_module \
                      ngx_stream_proxy_module \
-                     ngx_stream_upstream_module"
+                     ngx_stream_upstream_module \
+                     ngx_stream_write_filter_module"
     ngx_module_incs="src/stream"
     ngx_module_deps="src/stream/ngx_stream.h \
                      src/stream/ngx_stream_variables.h \
@@ -988,7 +989,8 @@ if [ $STREAM != NO ]; then
                      src/stream/ngx_stream_log_module.c \
                      src/stream/ngx_stream_proxy_module.c \
                      src/stream/ngx_stream_upstream.c \
-                     src/stream/ngx_stream_upstream_round_robin.c"
+                     src/stream/ngx_stream_upstream_round_robin.c \
+                     src/stream/ngx_stream_write_filter_module.c"
 
     . auto/module
 
@@ -1118,6 +1120,16 @@ if [ $STREAM != NO ]; then
 
         . auto/module
     fi
+
+    if [ $STREAM_SSL_PREREAD = YES ]; then
+        ngx_module_name=ngx_stream_ssl_preread_module
+        ngx_module_deps=
+        ngx_module_srcs=src/stream/ngx_stream_ssl_preread_module.c
+        ngx_module_libs=
+        ngx_module_link=$STREAM_SSL_PREREAD
+
+        . auto/module
+    fi
 fi
 
 
@@ -1300,6 +1312,18 @@ fi
 modules="$modules $MISC_MODULES"
 
 
+if [ $NGX_COMPAT = YES ]; then
+    have=NGX_COMPAT . auto/have
+    have=NGX_HTTP_GZIP . auto/have
+    have=NGX_HTTP_DAV . auto/have
+    have=NGX_HTTP_REALIP . auto/have
+    have=NGX_HTTP_X_FORWARDED_FOR . auto/have
+    have=NGX_HTTP_HEADERS . auto/have
+    have=NGX_HTTP_UPSTREAM_ZONE . auto/have
+    have=NGX_STREAM_UPSTREAM_ZONE . auto/have
+fi
+
+
 cat << END                                    > $NGX_MODULES_C
 
 #include <ngx_config.h>

  Renamed: vendor/nginx-1.11.5/auto/nohave (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/options (+15 -3) 97%
===================================================================
--- vendor/nginx-1.11.4/auto/options    2016-10-26 16:45:24 +0900 (73149d9)
+++ vendor/nginx-1.11.5/auto/options    2016-10-26 17:22:59 +0900 (43724b1)
@@ -44,7 +44,6 @@ EVENT_POLL=NO
 USE_THREADS=NO
 
 NGX_FILE_AIO=NO
-NGX_IPV6=NO
 
 HTTP=YES
 
@@ -126,6 +125,7 @@ STREAM_RETURN=YES
 STREAM_UPSTREAM_HASH=YES
 STREAM_UPSTREAM_LEAST_CONN=YES
 STREAM_UPSTREAM_ZONE=YES
+STREAM_SSL_PREREAD=NO
 
 DYNAMIC_MODULES=
 
@@ -133,6 +133,8 @@ NGX_ADDONS=
 NGX_ADDON_DEPS=
 DYNAMIC_ADDONS=
 
+NGX_COMPAT=NO
+
 USE_PCRE=NO
 PCRE=NONE
 PCRE_OPT=
@@ -201,7 +203,11 @@ do
         --with-threads)                  USE_THREADS=YES            ;;
 
         --with-file-aio)                 NGX_FILE_AIO=YES           ;;
-        --with-ipv6)                     NGX_IPV6=YES               ;;
+
+        --with-ipv6)
+            NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
+$0: warning: the \"--with-ipv6\" option is deprecated"
+        ;;
 
         --without-http)                  HTTP=NO                    ;;
         --without-http-cache)            HTTP_CACHE=NO              ;;
@@ -301,6 +307,8 @@ use the \"--with-mail_ssl_module\" option instead"
         --with-stream_geoip_module)      STREAM_GEOIP=YES           ;;
         --with-stream_geoip_module=dynamic)
                                          STREAM_GEOIP=DYNAMIC       ;;
+        --with-stream_ssl_preread_module)
+                                         STREAM_SSL_PREREAD=YES     ;;
         --without-stream_limit_conn_module)
                                          STREAM_LIMIT_CONN=NO       ;;
         --without-stream_access_module)  STREAM_ACCESS=NO           ;;
@@ -322,6 +330,8 @@ use the \"--with-mail_ssl_module\" option instead"
         --add-module=*)                  NGX_ADDONS="$NGX_ADDONS $value" ;;
         --add-dynamic-module=*)          DYNAMIC_ADDONS="$DYNAMIC_ADDONS $value" ;;
 
+        --with-compat)                   NGX_COMPAT=YES             ;;
+
         --with-cc=*)                     CC="$value"                ;;
         --with-cpp=*)                    CPP="$value"               ;;
         --with-cc-opt=*)                 NGX_CC_OPT="$value"        ;;
@@ -417,7 +427,6 @@ cat << END
   --with-threads                     enable thread pool support
 
   --with-file-aio                    enable file AIO support
-  --with-ipv6                        enable IPv6 support
 
   --with-http_ssl_module             enable ngx_http_ssl_module
   --with-http_v2_module              enable ngx_http_v2_module
@@ -508,6 +517,7 @@ cat << END
   --with-stream_realip_module        enable ngx_stream_realip_module
   --with-stream_geoip_module         enable ngx_stream_geoip_module
   --with-stream_geoip_module=dynamic enable dynamic ngx_stream_geoip_module
+  --with-stream_ssl_preread_module   enable ngx_stream_ssl_preread_module
   --without-stream_limit_conn_module disable ngx_stream_limit_conn_module
   --without-stream_access_module     disable ngx_stream_access_module
   --without-stream_geo_module        disable ngx_stream_geo_module
@@ -528,6 +538,8 @@ cat << END
   --add-module=PATH                  enable external module
   --add-dynamic-module=PATH          enable dynamic external module
 
+  --with-compat                      dynamic modules compatibility
+
   --with-cc=PATH                     set C compiler pathname
   --with-cpp=PATH                    set C preprocessor pathname
   --with-cc-opt=OPTIONS              set additional C compiler options

  Renamed: vendor/nginx-1.11.5/auto/os/conf (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/os/darwin (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/os/freebsd (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/os/linux (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/os/solaris (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/os/win32 (+1 -3) 92%
===================================================================
--- vendor/nginx-1.11.4/auto/os/win32    2016-10-26 16:45:24 +0900 (14ae3b8)
+++ vendor/nginx-1.11.5/auto/os/win32    2016-10-26 17:22:59 +0900 (650cf49)
@@ -37,8 +37,6 @@ if [ $EVENT_SELECT = NO ]; then
     EVENT_MODULES="$EVENT_MODULES $SELECT_MODULE"
 fi
 
-if [ $NGX_IPV6 = YES ]; then
-    have=NGX_HAVE_INET6 . auto/have
-fi
+have=NGX_HAVE_INET6 . auto/have
 
 have=NGX_HAVE_IOCP . auto/have

  Renamed: vendor/nginx-1.11.5/auto/sources (+1 -0) 99%
===================================================================
--- vendor/nginx-1.11.4/auto/sources    2016-10-26 16:45:24 +0900 (216e900)
+++ vendor/nginx-1.11.5/auto/sources    2016-10-26 17:22:59 +0900 (1398147)
@@ -167,6 +167,7 @@ UNIX_SRCS="$CORE_SRCS $EVENT_SRCS \
             src/os/unix/ngx_send.c \
             src/os/unix/ngx_writev_chain.c \
             src/os/unix/ngx_udp_send.c \
+            src/os/unix/ngx_udp_sendmsg_chain.c \
             src/os/unix/ngx_channel.c \
             src/os/unix/ngx_shmem.c \
             src/os/unix/ngx_process.c \

  Renamed: vendor/nginx-1.11.5/auto/stubs (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/summary (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/threads (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/types/sizeof (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/types/typedef (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/types/uintptr_t (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/types/value (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/auto/unix (+12 -14) 98%
===================================================================
--- vendor/nginx-1.11.4/auto/unix    2016-10-26 16:45:24 +0900 (dbc0f0e)
+++ vendor/nginx-1.11.5/auto/unix    2016-10-26 17:22:59 +0900 (5ef74d4)
@@ -637,20 +637,18 @@ ngx_param=NGX_MAX_TIME_T_VALUE; ngx_value=$ngx_max_value; . auto/types/value
 # syscalls, libc calls and some features
 
 
-if [ $NGX_IPV6 = YES ]; then
-    ngx_feature="AF_INET6"
-    ngx_feature_name="NGX_HAVE_INET6"
-    ngx_feature_run=no
-    ngx_feature_incs="#include <sys/socket.h>
-                      #include <netinet/in.h>
-                      #include <arpa/inet.h>"
-    ngx_feature_path=
-    ngx_feature_libs=
-    ngx_feature_test="struct sockaddr_in6  sin6;
-                      sin6.sin6_family = AF_INET6;
-                      (void) sin6"
-    . auto/feature
-fi
+ngx_feature="AF_INET6"
+ngx_feature_name="NGX_HAVE_INET6"
+ngx_feature_run=no
+ngx_feature_incs="#include <sys/socket.h>
+                  #include <netinet/in.h>
+                  #include <arpa/inet.h>"
+ngx_feature_path=
+ngx_feature_libs=
+ngx_feature_test="struct sockaddr_in6  sin6;
+                  sin6.sin6_family = AF_INET6;
+                  (void) sin6"
+. auto/feature
 
 
 ngx_feature="setproctitle()"

  Renamed: vendor/nginx-1.11.5/conf/fastcgi.conf (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/conf/fastcgi_params (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/conf/koi-utf (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/conf/koi-win (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/conf/mime.types (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/conf/nginx.conf (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/conf/scgi_params (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/conf/uwsgi_params (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/conf/win-utf (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/contrib/README (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/contrib/geo2nginx.pl (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/contrib/unicode2nginx/koi-utf (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/contrib/unicode2nginx/unicode-to-nginx.pl (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/contrib/unicode2nginx/win-utf (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/contrib/vim/ftdetect/nginx.vim (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/contrib/vim/indent/nginx.vim (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/contrib/vim/syntax/nginx.vim (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/docs/GNUmakefile (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/docs/dtd/change_log_conf.dtd (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/docs/dtd/changes.dtd (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/docs/html/50x.html (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/docs/html/index.html (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/docs/man/nginx.8 (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/docs/text/LICENSE (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/docs/text/README (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/docs/xml/change_log_conf.xml (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/docs/xml/nginx/changes.xml (+134 -0) 99%
===================================================================
--- vendor/nginx-1.11.4/docs/xml/nginx/changes.xml    2016-10-26 16:45:24 +0900 (01927e5)
+++ vendor/nginx-1.11.5/docs/xml/nginx/changes.xml    2016-10-26 17:22:59 +0900 (97ed726)
@@ -5,6 +5,140 @@
 <change_log title="nginx">
 
 
+<changes ver="1.11.5" date="11.10.2016">
+
+<change type="change">
+<para lang="ru">
+параметр configure --with-ipv6 упразднён,
+поддержка IPv6 теперь собирается автоматически.
+</para>
+<para lang="en">
+the --with-ipv6 configure option was removed,
+now IPv6 support is configured automatically.
+</para>
+</change>
+
+<change type="change">
+<para lang="ru">
+теперь, если в блоке upstream не оказалось доступных серверов,
+nginx не сбрасывает статистику ошибок всех серверов, как делал ранее,
+а ожидает истечения fail_timeout.
+</para>
+<para lang="en">
+now if there are no available servers in an upstream,
+nginx will not reset number of failures of all servers as it previously did,
+but will wait for fail_timeout to expire.
+</para>
+</change>
+
+<change type="feature">
+<para lang="ru">
+модуль ngx_stream_ssl_preread_module.
+</para>
+<para lang="en">
+the ngx_stream_ssl_preread_module.
+</para>
+</change>
+
+<change type="feature">
+<para lang="ru">
+директива server в блоке upstream поддерживает параметр max_conns.
+</para>
+<para lang="en">
+the "server" directive in the "upstream" context supports
+the "max_conns" parameter.
+</para>
+</change>
+
+<change type="feature">
+<para lang="ru">
+параметр configure --with-compat.
+</para>
+<para lang="en">
+the --with-compat configure option.
+</para>
+</change>
+
+<change type="feature">
+<para lang="ru">
+параметры manager_files, manager_threshold и manager_sleep
+директив proxy_cache_path, fastcgi_cache_path, scgi_cache_path и
+uwsgi_cache_path.
+</para>
+<para lang="en">
+"manager_files", "manager_threshold", and "manager_sleep" parameters
+of the "proxy_cache_path", "fastcgi_cache_path", "scgi_cache_path", and
+"uwsgi_cache_path" directives.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+при сборке perl-модуля не использовались флаги,
+заданные с помощью параметра configure --with-ld-opt.
+</para>
+<para lang="en">
+flags passed by the --with-ld-opt configure option
+were not used while building perl module.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+в директиве add_after_body при использовании совместно с директивой sub_filter.
+</para>
+<para lang="en">
+in the "add_after_body" directive when used with the "sub_filter" directive.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+в переменной $realip_remote_addr.
+</para>
+<para lang="en">
+in the $realip_remote_addr variable.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+директивы dav_access, proxy_store_access, fastcgi_store_access,
+scgi_store_access и uwsgi_store_access
+игнорировали права, заданные для пользователя.
+</para>
+<para lang="en">
+the "dav_access", "proxy_store_access", "fastcgi_store_access",
+"scgi_store_access", and "uwsgi_store_access" directives
+ignored permissions specified for user.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+unix domain listen-сокеты могли не наследоваться
+при обновлении исполняемого файла на Linux.
+</para>
+<para lang="en">
+unix domain listen sockets might not be inherited
+during binary upgrade on Linux.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+nginx возвращал ошибку 400 на запросы
+с символом "-" в HTTP-методе.
+</para>
+<para lang="en">
+nginx returned the 400 response on requests
+with the "-" character in the HTTP method.
+</para>
+</change>
+
+</changes>
+
+
 <changes ver="1.11.4" date="13.09.2016">
 
 <change type="feature">

  Renamed: vendor/nginx-1.11.5/docs/xsls/changes.xsls (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/docs/xslt/changes.xslt (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/misc/GNUmakefile (+2 -3) 98%
===================================================================
--- vendor/nginx-1.11.4/misc/GNUmakefile    2016-10-26 16:45:24 +0900 (0d1ad87)
+++ vendor/nginx-1.11.5/misc/GNUmakefile    2016-10-26 17:22:59 +0900 (9ab4193)
@@ -5,7 +5,7 @@ NGINX =		nginx-$(VER)
 TEMP =		tmp
 
 OBJS =		objs.msvc8
-OPENSSL =	openssl-1.0.2h
+OPENSSL =	openssl-1.0.2j
 ZLIB =		zlib-1.2.8
 PCRE =		pcre-8.39
 
@@ -84,8 +84,7 @@ win32:
 		--with-openssl-opt=no-asm				\
 		--with-http_ssl_module					\
 		--with-mail_ssl_module					\
-		--with-stream_ssl_module				\
-		--with-ipv6
+		--with-stream_ssl_module
 
 
 zip: export

  Renamed: vendor/nginx-1.11.5/misc/README (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/nginx.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/nginx.h (+2 -2) 85%
===================================================================
--- vendor/nginx-1.11.4/src/core/nginx.h    2016-10-26 16:45:24 +0900 (7e9aae6)
+++ vendor/nginx-1.11.5/src/core/nginx.h    2016-10-26 17:22:59 +0900 (1446251)
@@ -9,8 +9,8 @@
 #define _NGINX_H_INCLUDED_
 
 
-#define nginx_version      1011004
-#define NGINX_VERSION      "1.11.4"
+#define nginx_version      1011005
+#define NGINX_VERSION      "1.11.5"
 #define NGINX_VER          "nginx/" NGINX_VERSION
 
 #ifdef NGX_BUILD

  Renamed: vendor/nginx-1.11.5/src/core/ngx_array.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_array.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_buf.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_buf.h (+3 -9) 96%
===================================================================
--- vendor/nginx-1.11.4/src/core/ngx_buf.h    2016-10-26 16:45:24 +0900 (f652b20)
+++ vendor/nginx-1.11.5/src/core/ngx_buf.h    2016-10-26 17:22:59 +0900 (12781a7)
@@ -72,10 +72,8 @@ typedef struct ngx_output_chain_ctx_s  ngx_output_chain_ctx_t;
 
 typedef ngx_int_t (*ngx_output_chain_filter_pt)(void *ctx, ngx_chain_t *in);
 
-#if (NGX_HAVE_FILE_AIO)
 typedef void (*ngx_output_chain_aio_pt)(ngx_output_chain_ctx_t *ctx,
     ngx_file_t *file);
-#endif
 
 struct ngx_output_chain_ctx_s {
     ngx_buf_t                   *buf;
@@ -85,23 +83,19 @@ struct ngx_output_chain_ctx_s {
 
     unsigned                     sendfile:1;
     unsigned                     directio:1;
-#if (NGX_HAVE_ALIGNED_DIRECTIO)
     unsigned                     unaligned:1;
-#endif
     unsigned                     need_in_memory:1;
     unsigned                     need_in_temp:1;
-#if (NGX_HAVE_FILE_AIO || NGX_THREADS)
     unsigned                     aio:1;
-#endif
 
-#if (NGX_HAVE_FILE_AIO)
+#if (NGX_HAVE_FILE_AIO || NGX_COMPAT)
     ngx_output_chain_aio_pt      aio_handler;
-#if (NGX_HAVE_AIO_SENDFILE)
+#if (NGX_HAVE_AIO_SENDFILE || NGX_COMPAT)
     ssize_t                    (*aio_preload)(ngx_buf_t *file);
 #endif
 #endif
 
-#if (NGX_THREADS)
+#if (NGX_THREADS || NGX_COMPAT)
     ngx_int_t                  (*thread_handler)(ngx_thread_task_t *task,
                                                  ngx_file_t *file);
     ngx_thread_task_t           *thread_task;

  Renamed: vendor/nginx-1.11.5/src/core/ngx_conf_file.c (+2 -2) 99%
===================================================================
--- vendor/nginx-1.11.4/src/core/ngx_conf_file.c    2016-10-26 16:45:24 +0900 (c60d5fb)
+++ vendor/nginx-1.11.5/src/core/ngx_conf_file.c    2016-10-26 17:22:59 +0900 (ea1dceb)
@@ -1336,7 +1336,7 @@ ngx_conf_set_enum_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         return NGX_CONF_OK;
     }
 
-    ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
+    ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                        "invalid value \"%s\"", value[1].data);
 
     return NGX_CONF_ERROR;
@@ -1378,7 +1378,7 @@ ngx_conf_set_bitmask_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         }
 
         if (mask[m].name.len == 0) {
-            ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
+            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                                "invalid value \"%s\"", value[i].data);
 
             return NGX_CONF_ERROR;

  Renamed: vendor/nginx-1.11.5/src/core/ngx_conf_file.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_config.h (+13 -0) 93%
===================================================================
--- vendor/nginx-1.11.4/src/core/ngx_config.h    2016-10-26 16:45:24 +0900 (a0bfa63)
+++ vendor/nginx-1.11.5/src/core/ngx_config.h    2016-10-26 17:22:59 +0900 (1861be6)
@@ -129,4 +129,17 @@ typedef intptr_t        ngx_flag_t;
 #define NGX_MAX_INT32_VALUE   (uint32_t) 0x7fffffff
 
 
+#if (NGX_COMPAT)
+
+#define NGX_COMPAT_BEGIN(slots)  uint64_t spare[slots];
+#define NGX_COMPAT_END
+
+#else
+
+#define NGX_COMPAT_BEGIN(slots)
+#define NGX_COMPAT_END
+
+#endif
+
+
 #endif /* _NGX_CONFIG_H_INCLUDED_ */

  Renamed: vendor/nginx-1.11.5/src/core/ngx_connection.c (+1 -4) 99%
===================================================================
--- vendor/nginx-1.11.4/src/core/ngx_connection.c    2016-10-26 16:45:24 +0900 (16ba630)
+++ vendor/nginx-1.11.5/src/core/ngx_connection.c    2016-10-26 17:22:59 +0900 (a789d8c)
@@ -1191,10 +1191,7 @@ ngx_close_connection(ngx_connection_t *c)
             level = NGX_LOG_CRIT;
         }
 
-        /* we use ngx_cycle->log because c->log was in c->pool */
-
-        ngx_log_error(level, ngx_cycle->log, err,
-                      ngx_close_socket_n " %d failed", fd);
+        ngx_log_error(level, c->log, err, ngx_close_socket_n " %d failed", fd);
     }
 }
 

  Renamed: vendor/nginx-1.11.5/src/core/ngx_connection.h (+5 -9) 96%
===================================================================
--- vendor/nginx-1.11.4/src/core/ngx_connection.h    2016-10-26 16:45:24 +0900 (e484c81)
+++ vendor/nginx-1.11.5/src/core/ngx_connection.h    2016-10-26 17:22:59 +0900 (1d3e3a3)
@@ -66,23 +66,19 @@ struct ngx_listening_s {
     unsigned            addr_ntop:1;
     unsigned            wildcard:1;
 
-#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
+#if (NGX_HAVE_INET6)
     unsigned            ipv6only:1;
 #endif
-#if (NGX_HAVE_REUSEPORT)
     unsigned            reuseport:1;
     unsigned            add_reuseport:1;
-#endif
     unsigned            keepalive:2;
 
-#if (NGX_HAVE_DEFERRED_ACCEPT)
     unsigned            deferred_accept:1;
     unsigned            delete_deferred:1;
     unsigned            add_deferred:1;
-#ifdef SO_ACCEPTFILTER
+#if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER)
     char               *accept_filter;
 #endif
-#endif
 #if (NGX_HAVE_SETFIB)
     int                 setfib;
 #endif
@@ -151,7 +147,7 @@ struct ngx_connection_s {
     ngx_str_t           proxy_protocol_addr;
     in_port_t           proxy_protocol_port;
 
-#if (NGX_SSL)
+#if (NGX_SSL || NGX_COMPAT)
     ngx_ssl_connection_t  *ssl;
 #endif
 
@@ -186,11 +182,11 @@ struct ngx_connection_s {
 
     unsigned            need_last_buf:1;
 
-#if (NGX_HAVE_AIO_SENDFILE)
+#if (NGX_HAVE_AIO_SENDFILE || NGX_COMPAT)
     unsigned            busy_count:2;
 #endif
 
-#if (NGX_THREADS)
+#if (NGX_THREADS || NGX_COMPAT)
     ngx_thread_task_t  *sendfile_task;
 #endif
 };

  Renamed: vendor/nginx-1.11.5/src/core/ngx_core.h (+15 -16) 72%
===================================================================
--- vendor/nginx-1.11.4/src/core/ngx_core.h    2016-10-26 16:45:24 +0900 (2819c1a)
+++ vendor/nginx-1.11.5/src/core/ngx_core.h    2016-10-26 17:22:59 +0900 (2069373)
@@ -12,22 +12,21 @@
 #include <ngx_config.h>
 
 
-typedef struct ngx_module_s      ngx_module_t;
-typedef struct ngx_conf_s        ngx_conf_t;
-typedef struct ngx_cycle_s       ngx_cycle_t;
-typedef struct ngx_pool_s        ngx_pool_t;
-typedef struct ngx_chain_s       ngx_chain_t;
-typedef struct ngx_log_s         ngx_log_t;
-typedef struct ngx_open_file_s   ngx_open_file_t;
-typedef struct ngx_command_s     ngx_command_t;
-typedef struct ngx_file_s        ngx_file_t;
-typedef struct ngx_event_s       ngx_event_t;
-typedef struct ngx_event_aio_s   ngx_event_aio_t;
-typedef struct ngx_connection_s  ngx_connection_t;
-
-#if (NGX_THREADS)
-typedef struct ngx_thread_task_s  ngx_thread_task_t;
-#endif
+typedef struct ngx_module_s          ngx_module_t;
+typedef struct ngx_conf_s            ngx_conf_t;
+typedef struct ngx_cycle_s           ngx_cycle_t;
+typedef struct ngx_pool_s            ngx_pool_t;
+typedef struct ngx_chain_s           ngx_chain_t;
+typedef struct ngx_log_s             ngx_log_t;
+typedef struct ngx_open_file_s       ngx_open_file_t;
+typedef struct ngx_command_s         ngx_command_t;
+typedef struct ngx_file_s            ngx_file_t;
+typedef struct ngx_event_s           ngx_event_t;
+typedef struct ngx_event_aio_s       ngx_event_aio_t;
+typedef struct ngx_connection_s      ngx_connection_t;
+typedef struct ngx_thread_task_s     ngx_thread_task_t;
+typedef struct ngx_ssl_s             ngx_ssl_t;
+typedef struct ngx_ssl_connection_s  ngx_ssl_connection_t;
 
 typedef void (*ngx_event_handler_pt)(ngx_event_t *ev);
 typedef void (*ngx_connection_handler_pt)(ngx_connection_t *c);

  Renamed: vendor/nginx-1.11.5/src/core/ngx_cpuinfo.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_crc.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_crc32.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_crc32.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_crypt.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_crypt.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_cycle.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_cycle.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_file.c (+6 -2) 99%
===================================================================
--- vendor/nginx-1.11.4/src/core/ngx_file.c    2016-10-26 16:45:24 +0900 (c1137cc)
+++ vendor/nginx-1.11.5/src/core/ngx_file.c    2016-10-26 17:22:59 +0900 (8359c0f)
@@ -441,7 +441,7 @@ ngx_conf_set_access_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
     u_char      *p;
     ngx_str_t   *value;
-    ngx_uint_t   i, right, shift, *access;
+    ngx_uint_t   i, right, shift, *access, user;
 
     access = (ngx_uint_t *) (confp + cmd->offset);
 
@@ -451,7 +451,8 @@ ngx_conf_set_access_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
     value = cf->args->elts;
 
-    *access = 0600;
+    *access = 0;
+    user = 0600;
 
     for (i = 1; i < cf->args->nelts; i++) {
 
@@ -460,6 +461,7 @@ ngx_conf_set_access_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         if (ngx_strncmp(p, "user:", sizeof("user:") - 1) == 0) {
             shift = 6;
             p += sizeof("user:") - 1;
+            user = 0;
 
         } else if (ngx_strncmp(p, "group:", sizeof("group:") - 1) == 0) {
             shift = 3;
@@ -486,6 +488,8 @@ ngx_conf_set_access_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         *access |= right << shift;
     }
 
+    *access |= user;
+
     return NGX_CONF_OK;
 
 invalid:

  Renamed: vendor/nginx-1.11.5/src/core/ngx_file.h (+5 -3) 95%
===================================================================
--- vendor/nginx-1.11.4/src/core/ngx_file.h    2016-10-26 16:45:24 +0900 (a723c3d)
+++ vendor/nginx-1.11.5/src/core/ngx_file.h    2016-10-26 17:22:59 +0900 (320adc2)
@@ -23,14 +23,14 @@ struct ngx_file_s {
 
     ngx_log_t                 *log;
 
-#if (NGX_THREADS)
+#if (NGX_THREADS || NGX_COMPAT)
     ngx_int_t                (*thread_handler)(ngx_thread_task_t *task,
                                                ngx_file_t *file);
     void                      *thread_ctx;
     ngx_thread_task_t         *thread_task;
 #endif
 
-#if (NGX_HAVE_FILE_AIO)
+#if (NGX_HAVE_FILE_AIO || NGX_COMPAT)
     ngx_event_aio_t           *aio;
 #endif
 
@@ -42,7 +42,8 @@ struct ngx_file_s {
 #define NGX_MAX_PATH_LEVEL  3
 
 
-typedef time_t (*ngx_path_manager_pt) (void *data);
+typedef ngx_msec_t (*ngx_path_manager_pt) (void *data);
+typedef ngx_msec_t (*ngx_path_purger_pt) (void *data);
 typedef void (*ngx_path_loader_pt) (void *data);
 
 
@@ -52,6 +53,7 @@ typedef struct {
     size_t                     level[NGX_MAX_PATH_LEVEL];
 
     ngx_path_manager_pt        manager;
+    ngx_path_purger_pt         purger;
     ngx_path_loader_pt         loader;
     void                      *data;
 

  Renamed: vendor/nginx-1.11.5/src/core/ngx_hash.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_hash.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_inet.c (+13 -6) 98%
===================================================================
--- vendor/nginx-1.11.4/src/core/ngx_inet.c    2016-10-26 16:45:24 +0900 (dbd1f46)
+++ vendor/nginx-1.11.5/src/core/ngx_inet.c    2016-10-26 17:22:59 +0900 (3bcd3e7)
@@ -1364,6 +1364,7 @@ ngx_cmp_sockaddr(struct sockaddr *sa1, socklen_t slen1,
     struct sockaddr_in6  *sin61, *sin62;
 #endif
 #if (NGX_HAVE_UNIX_DOMAIN)
+    size_t                len;
     struct sockaddr_un   *saun1, *saun2;
 #endif
 
@@ -1393,15 +1394,21 @@ ngx_cmp_sockaddr(struct sockaddr *sa1, socklen_t slen1,
 #if (NGX_HAVE_UNIX_DOMAIN)
     case AF_UNIX:
 
-        /* TODO length */
-
         saun1 = (struct sockaddr_un *) sa1;
         saun2 = (struct sockaddr_un *) sa2;
 
-        if (ngx_memcmp(&saun1->sun_path, &saun2->sun_path,
-                       sizeof(saun1->sun_path))
-            != 0)
-        {
+        if (slen1 < slen2) {
+            len = slen1 - offsetof(struct sockaddr_un, sun_path);
+
+        } else {
+            len = slen2 - offsetof(struct sockaddr_un, sun_path);
+        }
+
+        if (len > sizeof(saun1->sun_path)) {
+            len = sizeof(saun1->sun_path);
+        }
+
+        if (ngx_memcmp(&saun1->sun_path, &saun2->sun_path, len) != 0) {
             return NGX_DECLINED;
         }
 

  Renamed: vendor/nginx-1.11.5/src/core/ngx_inet.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_list.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_list.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_log.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_log.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_md5.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_md5.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_module.h (+11 -26) 92%
===================================================================
--- vendor/nginx-1.11.4/src/core/ngx_module.h    2016-10-26 16:45:24 +0900 (a1a0d6c)
+++ vendor/nginx-1.11.5/src/core/ngx_module.h    2016-10-26 17:22:59 +0900 (8cf3210)
@@ -35,13 +35,13 @@
 #define NGX_MODULE_SIGNATURE_2   "0"
 #endif
 
-#if (NGX_HAVE_FILE_AIO)
+#if (NGX_HAVE_FILE_AIO || NGX_COMPAT)
 #define NGX_MODULE_SIGNATURE_3   "1"
 #else
 #define NGX_MODULE_SIGNATURE_3   "0"
 #endif
 
-#if (NGX_HAVE_AIO_SENDFILE)
+#if (NGX_HAVE_AIO_SENDFILE || NGX_COMPAT)
 #define NGX_MODULE_SIGNATURE_4   "1"
 #else
 #define NGX_MODULE_SIGNATURE_4   "0"
@@ -71,17 +71,8 @@
 #define NGX_MODULE_SIGNATURE_8   "0"
 #endif
 
-#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
 #define NGX_MODULE_SIGNATURE_9   "1"
-#else
-#define NGX_MODULE_SIGNATURE_9   "0"
-#endif
-
-#if (NGX_HAVE_REUSEPORT)
 #define NGX_MODULE_SIGNATURE_10  "1"
-#else
-#define NGX_MODULE_SIGNATURE_10  "0"
-#endif
 
 #if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER)
 #define NGX_MODULE_SIGNATURE_11  "1"
@@ -89,11 +80,7 @@
 #define NGX_MODULE_SIGNATURE_11  "0"
 #endif
 
-#if (NGX_HAVE_DEFERRED_ACCEPT && defined TCP_DEFER_ACCEPT)
 #define NGX_MODULE_SIGNATURE_12  "1"
-#else
-#define NGX_MODULE_SIGNATURE_12  "0"
-#endif
 
 #if (NGX_HAVE_SETFIB)
 #define NGX_MODULE_SIGNATURE_13  "1"
@@ -140,7 +127,7 @@
 #define NGX_MODULE_SIGNATURE_21  "0"
 #endif
 
-#if (NGX_THREADS)
+#if (NGX_THREADS || NGX_COMPAT)
 #define NGX_MODULE_SIGNATURE_22  "1"
 #else
 #define NGX_MODULE_SIGNATURE_22  "0"
@@ -152,17 +139,13 @@
 #define NGX_MODULE_SIGNATURE_23  "0"
 #endif
 
-#if (NGX_HTTP_SSL)
+#if (NGX_HTTP_SSL || NGX_COMPAT)
 #define NGX_MODULE_SIGNATURE_24  "1"
 #else
 #define NGX_MODULE_SIGNATURE_24  "0"
 #endif
 
-#if (NGX_HTTP_V2)
 #define NGX_MODULE_SIGNATURE_25  "1"
-#else
-#define NGX_MODULE_SIGNATURE_25  "0"
-#endif
 
 #if (NGX_HTTP_GZIP)
 #define NGX_MODULE_SIGNATURE_26  "1"
@@ -170,11 +153,7 @@
 #define NGX_MODULE_SIGNATURE_26  "0"
 #endif
 
-#if (NGX_HTTP_DEGRADATION)
 #define NGX_MODULE_SIGNATURE_27  "1"
-#else
-#define NGX_MODULE_SIGNATURE_27  "0"
-#endif
 
 #if (NGX_HTTP_X_FORWARDED_FOR)
 #define NGX_MODULE_SIGNATURE_28  "1"
@@ -212,6 +191,12 @@
 #define NGX_MODULE_SIGNATURE_33  "0"
 #endif
 
+#if (NGX_COMPAT)
+#define NGX_MODULE_SIGNATURE_34  "1"
+#else
+#define NGX_MODULE_SIGNATURE_34  "0"
+#endif
+
 #define NGX_MODULE_SIGNATURE                                                  \
     NGX_MODULE_SIGNATURE_0 NGX_MODULE_SIGNATURE_1 NGX_MODULE_SIGNATURE_2      \
     NGX_MODULE_SIGNATURE_3 NGX_MODULE_SIGNATURE_4 NGX_MODULE_SIGNATURE_5      \
@@ -224,7 +209,7 @@
     NGX_MODULE_SIGNATURE_24 NGX_MODULE_SIGNATURE_25 NGX_MODULE_SIGNATURE_26   \
     NGX_MODULE_SIGNATURE_27 NGX_MODULE_SIGNATURE_28 NGX_MODULE_SIGNATURE_29   \
     NGX_MODULE_SIGNATURE_30 NGX_MODULE_SIGNATURE_31 NGX_MODULE_SIGNATURE_32   \
-    NGX_MODULE_SIGNATURE_33
+    NGX_MODULE_SIGNATURE_33 NGX_MODULE_SIGNATURE_34
 
 
 #define NGX_MODULE_V1                                                         \

  Renamed: vendor/nginx-1.11.5/src/core/ngx_murmurhash.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_murmurhash.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_open_file_cache.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_open_file_cache.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_output_chain.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_palloc.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_palloc.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_parse.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_parse.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_parse_time.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_parse_time.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_proxy_protocol.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_proxy_protocol.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_queue.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_queue.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_radix_tree.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_radix_tree.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_rbtree.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_rbtree.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_regex.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_regex.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_resolver.c (+1 -0) 99%
===================================================================
--- vendor/nginx-1.11.4/src/core/ngx_resolver.c    2016-10-26 16:45:24 +0900 (53dae6b)
+++ vendor/nginx-1.11.5/src/core/ngx_resolver.c    2016-10-26 17:22:59 +0900 (bdfed88)
@@ -3006,6 +3006,7 @@ ngx_resolver_srv_names_handler(ngx_resolver_ctx_t *cctx)
     ctx->count--;
 
     srv->ctx = NULL;
+    srv->state = cctx->state;
 
     if (cctx->naddrs) {
 

  Renamed: vendor/nginx-1.11.5/src/core/ngx_resolver.h (+1 -0) 99%
===================================================================
--- vendor/nginx-1.11.4/src/core/ngx_resolver.h    2016-10-26 16:45:24 +0900 (e36cfdc)
+++ vendor/nginx-1.11.5/src/core/ngx_resolver.h    2016-10-26 17:22:59 +0900 (a0d6fc3)
@@ -82,6 +82,7 @@ typedef struct {
     u_short                   port;
 
     ngx_resolver_ctx_t       *ctx;
+    ngx_int_t                 state;
 
     ngx_uint_t                naddrs;
     ngx_addr_t               *addrs;

  Renamed: vendor/nginx-1.11.5/src/core/ngx_rwlock.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_rwlock.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_sha1.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_sha1.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_shmtx.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_shmtx.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_slab.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_slab.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_spinlock.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_string.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_string.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_syslog.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_syslog.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_thread_pool.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_thread_pool.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_times.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/core/ngx_times.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/event/modules/ngx_devpoll_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/event/modules/ngx_epoll_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/event/modules/ngx_eventport_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/event/modules/ngx_iocp_module.c (+2 -0) 99%
===================================================================
--- vendor/nginx-1.11.4/src/event/modules/ngx_iocp_module.c    2016-10-26 16:45:24 +0900 (8f163e3)
+++ vendor/nginx-1.11.5/src/event/modules/ngx_iocp_module.c    2016-10-26 17:22:59 +0900 (e00d967)
@@ -93,6 +93,8 @@ ngx_os_io_t ngx_iocp_io = {
     NULL,
     ngx_udp_overlapped_wsarecv,
     NULL,
+    NULL,
+    NULL,
     ngx_overlapped_wsasend_chain,
     0
 };

  Renamed: vendor/nginx-1.11.5/src/event/modules/ngx_iocp_module.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/event/modules/ngx_kqueue_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/event/modules/ngx_poll_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/event/modules/ngx_select_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/event/modules/ngx_win32_select_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/event/ngx_event.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/event/ngx_event.h (+2 -1) 99%
===================================================================
--- vendor/nginx-1.11.4/src/event/ngx_event.h    2016-10-26 16:45:24 +0900 (27139ee)
+++ vendor/nginx-1.11.5/src/event/ngx_event.h    2016-10-26 17:22:59 +0900 (053bd16)
@@ -152,7 +152,7 @@ struct ngx_event_aio_s {
     ngx_event_handler_pt       handler;
     ngx_file_t                *file;
 
-#if (NGX_HAVE_AIO_SENDFILE)
+#if (NGX_HAVE_AIO_SENDFILE || NGX_COMPAT)
     ssize_t                  (*preload_handler)(ngx_buf_t *file);
 #endif
 
@@ -430,6 +430,7 @@ extern ngx_os_io_t  ngx_io;
 #define ngx_send             ngx_io.send
 #define ngx_send_chain       ngx_io.send_chain
 #define ngx_udp_send         ngx_io.udp_send
+#define ngx_udp_send_chain   ngx_io.udp_send_chain
 
 
 #define NGX_EVENT_MODULE      0x544E5645  /* "EVNT" */

  Renamed: vendor/nginx-1.11.5/src/event/ngx_event_accept.c (+1 -0) 99%
===================================================================
--- vendor/nginx-1.11.4/src/event/ngx_event_accept.c    2016-10-26 16:45:24 +0900 (4445adc)
+++ vendor/nginx-1.11.5/src/event/ngx_event_accept.c    2016-10-26 17:22:59 +0900 (1fce2e8)
@@ -467,6 +467,7 @@ ngx_event_recvmsg(ngx_event_t *ev)
         *log = ls->log;
 
         c->send = ngx_udp_send;
+        c->send_chain = ngx_udp_send_chain;
 
         c->log = log;
         c->pool->log = log;

  Renamed: vendor/nginx-1.11.5/src/event/ngx_event_acceptex.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/event/ngx_event_connect.c (+1 -0) 99%
===================================================================
--- vendor/nginx-1.11.4/src/event/ngx_event_connect.c    2016-10-26 16:45:24 +0900 (06534ef)
+++ vendor/nginx-1.11.5/src/event/ngx_event_connect.c    2016-10-26 17:22:59 +0900 (c5bb806)
@@ -166,6 +166,7 @@ ngx_event_connect_peer(ngx_peer_connection_t *pc)
     } else { /* type == SOCK_DGRAM */
         c->recv = ngx_udp_recv;
         c->send = ngx_send;
+        c->send_chain = ngx_udp_send_chain;
     }
 
     c->log_error = pc->log_error;

  Renamed: vendor/nginx-1.11.5/src/event/ngx_event_connect.h (+7 -6) 89%
===================================================================
--- vendor/nginx-1.11.4/src/event/ngx_event_connect.h    2016-10-26 16:45:24 +0900 (10b72a1)
+++ vendor/nginx-1.11.5/src/event/ngx_event_connect.h    2016-10-26 17:22:59 +0900 (72d21d7)
@@ -25,13 +25,12 @@ typedef ngx_int_t (*ngx_event_get_peer_pt)(ngx_peer_connection_t *pc,
     void *data);
 typedef void (*ngx_event_free_peer_pt)(ngx_peer_connection_t *pc, void *data,
     ngx_uint_t state);
-#if (NGX_SSL)
-
+typedef void (*ngx_event_notify_peer_pt)(ngx_peer_connection_t *pc,
+    void *data, ngx_uint_t type);
 typedef ngx_int_t (*ngx_event_set_peer_session_pt)(ngx_peer_connection_t *pc,
     void *data);
 typedef void (*ngx_event_save_peer_session_pt)(ngx_peer_connection_t *pc,
     void *data);
-#endif
 
 
 struct ngx_peer_connection_s {
@@ -46,9 +45,10 @@ struct ngx_peer_connection_s {
 
     ngx_event_get_peer_pt            get;
     ngx_event_free_peer_pt           free;
+    ngx_event_notify_peer_pt         notify;
     void                            *data;
 
-#if (NGX_SSL)
+#if (NGX_SSL || NGX_COMPAT)
     ngx_event_set_peer_session_pt    set_session;
     ngx_event_save_peer_session_pt   save_session;
 #endif
@@ -61,12 +61,13 @@ struct ngx_peer_connection_s {
     ngx_log_t                       *log;
 
     unsigned                         cached:1;
-#if (NGX_HAVE_TRANSPARENT_PROXY)
     unsigned                         transparent:1;
-#endif
 
                                      /* ngx_connection_log_error_e */
     unsigned                         log_error:2;
+
+    NGX_COMPAT_BEGIN(2)
+    NGX_COMPAT_END
 };
 
 

  Renamed: vendor/nginx-1.11.5/src/event/ngx_event_connectex.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/event/ngx_event_openssl.c (+5 -5) 99%
===================================================================
--- vendor/nginx-1.11.4/src/event/ngx_event_openssl.c    2016-10-26 16:45:24 +0900 (1cbfdf2)
+++ vendor/nginx-1.11.5/src/event/ngx_event_openssl.c    2016-10-26 17:22:59 +0900 (68d02bf)
@@ -55,7 +55,7 @@ static int ngx_ssl_session_ticket_key_callback(ngx_ssl_conn_t *ssl_conn,
     HMAC_CTX *hctx, int enc);
 #endif
 
-#if OPENSSL_VERSION_NUMBER < 0x10002002L
+#ifndef X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT
 static ngx_int_t ngx_ssl_check_name(ngx_str_t *name, ASN1_STRING *str);
 #endif
 
@@ -3092,7 +3092,7 @@ ngx_ssl_check_host(ngx_connection_t *c, ngx_str_t *name)
         return NGX_ERROR;
     }
 
-#if OPENSSL_VERSION_NUMBER >= 0x10002002L
+#ifdef X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT
 
     /* X509_check_host() is only available in OpenSSL 1.0.2+ */
 
@@ -3209,7 +3209,7 @@ found:
 }
 
 
-#if OPENSSL_VERSION_NUMBER < 0x10002002L
+#ifndef X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT
 
 static ngx_int_t
 ngx_ssl_check_name(ngx_str_t *name, ASN1_STRING *pattern)
@@ -3656,13 +3656,13 @@ ngx_openssl_engine(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     engine = ENGINE_by_id((char *) value[1].data);
 
     if (engine == NULL) {
-        ngx_ssl_error(NGX_LOG_WARN, cf->log, 0,
+        ngx_ssl_error(NGX_LOG_EMERG, cf->log, 0,
                       "ENGINE_by_id(\"%V\") failed", &value[1]);
         return NGX_CONF_ERROR;
     }
 
     if (ENGINE_set_default(engine, ENGINE_METHOD_ALL) == 0) {
-        ngx_ssl_error(NGX_LOG_WARN, cf->log, 0,
+        ngx_ssl_error(NGX_LOG_EMERG, cf->log, 0,
                       "ENGINE_set_default(\"%V\", ENGINE_METHOD_ALL) failed",
                       &value[1]);
 

  Renamed: vendor/nginx-1.11.5/src/event/ngx_event_openssl.h (+4 -4) 99%
===================================================================
--- vendor/nginx-1.11.4/src/event/ngx_event_openssl.h    2016-10-26 16:45:24 +0900 (3367d10)
+++ vendor/nginx-1.11.5/src/event/ngx_event_openssl.h    2016-10-26 17:22:59 +0900 (24b812f)
@@ -54,14 +54,14 @@
 #define ngx_ssl_conn_t          SSL
 
 
-typedef struct {
+struct ngx_ssl_s {
     SSL_CTX                    *ctx;
     ngx_log_t                  *log;
     size_t                      buffer_size;
-} ngx_ssl_t;
+};
 
 
-typedef struct {
+struct ngx_ssl_connection_s {
     ngx_ssl_conn_t             *connection;
     SSL_CTX                    *session_ctx;
 
@@ -80,7 +80,7 @@ typedef struct {
     unsigned                    no_wait_shutdown:1;
     unsigned                    no_send_shutdown:1;
     unsigned                    handshake_buffer_set:1;
-} ngx_ssl_connection_t;
+};
 
 
 #define NGX_SSL_NO_SCACHE            -2

  Renamed: vendor/nginx-1.11.5/src/event/ngx_event_openssl_stapling.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/event/ngx_event_pipe.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/event/ngx_event_pipe.h (+1 -1) 98%
===================================================================
--- vendor/nginx-1.11.4/src/event/ngx_event_pipe.h    2016-10-26 16:45:24 +0900 (ef2e7a0)
+++ vendor/nginx-1.11.5/src/event/ngx_event_pipe.h    2016-10-26 17:22:59 +0900 (10a3340)
@@ -47,7 +47,7 @@ struct ngx_event_pipe_s {
     ngx_event_pipe_output_filter_pt   output_filter;
     void                             *output_ctx;
 
-#if (NGX_THREADS)
+#if (NGX_THREADS || NGX_COMPAT)
     ngx_int_t                       (*thread_handler)(ngx_thread_task_t *task,
                                                       ngx_file_t *file);
     void                             *thread_ctx;

  Renamed: vendor/nginx-1.11.5/src/event/ngx_event_posted.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/event/ngx_event_posted.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/event/ngx_event_timer.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/event/ngx_event_timer.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_access_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_addition_filter_module.c (+1 -0) 99%
===================================================================
--- vendor/nginx-1.11.4/src/http/modules/ngx_http_addition_filter_module.c    2016-10-26 16:45:24 +0900 (db4970b)
+++ vendor/nginx-1.11.5/src/http/modules/ngx_http_addition_filter_module.c    2016-10-26 17:22:59 +0900 (2fad0e5)
@@ -171,6 +171,7 @@ ngx_http_addition_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
     for (cl = in; cl; cl = cl->next) {
         if (cl->buf->last_buf) {
             cl->buf->last_buf = 0;
+            cl->buf->last_in_chain = 1;
             cl->buf->sync = 1;
             last = 1;
         }

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_auth_basic_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_auth_request_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_autoindex_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_browser_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_charset_filter_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_chunked_filter_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_dav_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_degradation_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_empty_gif_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_fastcgi_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_flv_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_geo_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_geoip_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_gunzip_filter_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_gzip_filter_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_gzip_static_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_headers_filter_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_image_filter_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_index_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_limit_conn_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_limit_req_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_log_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_map_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_memcached_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_mp4_module.c (+1 -1) 99%
===================================================================
--- vendor/nginx-1.11.4/src/http/modules/ngx_http_mp4_module.c    2016-10-26 16:45:24 +0900 (16ef83c)
+++ vendor/nginx-1.11.5/src/http/modules/ngx_http_mp4_module.c    2016-10-26 17:22:59 +0900 (2a68bae)
@@ -1144,7 +1144,7 @@ ngx_http_mp4_read_mdat_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
     data = &mp4->mdat_data_buf;
     data->file = &mp4->file;
     data->in_file = 1;
-    data->last_buf = 1;
+    data->last_buf = (mp4->request == mp4->request->main) ? 1 : 0;
     data->last_in_chain = 1;
     data->file_last = mp4->offset + atom_data_size;
 

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_not_modified_filter_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_proxy_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_random_index_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_range_filter_module.c (+2 -1) 99%
===================================================================
--- vendor/nginx-1.11.4/src/http/modules/ngx_http_range_filter_module.c    2016-10-26 16:45:24 +0900 (57065e1)
+++ vendor/nginx-1.11.5/src/http/modules/ngx_http_range_filter_module.c    2016-10-26 17:22:59 +0900 (095ef06)
@@ -750,7 +750,8 @@ ngx_http_range_singlepart_body(ngx_http_request_t *r,
                 buf->last -= (size_t) (last - range->end);
             }
 
-            buf->last_buf = 1;
+            buf->last_buf = (r == r->main) ? 1 : 0;
+            buf->last_in_chain = 1;
             *ll = cl;
             cl->next = NULL;
 

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_realip_module.c (+4 -4) 99%
===================================================================
--- vendor/nginx-1.11.4/src/http/modules/ngx_http_realip_module.c    2016-10-26 16:45:24 +0900 (dba3c52)
+++ vendor/nginx-1.11.5/src/http/modules/ngx_http_realip_module.c    2016-10-26 17:22:59 +0900 (5e3355c)
@@ -141,15 +141,15 @@ ngx_http_realip_handler(ngx_http_request_t *r)
     ngx_http_realip_ctx_t       *ctx;
     ngx_http_realip_loc_conf_t  *rlcf;
 
-    ctx = ngx_http_get_module_ctx(r, ngx_http_realip_module);
+    rlcf = ngx_http_get_module_loc_conf(r, ngx_http_realip_module);
 
-    if (ctx) {
+    if (rlcf->from == NULL) {
         return NGX_DECLINED;
     }
 
-    rlcf = ngx_http_get_module_loc_conf(r, ngx_http_realip_module);
+    ctx = ngx_http_realip_get_module_ctx(r);
 
-    if (rlcf->from == NULL) {
+    if (ctx) {
         return NGX_DECLINED;
     }
 

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_referer_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_rewrite_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_scgi_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_secure_link_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_slice_filter_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_split_clients_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_ssi_filter_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_ssi_filter_module.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_ssl_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_ssl_module.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_static_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_stub_status_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_sub_filter_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_upstream_hash_module.c (+10 -1) 98%
===================================================================
--- vendor/nginx-1.11.4/src/http/modules/ngx_http_upstream_hash_module.c    2016-10-26 16:45:24 +0900 (1e2e05c)
+++ vendor/nginx-1.11.5/src/http/modules/ngx_http_upstream_hash_module.c    2016-10-26 17:22:59 +0900 (6c28c64)
@@ -242,6 +242,10 @@ ngx_http_upstream_get_hash_peer(ngx_peer_connection_t *pc, void *data)
             goto next;
         }
 
+        if (peer->max_conns && peer->conns >= peer->max_conns) {
+            goto next;
+        }
+
         break;
 
     next:
@@ -523,7 +527,6 @@ ngx_http_upstream_get_chash_peer(ngx_peer_connection_t *pc, void *data)
              peer;
              peer = peer->next, i++)
         {
-
             n = i / (8 * sizeof(uintptr_t));
             m = (uintptr_t) 1 << i % (8 * sizeof(uintptr_t));
 
@@ -549,6 +552,10 @@ ngx_http_upstream_get_chash_peer(ngx_peer_connection_t *pc, void *data)
                 continue;
             }
 
+            if (peer->max_conns && peer->conns >= peer->max_conns) {
+                continue;
+            }
+
             peer->current_weight += peer->effective_weight;
             total += peer->effective_weight;
 
@@ -571,6 +578,7 @@ ngx_http_upstream_get_chash_peer(ngx_peer_connection_t *pc, void *data)
         hp->tries++;
 
         if (hp->tries >= points->number) {
+            pc->name = hp->rrp.peers->name;
             ngx_http_upstream_rr_peers_unlock(hp->rrp.peers);
             return NGX_BUSY;
         }
@@ -647,6 +655,7 @@ ngx_http_upstream_hash(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
     uscf->flags = NGX_HTTP_UPSTREAM_CREATE
                   |NGX_HTTP_UPSTREAM_WEIGHT
+                  |NGX_HTTP_UPSTREAM_MAX_CONNS
                   |NGX_HTTP_UPSTREAM_MAX_FAILS
                   |NGX_HTTP_UPSTREAM_FAIL_TIMEOUT
                   |NGX_HTTP_UPSTREAM_DOWN;

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_upstream_ip_hash_module.c (+5 -0) 97%
===================================================================
--- vendor/nginx-1.11.4/src/http/modules/ngx_http_upstream_ip_hash_module.c    2016-10-26 16:45:24 +0900 (8a5f0fa)
+++ vendor/nginx-1.11.5/src/http/modules/ngx_http_upstream_ip_hash_module.c    2016-10-26 17:22:59 +0900 (296108f)
@@ -212,6 +212,10 @@ ngx_http_upstream_get_ip_hash_peer(ngx_peer_connection_t *pc, void *data)
             goto next;
         }
 
+        if (peer->max_conns && peer->conns >= peer->max_conns) {
+            goto next;
+        }
+
         break;
 
     next:
@@ -259,6 +263,7 @@ ngx_http_upstream_ip_hash(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
     uscf->flags = NGX_HTTP_UPSTREAM_CREATE
                   |NGX_HTTP_UPSTREAM_WEIGHT
+                  |NGX_HTTP_UPSTREAM_MAX_CONNS
                   |NGX_HTTP_UPSTREAM_MAX_FAILS
                   |NGX_HTTP_UPSTREAM_FAIL_TIMEOUT
                   |NGX_HTTP_UPSTREAM_DOWN;

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_upstream_keepalive_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_upstream_least_conn_module.c (+9 -7) 96%
===================================================================
--- vendor/nginx-1.11.4/src/http/modules/ngx_http_upstream_least_conn_module.c    2016-10-26 16:45:24 +0900 (8a300c1)
+++ vendor/nginx-1.11.5/src/http/modules/ngx_http_upstream_least_conn_module.c    2016-10-26 17:22:59 +0900 (ebe0627)
@@ -136,7 +136,6 @@ ngx_http_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data)
          peer;
          peer = peer->next, i++)
     {
-
         n = i / (8 * sizeof(uintptr_t));
         m = (uintptr_t) 1 << i % (8 * sizeof(uintptr_t));
 
@@ -155,6 +154,10 @@ ngx_http_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data)
             continue;
         }
 
+        if (peer->max_conns && peer->conns >= peer->max_conns) {
+            continue;
+        }
+
         /*
          * select peer with least number of connections; if there are
          * multiple peers with the same number of connections, select
@@ -210,6 +213,10 @@ ngx_http_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data)
                 continue;
             }
 
+            if (peer->max_conns && peer->conns >= peer->max_conns) {
+                continue;
+            }
+
             peer->current_weight += peer->effective_weight;
             total += peer->effective_weight;
 
@@ -273,12 +280,6 @@ failed:
         ngx_http_upstream_rr_peers_wlock(peers);
     }
 
-    /* all peers failed, mark them as live for quick recovery */
-
-    for (peer = peers->peer; peer; peer = peer->next) {
-        peer->fails = 0;
-    }
-
     ngx_http_upstream_rr_peers_unlock(peers);
 
     pc->name = peers->name;
@@ -303,6 +304,7 @@ ngx_http_upstream_least_conn(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
     uscf->flags = NGX_HTTP_UPSTREAM_CREATE
                   |NGX_HTTP_UPSTREAM_WEIGHT
+                  |NGX_HTTP_UPSTREAM_MAX_CONNS
                   |NGX_HTTP_UPSTREAM_MAX_FAILS
                   |NGX_HTTP_UPSTREAM_FAIL_TIMEOUT
                   |NGX_HTTP_UPSTREAM_DOWN

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_upstream_zone_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_userid_filter_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_uwsgi_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/ngx_http_xslt_filter_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/perl/Makefile.PL (+2 -0) 95%
===================================================================
--- vendor/nginx-1.11.4/src/http/modules/perl/Makefile.PL    2016-10-26 16:45:24 +0900 (03348b5)
+++ vendor/nginx-1.11.5/src/http/modules/perl/Makefile.PL    2016-10-26 17:22:59 +0900 (7edadcb)
@@ -16,6 +16,8 @@ WriteMakefile(
     CCFLAGS           => "$ENV{NGX_PM_CFLAGS}",
     OPTIMIZE          => '-O',
 
+    LDDLFLAGS         => "$ENV{NGX_PM_LDFLAGS}",
+
     INC               => join(" ", map {
                              m#^/# ? "-I $_" : "-I ../../../../../$_"
                          } (split /\s+/, $ENV{NGX_INCS})),

  Renamed: vendor/nginx-1.11.5/src/http/modules/perl/nginx.pm (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/perl/nginx.xs (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/perl/ngx_http_perl_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/perl/ngx_http_perl_module.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/modules/perl/typemap (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http.c (+1 -1) 99%
===================================================================
--- vendor/nginx-1.11.4/src/http/ngx_http.c    2016-10-26 16:45:24 +0900 (7a46b3e)
+++ vendor/nginx-1.11.5/src/http/ngx_http.c    2016-10-26 17:22:59 +0900 (ba559f2)
@@ -1756,7 +1756,7 @@ ngx_http_add_listening(ngx_conf_t *cf, ngx_http_conf_addr_t *addr)
     ls->deferred_accept = addr->opt.deferred_accept;
 #endif
 
-#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
+#if (NGX_HAVE_INET6)
     ls->ipv6only = addr->opt.ipv6only;
 #endif
 

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http.h (+0 -3) 99%
===================================================================
--- vendor/nginx-1.11.4/src/http/ngx_http.h    2016-10-26 16:45:24 +0900 (19cb680)
+++ vendor/nginx-1.11.5/src/http/ngx_http.h    2016-10-26 17:22:59 +0900 (afab4f6)
@@ -19,10 +19,7 @@ typedef struct ngx_http_cache_s       ngx_http_cache_t;
 typedef struct ngx_http_file_cache_s  ngx_http_file_cache_t;
 typedef struct ngx_http_log_ctx_s     ngx_http_log_ctx_t;
 typedef struct ngx_http_chunked_s     ngx_http_chunked_t;
-
-#if (NGX_HTTP_V2)
 typedef struct ngx_http_v2_stream_s   ngx_http_v2_stream_t;
-#endif
 
 typedef ngx_int_t (*ngx_http_header_handler_pt)(ngx_http_request_t *r,
     ngx_table_elt_t *h, ngx_uint_t offset);

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_cache.h (+9 -2) 94%
===================================================================
--- vendor/nginx-1.11.4/src/http/ngx_http_cache.h    2016-10-26 16:45:24 +0900 (2667cbb)
+++ vendor/nginx-1.11.5/src/http/ngx_http_cache.h    2016-10-26 17:22:59 +0900 (70342d0)
@@ -50,7 +50,8 @@ typedef struct {
     unsigned                         exists:1;
     unsigned                         updating:1;
     unsigned                         deleting:1;
-                                     /* 11 unused bits */
+    unsigned                         purged:1;
+                                     /* 10 unused bits */
 
     ngx_file_uniq_t                  uniq;
     time_t                           expire;
@@ -85,13 +86,14 @@ struct ngx_http_cache_s {
     ngx_uint_t                       min_uses;
     ngx_uint_t                       error;
     ngx_uint_t                       valid_msec;
+    ngx_uint_t                       vary_tag;
 
     ngx_buf_t                       *buf;
 
     ngx_http_file_cache_t           *file_cache;
     ngx_http_file_cache_node_t      *node;
 
-#if (NGX_THREADS)
+#if (NGX_THREADS || NGX_COMPAT)
     ngx_thread_task_t               *thread_task;
 #endif
 
@@ -109,6 +111,7 @@ struct ngx_http_cache_s {
     unsigned                         updating:1;
     unsigned                         exists:1;
     unsigned                         temp_file:1;
+    unsigned                         purged:1;
     unsigned                         reading:1;
     unsigned                         secondary:1;
 };
@@ -163,6 +166,10 @@ struct ngx_http_file_cache_s {
     ngx_msec_t                       loader_sleep;
     ngx_msec_t                       loader_threshold;
 
+    ngx_uint_t                       manager_files;
+    ngx_msec_t                       manager_sleep;
+    ngx_msec_t                       manager_threshold;
+
     ngx_shm_zone_t                  *shm_zone;
 };
 

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_config.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_copy_filter_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_core_module.c (+1 -3) 99%
===================================================================
--- vendor/nginx-1.11.4/src/http/ngx_http_core_module.c    2016-10-26 16:45:24 +0900 (e26c3f7)
+++ vendor/nginx-1.11.5/src/http/ngx_http_core_module.c    2016-10-26 17:22:59 +0900 (9da5d109)
@@ -3760,10 +3760,8 @@ ngx_http_core_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
     ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0);
     ngx_conf_merge_size_value(conf->sendfile_max_chunk,
                               prev->sendfile_max_chunk, 0);
-#if (NGX_HAVE_FILE_AIO || NGX_THREADS)
     ngx_conf_merge_value(conf->aio, prev->aio, NGX_HTTP_AIO_OFF);
     ngx_conf_merge_value(conf->aio_write, prev->aio_write, 0);
-#endif
 #if (NGX_THREADS)
     ngx_conf_merge_ptr_value(conf->thread_pool, prev->thread_pool, NULL);
     ngx_conf_merge_ptr_value(conf->thread_pool_value, prev->thread_pool_value,
@@ -3939,7 +3937,7 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     lsopt.fastopen = -1;
 #endif
     lsopt.wildcard = u.wildcard;
-#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
+#if (NGX_HAVE_INET6)
     lsopt.ipv6only = 1;
 #endif
 

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_core_module.h (+5 -17) 98%
===================================================================
--- vendor/nginx-1.11.4/src/http/ngx_http_core_module.h    2016-10-26 16:45:24 +0900 (773c215)
+++ vendor/nginx-1.11.5/src/http/ngx_http_core_module.h    2016-10-26 17:22:59 +0900 (ade9abb)
@@ -15,6 +15,8 @@
 
 #if (NGX_THREADS)
 #include <ngx_thread_pool.h>
+#elif (NGX_COMPAT)
+typedef struct ngx_thread_pool_s  ngx_thread_pool_t;
 #endif
 
 
@@ -65,18 +67,13 @@ typedef struct {
     unsigned                   default_server:1;
     unsigned                   bind:1;
     unsigned                   wildcard:1;
-#if (NGX_HTTP_SSL)
     unsigned                   ssl:1;
-#endif
-#if (NGX_HTTP_V2)
     unsigned                   http2:1;
-#endif
-#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
+#if (NGX_HAVE_INET6)
     unsigned                   ipv6only:1;
 #endif
-#if (NGX_HAVE_REUSEPORT)
+    unsigned                   deferred_accept:1;
     unsigned                   reuseport:1;
-#endif
     unsigned                   so_keepalive:2;
     unsigned                   proxy_protocol:1;
 
@@ -98,9 +95,6 @@ typedef struct {
 #if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER)
     char                      *accept_filter;
 #endif
-#if (NGX_HAVE_DEFERRED_ACCEPT && defined TCP_DEFER_ACCEPT)
-    ngx_uint_t                 deferred_accept;
-#endif
 
     u_char                     addr[NGX_SOCKADDR_STRLEN + 1];
 } ngx_http_listen_opt_t;
@@ -234,12 +228,8 @@ struct ngx_http_addr_conf_s {
 
     ngx_http_virtual_names_t  *virtual_names;
 
-#if (NGX_HTTP_SSL)
     unsigned                   ssl:1;
-#endif
-#if (NGX_HTTP_V2)
     unsigned                   http2:1;
-#endif
     unsigned                   proxy_protocol:1;
 };
 
@@ -327,10 +317,8 @@ struct ngx_http_core_loc_conf_s {
     unsigned      auto_redirect:1;
 #if (NGX_HTTP_GZIP)
     unsigned      gzip_disable_msie6:2;
-#if (NGX_HTTP_DEGRADATION)
     unsigned      gzip_disable_degradation:2;
 #endif
-#endif
 
     ngx_http_location_tree_node_t   *static_locations;
 #if (NGX_PCRE)
@@ -419,7 +407,7 @@ struct ngx_http_core_loc_conf_s {
 #endif
 #endif
 
-#if (NGX_THREADS)
+#if (NGX_THREADS || NGX_COMPAT)
     ngx_thread_pool_t         *thread_pool;
     ngx_http_complex_value_t  *thread_pool_value;
 #endif

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_file_cache.c (+94 -9) 96%
===================================================================
--- vendor/nginx-1.11.4/src/http/ngx_http_file_cache.c    2016-10-26 16:45:24 +0900 (4bf0f7f)
+++ vendor/nginx-1.11.5/src/http/ngx_http_file_cache.c    2016-10-26 17:22:59 +0900 (199a901)
@@ -1759,6 +1759,7 @@ ngx_http_file_cache_expire(ngx_http_file_cache_t *cache)
     size_t                       len;
     time_t                       now, wait;
     ngx_path_t                  *path;
+    ngx_msec_t                   elapsed;
     ngx_queue_t                 *q;
     ngx_http_file_cache_node_t  *fcn;
     u_char                       key[2 * NGX_HTTP_CACHE_KEY_LEN];
@@ -1810,7 +1811,7 @@ ngx_http_file_cache_expire(ngx_http_file_cache_t *cache)
 
         if (fcn->count == 0) {
             ngx_http_file_cache_delete(cache, q, name);
-            continue;
+            goto next;
         }
 
         if (fcn->deleting) {
@@ -1836,6 +1837,22 @@ ngx_http_file_cache_expire(ngx_http_file_cache_t *cache)
         ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0,
                       "ignore long locked inactive cache entry %*s, count:%d",
                       (size_t) 2 * NGX_HTTP_CACHE_KEY_LEN, key, fcn->count);
+
+next:
+
+        if (++cache->files >= cache->manager_files) {
+            wait = 0;
+            break;
+        }
+
+        ngx_time_update();
+
+        elapsed = ngx_abs((ngx_msec_int_t) (ngx_current_msec - cache->last));
+
+        if (elapsed >= cache->manager_threshold) {
+            wait = 0;
+            break;
+        }
     }
 
     ngx_shmtx_unlock(&cache->shpool->mutex);
@@ -1897,20 +1914,25 @@ ngx_http_file_cache_delete(ngx_http_file_cache_t *cache, ngx_queue_t *q,
 }
 
 
-static time_t
+static ngx_msec_t
 ngx_http_file_cache_manager(void *data)
 {
     ngx_http_file_cache_t  *cache = data;
 
     off_t       size;
     time_t      next, wait;
+    ngx_msec_t  elapsed;
     ngx_uint_t  count, watermark;
 
-    next = ngx_http_file_cache_expire(cache);
-
     cache->last = ngx_current_msec;
     cache->files = 0;
 
+    next = ngx_http_file_cache_expire(cache);
+
+    if (next == 0) {
+        return cache->manager_sleep;
+    }
+
     for ( ;; ) {
         ngx_shmtx_lock(&cache->shpool->mutex);
 
@@ -1925,17 +1947,29 @@ ngx_http_file_cache_manager(void *data)
                        size, count, (ngx_int_t) watermark);
 
         if (size < cache->max_size && count < watermark) {
-            return next;
+            return (ngx_msec_t) next * 1000;
         }
 
         wait = ngx_http_file_cache_forced_expire(cache);
 
         if (wait > 0) {
-            return wait;
+            return (ngx_msec_t) wait * 1000;
         }
 
         if (ngx_quit || ngx_terminate) {
-            return next;
+            return (ngx_msec_t) next * 1000;
+        }
+
+        if (++cache->files >= cache->manager_files) {
+            return cache->manager_sleep;
+        }
+
+        ngx_time_update();
+
+        elapsed = ngx_abs((ngx_msec_int_t) (ngx_current_msec - cache->last));
+
+        if (elapsed >= cache->manager_threshold) {
+            return cache->manager_sleep;
         }
     }
 }
@@ -2211,8 +2245,9 @@ ngx_http_file_cache_set_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     size_t                  len;
     ssize_t                 size;
     ngx_str_t               s, name, *value;
-    ngx_int_t               loader_files;
-    ngx_msec_t              loader_sleep, loader_threshold;
+    ngx_int_t               loader_files, manager_files;
+    ngx_msec_t              loader_sleep, manager_sleep, loader_threshold,
+                            manager_threshold;
     ngx_uint_t              i, n, use_temp_path;
     ngx_array_t            *caches;
     ngx_http_file_cache_t  *cache, **ce;
@@ -2230,10 +2265,15 @@ ngx_http_file_cache_set_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     use_temp_path = 1;
 
     inactive = 600;
+
     loader_files = 100;
     loader_sleep = 50;
     loader_threshold = 200;
 
+    manager_files = 100;
+    manager_sleep = 50;
+    manager_threshold = 200;
+
     name.len = 0;
     size = 0;
     max_size = NGX_MAX_OFF_T_VALUE;
@@ -2405,6 +2445,48 @@ ngx_http_file_cache_set_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
             continue;
         }
 
+        if (ngx_strncmp(value[i].data, "manager_files=", 14) == 0) {
+
+            manager_files = ngx_atoi(value[i].data + 14, value[i].len - 14);
+            if (manager_files == NGX_ERROR) {
+                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+                           "invalid manager_files value \"%V\"", &value[i]);
+                return NGX_CONF_ERROR;
+            }
+
+            continue;
+        }
+
+        if (ngx_strncmp(value[i].data, "manager_sleep=", 14) == 0) {
+
+            s.len = value[i].len - 14;
+            s.data = value[i].data + 14;
+
+            manager_sleep = ngx_parse_time(&s, 0);
+            if (manager_sleep == (ngx_msec_t) NGX_ERROR) {
+                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+                           "invalid manager_sleep value \"%V\"", &value[i]);
+                return NGX_CONF_ERROR;
+            }
+
+            continue;
+        }
+
+        if (ngx_strncmp(value[i].data, "manager_threshold=", 18) == 0) {
+
+            s.len = value[i].len - 18;
+            s.data = value[i].data + 18;
+
+            manager_threshold = ngx_parse_time(&s, 0);
+            if (manager_threshold == (ngx_msec_t) NGX_ERROR) {
+                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+                           "invalid manager_threshold value \"%V\"", &value[i]);
+                return NGX_CONF_ERROR;
+            }
+
+            continue;
+        }
+
         ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                            "invalid parameter \"%V\"", &value[i]);
         return NGX_CONF_ERROR;
@@ -2425,6 +2507,9 @@ ngx_http_file_cache_set_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     cache->loader_files = loader_files;
     cache->loader_sleep = loader_sleep;
     cache->loader_threshold = loader_threshold;
+    cache->manager_files = manager_files;
+    cache->manager_sleep = manager_sleep;
+    cache->manager_threshold = manager_threshold;
 
     if (ngx_add_path(cf, &cache->path) != NGX_OK) {
         return NGX_CONF_ERROR;

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_header_filter_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_parse.c (+2 -2) 99%
===================================================================
--- vendor/nginx-1.11.4/src/http/ngx_http_parse.c    2016-10-26 16:45:24 +0900 (bd6c9c9)
+++ vendor/nginx-1.11.5/src/http/ngx_http_parse.c    2016-10-26 17:22:59 +0900 (9f99473)
@@ -149,7 +149,7 @@ ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
                 break;
             }
 
-            if ((ch < 'A' || ch > 'Z') && ch != '_') {
+            if ((ch < 'A' || ch > 'Z') && ch != '_' && ch != '-') {
                 return NGX_HTTP_PARSE_INVALID_METHOD;
             }
 
@@ -270,7 +270,7 @@ ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
                 break;
             }
 
-            if ((ch < 'A' || ch > 'Z') && ch != '_') {
+            if ((ch < 'A' || ch > 'Z') && ch != '_' && ch != '-') {
                 return NGX_HTTP_PARSE_INVALID_METHOD;
             }
 

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_postpone_filter_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_request.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_request.h (+4 -10) 99%
===================================================================
--- vendor/nginx-1.11.4/src/http/ngx_http_request.h    2016-10-26 16:45:24 +0900 (499c1ef)
+++ vendor/nginx-1.11.5/src/http/ngx_http_request.h    2016-10-26 17:22:59 +0900 (cf9ee3c)
@@ -286,9 +286,7 @@ typedef struct {
     ngx_chain_t                      *bufs;
     ngx_buf_t                        *buf;
     off_t                             rest;
-#if (NGX_HTTP_V2)
     off_t                             received;
-#endif
     ngx_chain_t                      *free;
     ngx_chain_t                      *busy;
     ngx_http_chunked_t               *chunked;
@@ -302,7 +300,7 @@ typedef struct {
     ngx_http_addr_conf_t             *addr_conf;
     ngx_http_conf_ctx_t              *conf_ctx;
 
-#if (NGX_HTTP_SSL && defined SSL_CTRL_SET_TLSEXT_HOSTNAME)
+#if (NGX_HTTP_SSL || NGX_COMPAT)
     ngx_str_t                        *ssl_servername;
 #if (NGX_PCRE)
     ngx_http_regex_t                 *ssl_servername_regex;
@@ -315,9 +313,7 @@ typedef struct {
     ngx_buf_t                       **free;
     ngx_int_t                         nfree;
 
-#if (NGX_HTTP_SSL)
     unsigned                          ssl:1;
-#endif
     unsigned                          proxy_protocol:1;
 } ngx_http_connection_t;
 
@@ -438,9 +434,7 @@ struct ngx_http_request_s {
     ngx_uint_t                        err_status;
 
     ngx_http_connection_t            *http_connection;
-#if (NGX_HTTP_V2)
     ngx_http_v2_stream_t             *stream;
-#endif
 
     ngx_http_log_handler_pt           log_handler;
 
@@ -539,11 +533,11 @@ struct ngx_http_request_s {
     unsigned                          subrequest_ranges:1;
     unsigned                          single_range:1;
     unsigned                          disable_not_modified:1;
-
-#if (NGX_STAT_STUB)
     unsigned                          stat_reading:1;
     unsigned                          stat_writing:1;
-#endif
+    unsigned                          stat_processing:1;
+
+    unsigned                          health_check:1;
 
     /* used to parse HTTP headers */
 

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_request_body.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_script.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_script.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_special_response.c (+1 -1) 99%
===================================================================
--- vendor/nginx-1.11.4/src/http/ngx_http_special_response.c    2016-10-26 16:45:24 +0900 (64e5acd)
+++ vendor/nginx-1.11.5/src/http/ngx_http_special_response.c    2016-10-26 17:22:59 +0900 (7692f80)
@@ -792,7 +792,7 @@ ngx_http_send_refresh(ngx_http_request_t *r)
     b->last = ngx_cpymem(p, ngx_http_msie_refresh_tail,
                          sizeof(ngx_http_msie_refresh_tail) - 1);
 
-    b->last_buf = 1;
+    b->last_buf = (r == r->main) ? 1 : 0;
     b->last_in_chain = 1;
 
     out.buf = b;

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_upstream.c (+23 -3) 99%
===================================================================
--- vendor/nginx-1.11.4/src/http/ngx_http_upstream.c    2016-10-26 16:45:24 +0900 (7e4b3c5)
+++ vendor/nginx-1.11.5/src/http/ngx_http_upstream.c    2016-10-26 17:22:59 +0900 (ceb798f)
@@ -748,6 +748,8 @@ found:
         return;
     }
 
+    u->upstream = uscf;
+
 #if (NGX_HTTP_SSL)
     u->ssl_name = uscf->host;
 #endif
@@ -5442,6 +5444,7 @@ ngx_http_upstream(ngx_conf_t *cf, ngx_command_t *cmd, void *dummy)
 
     uscf = ngx_http_upstream_add(cf, &u, NGX_HTTP_UPSTREAM_CREATE
                                          |NGX_HTTP_UPSTREAM_WEIGHT
+                                         |NGX_HTTP_UPSTREAM_MAX_CONNS
                                          |NGX_HTTP_UPSTREAM_MAX_FAILS
                                          |NGX_HTTP_UPSTREAM_FAIL_TIMEOUT
                                          |NGX_HTTP_UPSTREAM_DOWN
@@ -5543,7 +5546,7 @@ ngx_http_upstream_server(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     time_t                       fail_timeout;
     ngx_str_t                   *value, s;
     ngx_url_t                    u;
-    ngx_int_t                    weight, max_fails;
+    ngx_int_t                    weight, max_conns, max_fails;
     ngx_uint_t                   i;
     ngx_http_upstream_server_t  *us;
 
@@ -5557,6 +5560,7 @@ ngx_http_upstream_server(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     value = cf->args->elts;
 
     weight = 1;
+    max_conns = 0;
     max_fails = 1;
     fail_timeout = 10;
 
@@ -5577,6 +5581,21 @@ ngx_http_upstream_server(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
             continue;
         }
 
+        if (ngx_strncmp(value[i].data, "max_conns=", 10) == 0) {
+
+            if (!(uscf->flags & NGX_HTTP_UPSTREAM_MAX_CONNS)) {
+                goto not_supported;
+            }
+
+            max_conns = ngx_atoi(&value[i].data[10], value[i].len - 10);
+
+            if (max_conns == NGX_ERROR) {
+                goto invalid;
+            }
+
+            continue;
+        }
+
         if (ngx_strncmp(value[i].data, "max_fails=", 10) == 0) {
 
             if (!(uscf->flags & NGX_HTTP_UPSTREAM_MAX_FAILS)) {
@@ -5653,6 +5672,7 @@ ngx_http_upstream_server(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     us->addrs = u.addrs;
     us->naddrs = u.naddrs;
     us->weight = weight;
+    us->max_conns = max_conns;
     us->max_fails = max_fails;
     us->fail_timeout = fail_timeout;
 
@@ -5717,14 +5737,14 @@ ngx_http_upstream_add(ngx_conf_t *cf, ngx_url_t *u, ngx_uint_t flags)
         }
 
         if ((uscfp[i]->flags & NGX_HTTP_UPSTREAM_CREATE) && !u->no_port) {
-            ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
+            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                                "upstream \"%V\" may not have port %d",
                                &u->host, u->port);
             return NULL;
         }
 
         if ((flags & NGX_HTTP_UPSTREAM_CREATE) && !uscfp[i]->no_port) {
-            ngx_log_error(NGX_LOG_WARN, cf->log, 0,
+            ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
                           "upstream \"%V\" may not have port %d in %s:%ui",
                           &u->host, uscfp[i]->port,
                           uscfp[i]->file_name, uscfp[i]->line);

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_upstream.h (+16 -2) 97%
===================================================================
--- vendor/nginx-1.11.4/src/http/ngx_http_upstream.h    2016-10-26 16:45:24 +0900 (ef861f4)
+++ vendor/nginx-1.11.5/src/http/ngx_http_upstream.h    2016-10-26 17:22:59 +0900 (3d521f2)
@@ -95,11 +95,16 @@ typedef struct {
     ngx_addr_t                      *addrs;
     ngx_uint_t                       naddrs;
     ngx_uint_t                       weight;
+    ngx_uint_t                       max_conns;
     ngx_uint_t                       max_fails;
     time_t                           fail_timeout;
+    ngx_msec_t                       slow_start;
 
     unsigned                         down:1;
     unsigned                         backup:1;
+
+    NGX_COMPAT_BEGIN(6)
+    NGX_COMPAT_END
 } ngx_http_upstream_server_t;
 
 
@@ -109,6 +114,7 @@ typedef struct {
 #define NGX_HTTP_UPSTREAM_FAIL_TIMEOUT  0x0008
 #define NGX_HTTP_UPSTREAM_DOWN          0x0010
 #define NGX_HTTP_UPSTREAM_BACKUP        0x0020
+#define NGX_HTTP_UPSTREAM_MAX_CONNS     0x0100
 
 
 struct ngx_http_upstream_srv_conf_s {
@@ -202,6 +208,7 @@ typedef struct {
 
     ngx_array_t                     *cache_valid;
     ngx_array_t                     *cache_bypass;
+    ngx_array_t                     *cache_purge;
     ngx_array_t                     *no_cache;
 #endif
 
@@ -215,7 +222,7 @@ typedef struct {
     unsigned                         intercept_404:1;
     unsigned                         change_buffering:1;
 
-#if (NGX_HTTP_SSL)
+#if (NGX_HTTP_SSL || NGX_COMPAT)
     ngx_ssl_t                       *ssl;
     ngx_flag_t                       ssl_session_reuse;
 
@@ -225,6 +232,9 @@ typedef struct {
 #endif
 
     ngx_str_t                        module;
+
+    NGX_COMPAT_BEGIN(2)
+    NGX_COMPAT_END
 } ngx_http_upstream_conf_t;
 
 
@@ -313,6 +323,7 @@ struct ngx_http_upstream_s {
     ngx_chain_writer_ctx_t           writer;
 
     ngx_http_upstream_conf_t        *conf;
+    ngx_http_upstream_srv_conf_t    *upstream;
 #if (NGX_HTTP_CACHE)
     ngx_array_t                     *caches;
 #endif
@@ -356,7 +367,7 @@ struct ngx_http_upstream_s {
     ngx_str_t                        schema;
     ngx_str_t                        uri;
 
-#if (NGX_HTTP_SSL)
+#if (NGX_HTTP_SSL || NGX_COMPAT)
     ngx_str_t                        ssl_name;
 #endif
 
@@ -377,6 +388,9 @@ struct ngx_http_upstream_s {
     unsigned                         request_sent:1;
     unsigned                         request_body_sent:1;
     unsigned                         header_sent:1;
+
+    NGX_COMPAT_BEGIN(1)
+    NGX_COMPAT_END
 };
 
 

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_upstream_round_robin.c (+15 -7) 97%
===================================================================
--- vendor/nginx-1.11.4/src/http/ngx_http_upstream_round_robin.c    2016-10-26 16:45:24 +0900 (8479c42)
+++ vendor/nginx-1.11.5/src/http/ngx_http_upstream_round_robin.c    2016-10-26 17:22:59 +0900 (0137bf6)
@@ -92,6 +92,7 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
                 peer[n].weight = server[i].weight;
                 peer[n].effective_weight = server[i].weight;
                 peer[n].current_weight = 0;
+                peer[n].max_conns = server[i].max_conns;
                 peer[n].max_fails = server[i].max_fails;
                 peer[n].fail_timeout = server[i].fail_timeout;
                 peer[n].down = server[i].down;
@@ -155,6 +156,7 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
                 peer[n].weight = server[i].weight;
                 peer[n].effective_weight = server[i].weight;
                 peer[n].current_weight = 0;
+                peer[n].max_conns = server[i].max_conns;
                 peer[n].max_fails = server[i].max_fails;
                 peer[n].fail_timeout = server[i].fail_timeout;
                 peer[n].down = server[i].down;
@@ -223,6 +225,7 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
         peer[i].weight = 1;
         peer[i].effective_weight = 1;
         peer[i].current_weight = 0;
+        peer[i].max_conns = 0;
         peer[i].max_fails = 1;
         peer[i].fail_timeout = 10;
         *peerp = &peer[i];
@@ -257,6 +260,7 @@ ngx_http_upstream_init_round_robin_peer(ngx_http_request_t *r,
 
     rrp->peers = us->peer.data;
     rrp->current = NULL;
+    rrp->config = 0;
 
     n = rrp->peers->number;
 
@@ -337,6 +341,7 @@ ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r,
         peer[0].weight = 1;
         peer[0].effective_weight = 1;
         peer[0].current_weight = 0;
+        peer[0].max_conns = 0;
         peer[0].max_fails = 1;
         peer[0].fail_timeout = 10;
         peers->peer = peer;
@@ -370,6 +375,7 @@ ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r,
             peer[i].weight = 1;
             peer[i].effective_weight = 1;
             peer[i].current_weight = 0;
+            peer[i].max_conns = 0;
             peer[i].max_fails = 1;
             peer[i].fail_timeout = 10;
             *peerp = &peer[i];
@@ -379,6 +385,7 @@ ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r,
 
     rrp->peers = peers;
     rrp->current = NULL;
+    rrp->config = 0;
 
     if (rrp->peers->number <= 8 * sizeof(uintptr_t)) {
         rrp->tried = &rrp->data;
@@ -432,6 +439,10 @@ ngx_http_upstream_get_round_robin_peer(ngx_peer_connection_t *pc, void *data)
             goto failed;
         }
 
+        if (peer->max_conns && peer->conns >= peer->max_conns) {
+            goto failed;
+        }
+
         rrp->current = peer;
 
     } else {
@@ -485,12 +496,6 @@ failed:
         ngx_http_upstream_rr_peers_wlock(peers);
     }
 
-    /* all peers failed, mark them as live for quick recovery */
-
-    for (peer = peers->peer; peer; peer = peer->next) {
-        peer->fails = 0;
-    }
-
     ngx_http_upstream_rr_peers_unlock(peers);
 
     pc->name = peers->name;
@@ -521,7 +526,6 @@ ngx_http_upstream_get_peer(ngx_http_upstream_rr_peer_data_t *rrp)
          peer;
          peer = peer->next, i++)
     {
-
         n = i / (8 * sizeof(uintptr_t));
         m = (uintptr_t) 1 << i % (8 * sizeof(uintptr_t));
 
@@ -540,6 +544,10 @@ ngx_http_upstream_get_peer(ngx_http_upstream_rr_peer_data_t *rrp)
             continue;
         }
 
+        if (peer->max_conns && peer->conns >= peer->max_conns) {
+            continue;
+        }
+
         peer->current_weight += peer->effective_weight;
         total += peer->effective_weight;
 

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_upstream_round_robin.h (+11 -4) 93%
===================================================================
--- vendor/nginx-1.11.4/src/http/ngx_http_upstream_round_robin.h    2016-10-26 16:45:24 +0900 (f2c573f)
+++ vendor/nginx-1.11.5/src/http/ngx_http_upstream_round_robin.h    2016-10-26 17:22:59 +0900 (45f258d)
@@ -27,6 +27,7 @@ struct ngx_http_upstream_rr_peer_s {
     ngx_int_t                       weight;
 
     ngx_uint_t                      conns;
+    ngx_uint_t                      max_conns;
 
     ngx_uint_t                      fails;
     time_t                          accessed;
@@ -34,19 +35,24 @@ struct ngx_http_upstream_rr_peer_s {
 
     ngx_uint_t                      max_fails;
     time_t                          fail_timeout;
+    ngx_msec_t                      slow_start;
+    ngx_msec_t                      start_time;
 
-    ngx_uint_t                      down;          /* unsigned  down:1; */
+    ngx_uint_t                      down;
 
-#if (NGX_HTTP_SSL)
+#if (NGX_HTTP_SSL || NGX_COMPAT)
     void                           *ssl_session;
     int                             ssl_session_len;
 #endif
 
-    ngx_http_upstream_rr_peer_t    *next;
-
 #if (NGX_HTTP_UPSTREAM_ZONE)
     ngx_atomic_t                    lock;
 #endif
+
+    ngx_http_upstream_rr_peer_t    *next;
+
+    NGX_COMPAT_BEGIN(32)
+    NGX_COMPAT_END
 };
 
 
@@ -119,6 +125,7 @@ struct ngx_http_upstream_rr_peers_s {
 
 
 typedef struct {
+    ngx_uint_t                      config;
     ngx_http_upstream_rr_peers_t   *peers;
     ngx_http_upstream_rr_peer_t    *current;
     uintptr_t                      *tried;

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_variables.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/ngx_http_variables.h (+0 -0) 100%
===================================================================

  Copied: vendor/nginx-1.11.5/src/http/ngx_http_write_filter_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/v2/ngx_http_v2.c (+1 -1) 99%
===================================================================
--- vendor/nginx-1.11.4/src/http/v2/ngx_http_v2.c    2016-10-26 16:45:24 +0900 (d0cd2ab)
+++ vendor/nginx-1.11.5/src/http/v2/ngx_http_v2.c    2016-10-26 17:22:59 +0900 (235092b)
@@ -3178,7 +3178,7 @@ ngx_http_v2_parse_method(ngx_http_request_t *r, ngx_http_v2_header_t *header)
     p = r->method_name.data;
 
     do {
-        if ((*p < 'A' || *p > 'Z') && *p != '_') {
+        if ((*p < 'A' || *p > 'Z') && *p != '_' && *p != '-') {
             ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
                           "client sent invalid method: \"%V\"",
                           &r->method_name);

  Renamed: vendor/nginx-1.11.5/src/http/v2/ngx_http_v2.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/v2/ngx_http_v2_filter_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/v2/ngx_http_v2_huff_decode.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/v2/ngx_http_v2_huff_encode.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/v2/ngx_http_v2_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/v2/ngx_http_v2_module.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/http/v2/ngx_http_v2_table.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/mail/ngx_mail.c (+1 -1) 99%
===================================================================
--- vendor/nginx-1.11.4/src/mail/ngx_mail.c    2016-10-26 16:45:24 +0900 (e5a77b0)
+++ vendor/nginx-1.11.5/src/mail/ngx_mail.c    2016-10-26 17:22:59 +0900 (9e560bb)
@@ -341,7 +341,7 @@ ngx_mail_optimize_servers(ngx_conf_t *cf, ngx_array_t *ports)
             ls->keepcnt = addr[i].opt.tcp_keepcnt;
 #endif
 
-#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
+#if (NGX_HAVE_INET6)
             ls->ipv6only = addr[i].opt.ipv6only;
 #endif
 

  Renamed: vendor/nginx-1.11.5/src/mail/ngx_mail.h (+1 -5) 99%
===================================================================
--- vendor/nginx-1.11.4/src/mail/ngx_mail.h    2016-10-26 16:45:24 +0900 (1068bb3)
+++ vendor/nginx-1.11.5/src/mail/ngx_mail.h    2016-10-26 17:22:59 +0900 (c30af35)
@@ -35,10 +35,8 @@ typedef struct {
 
     unsigned                bind:1;
     unsigned                wildcard:1;
-#if (NGX_MAIL_SSL)
     unsigned                ssl:1;
-#endif
-#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
+#if (NGX_HAVE_INET6)
     unsigned                ipv6only:1;
 #endif
     unsigned                so_keepalive:2;
@@ -54,9 +52,7 @@ typedef struct {
 typedef struct {
     ngx_mail_conf_ctx_t    *ctx;
     ngx_str_t               addr_text;
-#if (NGX_MAIL_SSL)
     ngx_uint_t              ssl;    /* unsigned   ssl:1; */
-#endif
 } ngx_mail_addr_conf_t;
 
 typedef struct {

  Renamed: vendor/nginx-1.11.5/src/mail/ngx_mail_auth_http_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/mail/ngx_mail_core_module.c (+1 -1) 99%
===================================================================
--- vendor/nginx-1.11.4/src/mail/ngx_mail_core_module.c    2016-10-26 16:45:24 +0900 (48eacfa)
+++ vendor/nginx-1.11.5/src/mail/ngx_mail_core_module.c    2016-10-26 17:22:59 +0900 (b974d90)
@@ -353,7 +353,7 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     ls->wildcard = u.wildcard;
     ls->ctx = cf->ctx;
 
-#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
+#if (NGX_HAVE_INET6)
     ls->ipv6only = 1;
 #endif
 

  Renamed: vendor/nginx-1.11.5/src/mail/ngx_mail_handler.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/mail/ngx_mail_imap_handler.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/mail/ngx_mail_imap_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/mail/ngx_mail_imap_module.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/mail/ngx_mail_parse.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/mail/ngx_mail_pop3_handler.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/mail/ngx_mail_pop3_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/mail/ngx_mail_pop3_module.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/mail/ngx_mail_proxy_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/mail/ngx_mail_smtp_handler.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/mail/ngx_mail_smtp_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/mail/ngx_mail_smtp_module.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/mail/ngx_mail_ssl_module.c (+2 -2) 99%
===================================================================
--- vendor/nginx-1.11.4/src/mail/ngx_mail_ssl_module.c    2016-10-26 16:45:24 +0900 (11e428c)
+++ vendor/nginx-1.11.5/src/mail/ngx_mail_ssl_module.c    2016-10-26 17:22:59 +0900 (fbc9bc7)
@@ -488,7 +488,7 @@ ngx_mail_ssl_enable(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     }
 
     if (scf->enable && (ngx_int_t) scf->starttls > NGX_MAIL_STARTTLS_OFF) {
-        ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
+        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                            "\"starttls\" directive conflicts with \"ssl on\"");
         return NGX_CONF_ERROR;
     }
@@ -514,7 +514,7 @@ ngx_mail_ssl_starttls(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     }
 
     if (scf->enable == 1 && (ngx_int_t) scf->starttls > NGX_MAIL_STARTTLS_OFF) {
-        ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
+        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                            "\"ssl\" directive conflicts with \"starttls\"");
         return NGX_CONF_ERROR;
     }

  Renamed: vendor/nginx-1.11.5/src/mail/ngx_mail_ssl_module.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/misc/ngx_cpp_test_module.cpp (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/misc/ngx_google_perftools_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_alloc.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_alloc.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_atomic.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_channel.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_channel.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_daemon.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_darwin.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_darwin_config.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_darwin_init.c (+1 -0) 99%
===================================================================
--- vendor/nginx-1.11.4/src/os/unix/ngx_darwin_init.c    2016-10-26 16:45:24 +0900 (a9d12a8)
+++ vendor/nginx-1.11.5/src/os/unix/ngx_darwin_init.c    2016-10-26 17:22:59 +0900 (aabe02f)
@@ -24,6 +24,7 @@ static ngx_os_io_t ngx_darwin_io = {
     ngx_udp_unix_recv,
     ngx_unix_send,
     ngx_udp_unix_send,
+    ngx_udp_unix_sendmsg_chain,
 #if (NGX_HAVE_SENDFILE)
     ngx_darwin_sendfile_chain,
     NGX_IO_SENDFILE

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_darwin_sendfile_chain.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_dlopen.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_dlopen.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_errno.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_errno.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_file_aio_read.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_files.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_files.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_freebsd.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_freebsd_config.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_freebsd_init.c (+1 -0) 99%
===================================================================
--- vendor/nginx-1.11.4/src/os/unix/ngx_freebsd_init.c    2016-10-26 16:45:24 +0900 (71672c7)
+++ vendor/nginx-1.11.5/src/os/unix/ngx_freebsd_init.c    2016-10-26 17:22:59 +0900 (1823f02)
@@ -33,6 +33,7 @@ static ngx_os_io_t ngx_freebsd_io = {
     ngx_udp_unix_recv,
     ngx_unix_send,
     ngx_udp_unix_send,
+    ngx_udp_unix_sendmsg_chain,
 #if (NGX_HAVE_SENDFILE)
     ngx_freebsd_sendfile_chain,
     NGX_IO_SENDFILE

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_freebsd_sendfile_chain.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_gcc_atomic_amd64.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_gcc_atomic_ppc.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_gcc_atomic_sparc64.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_gcc_atomic_x86.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_linux.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_linux_aio_read.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_linux_config.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_linux_init.c (+1 -0) 97%
===================================================================
--- vendor/nginx-1.11.4/src/os/unix/ngx_linux_init.c    2016-10-26 16:45:24 +0900 (a1372e9)
+++ vendor/nginx-1.11.5/src/os/unix/ngx_linux_init.c    2016-10-26 17:22:59 +0900 (a8cf6a0)
@@ -19,6 +19,7 @@ static ngx_os_io_t ngx_linux_io = {
     ngx_udp_unix_recv,
     ngx_unix_send,
     ngx_udp_unix_send,
+    ngx_udp_unix_sendmsg_chain,
 #if (NGX_HAVE_SENDFILE)
     ngx_linux_sendfile_chain,
     NGX_IO_SENDFILE

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_linux_sendfile_chain.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_os.h (+3 -0) 94%
===================================================================
--- vendor/nginx-1.11.4/src/os/unix/ngx_os.h    2016-10-26 16:45:24 +0900 (e22f07c)
+++ vendor/nginx-1.11.5/src/os/unix/ngx_os.h    2016-10-26 17:22:59 +0900 (3b32819)
@@ -29,6 +29,7 @@ typedef struct {
     ngx_recv_pt        udp_recv;
     ngx_send_pt        send;
     ngx_send_pt        udp_send;
+    ngx_send_chain_pt  udp_send_chain;
     ngx_send_chain_pt  send_chain;
     ngx_uint_t         flags;
 } ngx_os_io_t;
@@ -49,6 +50,8 @@ ssize_t ngx_unix_send(ngx_connection_t *c, u_char *buf, size_t size);
 ngx_chain_t *ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in,
     off_t limit);
 ssize_t ngx_udp_unix_send(ngx_connection_t *c, u_char *buf, size_t size);
+ngx_chain_t *ngx_udp_unix_sendmsg_chain(ngx_connection_t *c, ngx_chain_t *in,
+    off_t limit);
 
 
 #if (IOV_MAX > 64)

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_posix_config.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_posix_init.c (+1 -0) 98%
===================================================================
--- vendor/nginx-1.11.4/src/os/unix/ngx_posix_init.c    2016-10-26 16:45:24 +0900 (7e6e79d)
+++ vendor/nginx-1.11.5/src/os/unix/ngx_posix_init.c    2016-10-26 17:22:59 +0900 (583ea4f)
@@ -25,6 +25,7 @@ ngx_os_io_t ngx_os_io = {
     ngx_udp_unix_recv,
     ngx_unix_send,
     ngx_udp_unix_send,
+    ngx_udp_unix_sendmsg_chain,
     ngx_writev_chain,
     0
 };

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_process.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_process.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_process_cycle.c (+3 -3) 99%
===================================================================
--- vendor/nginx-1.11.4/src/os/unix/ngx_process_cycle.c    2016-10-26 16:45:24 +0900 (83b04ee)
+++ vendor/nginx-1.11.5/src/os/unix/ngx_process_cycle.c    2016-10-26 17:22:59 +0900 (5c4e21d)
@@ -1148,11 +1148,11 @@ ngx_cache_manager_process_cycle(ngx_cycle_t *cycle, void *data)
 static void
 ngx_cache_manager_process_handler(ngx_event_t *ev)
 {
-    time_t        next, n;
     ngx_uint_t    i;
+    ngx_msec_t    next, n;
     ngx_path_t  **path;
 
-    next = 60 * 60;
+    next = 60 * 60 * 1000;
 
     path = ngx_cycle->paths.elts;
     for (i = 0; i < ngx_cycle->paths.nelts; i++) {
@@ -1170,7 +1170,7 @@ ngx_cache_manager_process_handler(ngx_event_t *ev)
         next = 1;
     }
 
-    ngx_add_timer(ev, next * 1000);
+    ngx_add_timer(ev, next);
 }
 
 

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_process_cycle.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_readv_chain.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_recv.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_send.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_setaffinity.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_setaffinity.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_setproctitle.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_setproctitle.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_shmem.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_shmem.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_socket.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_socket.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_solaris.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_solaris_config.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_solaris_init.c (+1 -0) 97%
===================================================================
--- vendor/nginx-1.11.4/src/os/unix/ngx_solaris_init.c    2016-10-26 16:45:24 +0900 (83acae1)
+++ vendor/nginx-1.11.5/src/os/unix/ngx_solaris_init.c    2016-10-26 17:22:59 +0900 (65d7875)
@@ -20,6 +20,7 @@ static ngx_os_io_t ngx_solaris_io = {
     ngx_udp_unix_recv,
     ngx_unix_send,
     ngx_udp_unix_send,
+    ngx_udp_unix_sendmsg_chain,
 #if (NGX_HAVE_SENDFILE)
     ngx_solaris_sendfilev_chain,
     NGX_IO_SENDFILE

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_solaris_sendfilev_chain.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_sunpro_amd64.il (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_sunpro_atomic_sparc64.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_sunpro_sparc64.il (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_sunpro_x86.il (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_thread.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_thread_cond.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_thread_id.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_thread_mutex.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_time.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_time.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_udp_recv.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_udp_send.c (+0 -0) 100%
===================================================================

  Copied: vendor/nginx-1.11.5/src/os/unix/ngx_udp_sendmsg_chain.c (+62 -33) 68%
===================================================================
--- vendor/nginx-1.11.4/src/os/unix/ngx_writev_chain.c    2016-10-26 16:45:24 +0900 (e38a3aa)
+++ vendor/nginx-1.11.5/src/os/unix/ngx_udp_sendmsg_chain.c    2016-10-26 17:22:59 +0900 (65bde6f)
@@ -10,11 +10,16 @@
 #include <ngx_event.h>
 
 
+static ngx_chain_t *ngx_udp_output_chain_to_iovec(ngx_iovec_t *vec,
+    ngx_chain_t *in, ngx_log_t *log);
+static ssize_t ngx_sendmsg(ngx_connection_t *c, ngx_iovec_t *vec);
+
+
 ngx_chain_t *
-ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
+ngx_udp_unix_sendmsg_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 {
-    ssize_t        n, sent;
-    off_t          send, prev_send;
+    ssize_t        n;
+    off_t          send;
     ngx_chain_t   *cl;
     ngx_event_t   *wev;
     ngx_iovec_t    vec;
@@ -49,11 +54,10 @@ ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
     vec.nalloc = NGX_IOVS_PREALLOCATE;
 
     for ( ;; ) {
-        prev_send = send;
 
         /* create the iovec and coalesce the neighbouring bufs */
 
-        cl = ngx_output_chain_to_iovec(&vec, in, limit - send, c->log);
+        cl = ngx_udp_output_chain_to_iovec(&vec, in, c->log);
 
         if (cl == NGX_CHAIN_ERROR) {
             return NGX_CHAIN_ERROR;
@@ -61,7 +65,7 @@ ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 
         if (cl && cl->buf->in_file) {
             ngx_log_error(NGX_LOG_ALERT, c->log, 0,
-                          "file buf in writev "
+                          "file buf in sendmsg "
                           "t:%d r:%d f:%d %p %p-%p %p %O-%O",
                           cl->buf->temporary,
                           cl->buf->recycled,
@@ -78,25 +82,27 @@ ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
             return NGX_CHAIN_ERROR;
         }
 
+        if (cl == in) {
+            return in;
+        }
+
         send += vec.size;
 
-        n = ngx_writev(c, &vec);
+        n = ngx_sendmsg(c, &vec);
 
         if (n == NGX_ERROR) {
             return NGX_CHAIN_ERROR;
         }
 
-        sent = (n == NGX_AGAIN) ? 0 : n;
-
-        c->sent += sent;
-
-        in = ngx_chain_update_sent(in, sent);
-
-        if (send - prev_send != sent) {
+        if (n == NGX_AGAIN) {
             wev->ready = 0;
             return in;
         }
 
+        c->sent += n;
+
+        in = ngx_chain_update_sent(in, n);
+
         if (send >= limit || in == NULL) {
             return in;
         }
@@ -104,21 +110,27 @@ ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 }
 
 
-ngx_chain_t *
-ngx_output_chain_to_iovec(ngx_iovec_t *vec, ngx_chain_t *in, size_t limit,
-    ngx_log_t *log)
+static ngx_chain_t *
+ngx_udp_output_chain_to_iovec(ngx_iovec_t *vec, ngx_chain_t *in, ngx_log_t *log)
 {
     size_t         total, size;
     u_char        *prev;
-    ngx_uint_t     n;
+    ngx_uint_t     n, flush;
+    ngx_chain_t   *cl;
     struct iovec  *iov;
 
+    cl = in;
     iov = NULL;
     prev = NULL;
     total = 0;
     n = 0;
+    flush = 0;
 
-    for ( /* void */ ; in && total < limit; in = in->next) {
+    for ( /* void */ ; in && !flush; in = in->next) {
+
+        if (in->buf->flush || in->buf->last_buf) {
+            flush = 1;
+        }
 
         if (ngx_buf_special(in->buf)) {
             continue;
@@ -149,16 +161,14 @@ ngx_output_chain_to_iovec(ngx_iovec_t *vec, ngx_chain_t *in, size_t limit,
 
         size = in->buf->last - in->buf->pos;
 
-        if (size > limit - total) {
-            size = limit - total;
-        }
-
         if (prev == in->buf->pos) {
             iov->iov_len += size;
 
         } else {
             if (n == vec->nalloc) {
-                break;
+                ngx_log_error(NGX_LOG_ALERT, log, 0,
+                              "too many parts in a datagram");
+                return NGX_CHAIN_ERROR;
             }
 
             iov = &vec->iovs[n++];
@@ -171,6 +181,14 @@ ngx_output_chain_to_iovec(ngx_iovec_t *vec, ngx_chain_t *in, size_t limit,
         total += size;
     }
 
+    if (!flush) {
+#if (NGX_SUPPRESS_WARN)
+        vec->size = 0;
+        vec->count = 0;
+#endif
+        return cl;
+    }
+
     vec->count = n;
     vec->size = total;
 
@@ -178,18 +196,29 @@ ngx_output_chain_to_iovec(ngx_iovec_t *vec, ngx_chain_t *in, size_t limit,
 }
 
 
-ssize_t
-ngx_writev(ngx_connection_t *c, ngx_iovec_t *vec)
+static ssize_t
+ngx_sendmsg(ngx_connection_t *c, ngx_iovec_t *vec)
 {
-    ssize_t    n;
-    ngx_err_t  err;
+    ssize_t        n;
+    ngx_err_t      err;
+    struct msghdr  msg;
+
+    ngx_memzero(&msg, sizeof(struct msghdr));
+
+    if (c->socklen) {
+        msg.msg_name = c->sockaddr;
+        msg.msg_namelen = c->socklen;
+    }
+
+    msg.msg_iov = vec->iovs;
+    msg.msg_iovlen = vec->count;
 
 eintr:
 
-    n = writev(c->fd, vec->iovs, vec->count);
+    n = sendmsg(c->fd, &msg, 0);
 
     ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                   "writev: %z of %uz", n, vec->size);
+                   "sendmsg: %z of %uz", n, vec->size);
 
     if (n == -1) {
         err = ngx_errno;
@@ -197,17 +226,17 @@ eintr:
         switch (err) {
         case NGX_EAGAIN:
             ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, err,
-                           "writev() not ready");
+                           "sendmsg() not ready");
             return NGX_AGAIN;
 
         case NGX_EINTR:
             ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, err,
-                           "writev() was interrupted");
+                           "sendmsg() was interrupted");
             goto eintr;
 
         default:
             c->write->error = 1;
-            ngx_connection_error(c, err, "writev() failed");
+            ngx_connection_error(c, err, "sendmsg() failed");
             return NGX_ERROR;
         }
     }

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_user.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_user.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/unix/ngx_writev_chain.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/nginx.ico (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/nginx.rc (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/nginx_icon16.xpm (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/nginx_icon32.xpm (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/nginx_icon48.xpm (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_alloc.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_alloc.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_atomic.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_dlopen.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_dlopen.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_errno.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_errno.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_event_log.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_files.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_files.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_os.h (+2 -0) 96%
===================================================================
--- vendor/nginx-1.11.4/src/os/win32/ngx_os.h    2016-10-26 16:45:24 +0900 (98210a1)
+++ vendor/nginx-1.11.5/src/os/win32/ngx_os.h    2016-10-26 17:22:59 +0900 (15f5aa0)
@@ -28,6 +28,8 @@ typedef struct {
     ngx_recv_chain_pt  recv_chain;
     ngx_recv_pt        udp_recv;
     ngx_send_pt        send;
+    ngx_send_pt        udp_send;
+    ngx_send_chain_pt  udp_send_chain;
     ngx_send_chain_pt  send_chain;
     ngx_uint_t         flags;
 } ngx_os_io_t;

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_process.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_process.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_process_cycle.c (+3 -3) 99%
===================================================================
--- vendor/nginx-1.11.4/src/os/win32/ngx_process_cycle.c    2016-10-26 16:45:24 +0900 (8b9c5ef)
+++ vendor/nginx-1.11.5/src/os/win32/ngx_process_cycle.c    2016-10-26 17:22:59 +0900 (99fec54)
@@ -921,11 +921,11 @@ static void
 ngx_cache_manager_process_handler(void)
 {
     u_long        ev;
-    time_t        next, n;
     ngx_uint_t    i;
+    ngx_msec_t    next, n;
     ngx_path_t  **path;
 
-    next = 60 * 60;
+    next = 60 * 60 * 1000;
 
     path = ngx_cycle->paths.elts;
     for (i = 0; i < ngx_cycle->paths.nelts; i++) {
@@ -943,7 +943,7 @@ ngx_cache_manager_process_handler(void)
         next = 1;
     }
 
-    ev = WaitForSingleObject(ngx_cache_manager_event, (u_long) next * 1000);
+    ev = WaitForSingleObject(ngx_cache_manager_event, (u_long) next);
 
     if (ev != WAIT_TIMEOUT) {
 

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_process_cycle.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_service.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_shmem.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_shmem.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_socket.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_socket.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_stat.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_thread.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_thread.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_time.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_time.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_udp_wsarecv.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_user.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_user.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_win32_config.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_win32_init.c (+2 -0) 99%
===================================================================
--- vendor/nginx-1.11.4/src/os/win32/ngx_win32_init.c    2016-10-26 16:45:24 +0900 (eb3e138)
+++ vendor/nginx-1.11.5/src/os/win32/ngx_win32_init.c    2016-10-26 17:22:59 +0900 (ec9b51e)
@@ -25,6 +25,8 @@ ngx_os_io_t ngx_os_io = {
     ngx_wsarecv_chain,
     ngx_udp_wsarecv,
     ngx_wsasend,
+    NULL,
+    NULL,
     ngx_wsasend_chain,
     0
 };

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_wsarecv.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_wsarecv_chain.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_wsasend.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/os/win32/ngx_wsasend_chain.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream.c (+123 -1) 82%
===================================================================
--- vendor/nginx-1.11.4/src/stream/ngx_stream.c    2016-10-26 16:45:24 +0900 (873e102)
+++ vendor/nginx-1.11.5/src/stream/ngx_stream.c    2016-10-26 17:22:59 +0900 (4a394d7)
@@ -12,6 +12,10 @@
 
 
 static char *ngx_stream_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
+static ngx_int_t ngx_stream_init_phases(ngx_conf_t *cf,
+    ngx_stream_core_main_conf_t *cmcf);
+static ngx_int_t ngx_stream_init_phase_handlers(ngx_conf_t *cf,
+    ngx_stream_core_main_conf_t *cmcf);
 static ngx_int_t ngx_stream_add_ports(ngx_conf_t *cf, ngx_array_t *ports,
     ngx_stream_listen_t *listen);
 static char *ngx_stream_optimize_servers(ngx_conf_t *cf, ngx_array_t *ports);
@@ -27,6 +31,9 @@ static ngx_int_t ngx_stream_cmp_conf_addrs(const void *one, const void *two);
 ngx_uint_t  ngx_stream_max_module;
 
 
+ngx_stream_filter_pt  ngx_stream_top_filter;
+
+
 static ngx_command_t  ngx_stream_commands[] = {
 
     { ngx_string("stream"),
@@ -216,6 +223,10 @@ ngx_stream_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         }
     }
 
+    if (ngx_stream_init_phases(cf, cmcf) != NGX_OK) {
+        return NGX_CONF_ERROR;
+    }
+
     for (m = 0; cf->cycle->modules[m]; m++) {
         if (cf->cycle->modules[m]->type != NGX_STREAM_MODULE) {
             continue;
@@ -236,6 +247,9 @@ ngx_stream_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
     *cf = pcf;
 
+    if (ngx_stream_init_phase_handlers(cf, cmcf) != NGX_OK) {
+        return NGX_CONF_ERROR;
+    }
 
     if (ngx_array_init(&ports, cf->temp_pool, 4, sizeof(ngx_stream_conf_port_t))
         != NGX_OK)
@@ -256,6 +270,114 @@ ngx_stream_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
 
 static ngx_int_t
+ngx_stream_init_phases(ngx_conf_t *cf, ngx_stream_core_main_conf_t *cmcf)
+{
+    if (ngx_array_init(&cmcf->phases[NGX_STREAM_POST_ACCEPT_PHASE].handlers,
+                       cf->pool, 1, sizeof(ngx_stream_handler_pt))
+        != NGX_OK)
+    {
+        return NGX_ERROR;
+    }
+
+    if (ngx_array_init(&cmcf->phases[NGX_STREAM_PREACCESS_PHASE].handlers,
+                       cf->pool, 1, sizeof(ngx_stream_handler_pt))
+        != NGX_OK)
+    {
+        return NGX_ERROR;
+    }
+
+    if (ngx_array_init(&cmcf->phases[NGX_STREAM_ACCESS_PHASE].handlers,
+                       cf->pool, 1, sizeof(ngx_stream_handler_pt))
+        != NGX_OK)
+    {
+        return NGX_ERROR;
+    }
+
+    if (ngx_array_init(&cmcf->phases[NGX_STREAM_SSL_PHASE].handlers,
+                       cf->pool, 1, sizeof(ngx_stream_handler_pt))
+        != NGX_OK)
+    {
+        return NGX_ERROR;
+    }
+
+    if (ngx_array_init(&cmcf->phases[NGX_STREAM_PREREAD_PHASE].handlers,
+                       cf->pool, 1, sizeof(ngx_stream_handler_pt))
+        != NGX_OK)
+    {
+        return NGX_ERROR;
+    }
+
+    if (ngx_array_init(&cmcf->phases[NGX_STREAM_LOG_PHASE].handlers,
+                       cf->pool, 1, sizeof(ngx_stream_handler_pt))
+        != NGX_OK)
+    {
+        return NGX_ERROR;
+    }
+
+    return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_stream_init_phase_handlers(ngx_conf_t *cf,
+    ngx_stream_core_main_conf_t *cmcf)
+{
+    ngx_int_t                     j;
+    ngx_uint_t                    i, n;
+    ngx_stream_handler_pt        *h;
+    ngx_stream_phase_handler_t   *ph;
+    ngx_stream_phase_handler_pt   checker;
+
+    n = 1 /* content phase */;
+
+    for (i = 0; i < NGX_STREAM_LOG_PHASE; i++) {
+        n += cmcf->phases[i].handlers.nelts;
+    }
+
+    ph = ngx_pcalloc(cf->pool,
+                     n * sizeof(ngx_stream_phase_handler_t) + sizeof(void *));
+    if (ph == NULL) {
+        return NGX_ERROR;
+    }
+
+    cmcf->phase_engine.handlers = ph;
+    n = 0;
+
+    for (i = 0; i < NGX_STREAM_LOG_PHASE; i++) {
+        h = cmcf->phases[i].handlers.elts;
+
+        switch (i) {
+
+        case NGX_STREAM_PREREAD_PHASE:
+            checker = ngx_stream_core_preread_phase;
+            break;
+
+        case NGX_STREAM_CONTENT_PHASE:
+            ph->checker = ngx_stream_core_content_phase;
+            n++;
+            ph++;
+
+            continue;
+
+        default:
+            checker = ngx_stream_core_generic_phase;
+        }
+
+        n += cmcf->phases[i].handlers.nelts;
+
+        for (j = cmcf->phases[i].handlers.nelts - 1; j >= 0; j--) {
+            ph->checker = checker;
+            ph->handler = h[j];
+            ph->next = n;
+            ph++;
+        }
+    }
+
+    return NGX_OK;
+}
+
+
+static ngx_int_t
 ngx_stream_add_ports(ngx_conf_t *cf, ngx_array_t *ports,
     ngx_stream_listen_t *listen)
 {
@@ -382,7 +504,7 @@ ngx_stream_optimize_servers(ngx_conf_t *cf, ngx_array_t *ports)
             ls->keepcnt = addr[i].opt.tcp_keepcnt;
 #endif
 
-#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
+#if (NGX_HAVE_INET6)
             ls->ipv6only = addr[i].opt.ipv6only;
 #endif
 

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream.h (+67 -19) 77%
===================================================================
--- vendor/nginx-1.11.4/src/stream/ngx_stream.h    2016-10-26 16:45:24 +0900 (6251cc7)
+++ vendor/nginx-1.11.5/src/stream/ngx_stream.h    2016-10-26 17:22:59 +0900 (9e4169c)
@@ -49,15 +49,11 @@ typedef struct {
 
     unsigned                       bind:1;
     unsigned                       wildcard:1;
-#if (NGX_STREAM_SSL)
     unsigned                       ssl:1;
-#endif
-#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
+#if (NGX_HAVE_INET6)
     unsigned                       ipv6only:1;
 #endif
-#if (NGX_HAVE_REUSEPORT)
     unsigned                       reuseport:1;
-#endif
     unsigned                       so_keepalive:2;
     unsigned                       proxy_protocol:1;
 #if (NGX_HAVE_KEEPALIVE_TUNABLE)
@@ -73,9 +69,7 @@ typedef struct {
 typedef struct {
     ngx_stream_conf_ctx_t         *ctx;
     ngx_str_t                      addr_text;
-#if (NGX_STREAM_SSL)
     unsigned                       ssl:1;
-#endif
     unsigned                       proxy_protocol:1;
 } ngx_stream_addr_conf_t;
 
@@ -115,17 +109,47 @@ typedef struct {
 } ngx_stream_conf_addr_t;
 
 
-typedef ngx_int_t (*ngx_stream_access_pt)(ngx_stream_session_t *s);
+typedef enum {
+    NGX_STREAM_POST_ACCEPT_PHASE = 0,
+    NGX_STREAM_PREACCESS_PHASE,
+    NGX_STREAM_ACCESS_PHASE,
+    NGX_STREAM_SSL_PHASE,
+    NGX_STREAM_PREREAD_PHASE,
+    NGX_STREAM_CONTENT_PHASE,
+    NGX_STREAM_LOG_PHASE
+} ngx_stream_phases;
+
+
+typedef struct ngx_stream_phase_handler_s  ngx_stream_phase_handler_t;
+
+typedef ngx_int_t (*ngx_stream_phase_handler_pt)(ngx_stream_session_t *s,
+    ngx_stream_phase_handler_t *ph);
+typedef ngx_int_t (*ngx_stream_handler_pt)(ngx_stream_session_t *s);
+typedef void (*ngx_stream_content_handler_pt)(ngx_stream_session_t *s);
+
+
+struct ngx_stream_phase_handler_s {
+    ngx_stream_phase_handler_pt    checker;
+    ngx_stream_handler_pt          handler;
+    ngx_uint_t                     next;
+};
+
+
+typedef struct {
+    ngx_stream_phase_handler_t    *handlers;
+} ngx_stream_phase_engine_t;
+
+
+typedef struct {
+    ngx_array_t                    handlers;
+} ngx_stream_phase_t;
 
 
 typedef struct {
     ngx_array_t                    servers;     /* ngx_stream_core_srv_conf_t */
     ngx_array_t                    listen;      /* ngx_stream_listen_t */
 
-    ngx_stream_access_pt           realip_handler;
-    ngx_stream_access_pt           limit_conn_handler;
-    ngx_stream_access_pt           access_handler;
-    ngx_stream_access_pt           access_log_handler;
+    ngx_stream_phase_engine_t      phase_engine;
 
     ngx_hash_t                     variables_hash;
 
@@ -136,14 +160,13 @@ typedef struct {
     ngx_uint_t                     variables_hash_bucket_size;
 
     ngx_hash_keys_arrays_t        *variables_keys;
-} ngx_stream_core_main_conf_t;
-
 
-typedef void (*ngx_stream_handler_pt)(ngx_stream_session_t *s);
+    ngx_stream_phase_t             phases[NGX_STREAM_LOG_PHASE + 1];
+} ngx_stream_core_main_conf_t;
 
 
 typedef struct {
-    ngx_stream_handler_pt          handler;
+    ngx_stream_content_handler_pt  handler;
 
     ngx_stream_conf_ctx_t         *ctx;
 
@@ -151,6 +174,8 @@ typedef struct {
     ngx_uint_t                     line;
 
     ngx_flag_t                     tcp_nodelay;
+    size_t                         preread_buffer_size;
+    ngx_msec_t                     preread_timeout;
 
     ngx_log_t                     *error_log;
 
@@ -189,11 +214,14 @@ struct ngx_stream_session_s {
     u_char                        *captures_data;
 #endif
 
+    ngx_int_t                      phase_handler;
     ngx_uint_t                     status;
 
-#if (NGX_STREAM_SSL)
-    ngx_uint_t                     ssl;  /* unsigned  ssl:1; */
-#endif
+    unsigned                       ssl:1;
+
+    unsigned                       stat_processing:1;
+
+    unsigned                       health_check:1;
 };
 
 
@@ -243,7 +271,20 @@ typedef struct {
         NULL)
 
 
+#define NGX_STREAM_WRITE_BUFFERED  0x10
+
+
+void ngx_stream_core_run_phases(ngx_stream_session_t *s);
+ngx_int_t ngx_stream_core_generic_phase(ngx_stream_session_t *s,
+    ngx_stream_phase_handler_t *ph);
+ngx_int_t ngx_stream_core_preread_phase(ngx_stream_session_t *s,
+    ngx_stream_phase_handler_t *ph);
+ngx_int_t ngx_stream_core_content_phase(ngx_stream_session_t *s,
+    ngx_stream_phase_handler_t *ph);
+
+
 void ngx_stream_init_connection(ngx_connection_t *c);
+void ngx_stream_session_handler(ngx_event_t *rev);
 void ngx_stream_finalize_session(ngx_stream_session_t *s, ngx_uint_t rc);
 
 
@@ -252,4 +293,11 @@ extern ngx_uint_t    ngx_stream_max_module;
 extern ngx_module_t  ngx_stream_core_module;
 
 
+typedef ngx_int_t (*ngx_stream_filter_pt)(ngx_stream_session_t *s,
+    ngx_chain_t *chain, ngx_uint_t from_upstream);
+
+
+extern ngx_stream_filter_pt  ngx_stream_top_filter;
+
+
 #endif /* _NGX_STREAM_H_INCLUDED_ */

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_access_module.c (+9 -2) 97%
===================================================================
--- vendor/nginx-1.11.4/src/stream/ngx_stream_access_module.c    2016-10-26 16:45:24 +0900 (6985d36)
+++ vendor/nginx-1.11.5/src/stream/ngx_stream_access_module.c    2016-10-26 17:22:59 +0900 (1745cdf)
@@ -275,7 +275,7 @@ ngx_stream_access_found(ngx_stream_session_t *s, ngx_uint_t deny)
     if (deny) {
         ngx_log_error(NGX_LOG_ERR, s->connection->log, 0,
                       "access forbidden by rule");
-        return NGX_ABORT;
+        return NGX_STREAM_FORBIDDEN;
     }
 
     return NGX_OK;
@@ -443,10 +443,17 @@ ngx_stream_access_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
 static ngx_int_t
 ngx_stream_access_init(ngx_conf_t *cf)
 {
+    ngx_stream_handler_pt        *h;
     ngx_stream_core_main_conf_t  *cmcf;
 
     cmcf = ngx_stream_conf_get_module_main_conf(cf, ngx_stream_core_module);
-    cmcf->access_handler = ngx_stream_access_handler;
+
+    h = ngx_array_push(&cmcf->phases[NGX_STREAM_ACCESS_PHASE].handlers);
+    if (h == NULL) {
+        return NGX_ERROR;
+    }
+
+    *h = ngx_stream_access_handler;
 
     return NGX_OK;
 }

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_core_module.c (+231 -1) 77%
===================================================================
--- vendor/nginx-1.11.4/src/stream/ngx_stream_core_module.c    2016-10-26 16:45:24 +0900 (1c808ad)
+++ vendor/nginx-1.11.5/src/stream/ngx_stream_core_module.c    2016-10-26 17:22:59 +0900 (f7870ee)
@@ -91,6 +91,20 @@ static ngx_command_t  ngx_stream_core_commands[] = {
       offsetof(ngx_stream_core_srv_conf_t, tcp_nodelay),
       NULL },
 
+    { ngx_string("preread_buffer_size"),
+      NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_TAKE1,
+      ngx_conf_set_size_slot,
+      NGX_STREAM_SRV_CONF_OFFSET,
+      offsetof(ngx_stream_core_srv_conf_t, preread_buffer_size),
+      NULL },
+
+    { ngx_string("preread_timeout"),
+      NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_TAKE1,
+      ngx_conf_set_msec_slot,
+      NGX_STREAM_SRV_CONF_OFFSET,
+      offsetof(ngx_stream_core_srv_conf_t, preread_timeout),
+      NULL },
+
       ngx_null_command
 };
 
@@ -123,6 +137,214 @@ ngx_module_t  ngx_stream_core_module = {
 };
 
 
+void
+ngx_stream_core_run_phases(ngx_stream_session_t *s)
+{
+    ngx_int_t                     rc;
+    ngx_stream_phase_handler_t   *ph;
+    ngx_stream_core_main_conf_t  *cmcf;
+
+    cmcf = ngx_stream_get_module_main_conf(s, ngx_stream_core_module);
+
+    ph = cmcf->phase_engine.handlers;
+
+    while (ph[s->phase_handler].checker) {
+
+        rc = ph[s->phase_handler].checker(s, &ph[s->phase_handler]);
+
+        if (rc == NGX_OK) {
+            return;
+        }
+    }
+}
+
+
+ngx_int_t
+ngx_stream_core_generic_phase(ngx_stream_session_t *s,
+    ngx_stream_phase_handler_t *ph)
+{
+    ngx_int_t  rc;
+
+    /*
+     * generic phase checker,
+     * used by all phases, except for preread and content
+     */
+
+    ngx_log_debug1(NGX_LOG_DEBUG_STREAM, s->connection->log, 0,
+                   "generic phase: %ui", s->phase_handler);
+
+    rc = ph->handler(s);
+
+    if (rc == NGX_OK) {
+        s->phase_handler = ph->next;
+        return NGX_AGAIN;
+    }
+
+    if (rc == NGX_DECLINED) {
+        s->phase_handler++;
+        return NGX_AGAIN;
+    }
+
+    if (rc == NGX_AGAIN || rc == NGX_DONE) {
+        return NGX_OK;
+    }
+
+    if (rc == NGX_ERROR) {
+        rc = NGX_STREAM_INTERNAL_SERVER_ERROR;
+    }
+
+    ngx_stream_finalize_session(s, rc);
+
+    return NGX_OK;
+}
+
+
+ngx_int_t
+ngx_stream_core_preread_phase(ngx_stream_session_t *s,
+    ngx_stream_phase_handler_t *ph)
+{
+    size_t                       size;
+    ssize_t                      n;
+    ngx_int_t                    rc;
+    ngx_connection_t            *c;
+    ngx_stream_core_srv_conf_t  *cscf;
+
+    c = s->connection;
+
+    c->log->action = "prereading client data";
+
+    cscf = ngx_stream_get_module_srv_conf(s, ngx_stream_core_module);
+
+    if (c->read->timedout) {
+        rc = NGX_STREAM_OK;
+
+    } else if (c->read->timer_set) {
+        rc = NGX_AGAIN;
+
+    } else {
+        rc = ph->handler(s);
+    }
+
+    while (rc == NGX_AGAIN) {
+
+        if (c->buffer == NULL) {
+            c->buffer = ngx_create_temp_buf(c->pool, cscf->preread_buffer_size);
+            if (c->buffer == NULL) {
+                rc = NGX_ERROR;
+                break;
+            }
+        }
+
+        size = c->buffer->end - c->buffer->last;
+
+        if (size == 0) {
+            ngx_log_error(NGX_LOG_ERR, c->log, 0, "preread buffer full");
+            rc = NGX_STREAM_BAD_REQUEST;
+            break;
+        }
+
+        if (c->read->eof) {
+            rc = NGX_STREAM_OK;
+            break;
+        }
+
+        if (!c->read->ready) {
+            if (ngx_handle_read_event(c->read, 0) != NGX_OK) {
+                rc = NGX_ERROR;
+                break;
+            }
+
+            if (!c->read->timer_set) {
+                ngx_add_timer(c->read, cscf->preread_timeout);
+            }
+
+            c->read->handler = ngx_stream_session_handler;
+
+            return NGX_OK;
+        }
+
+        n = c->recv(c, c->buffer->last, size);
+
+        if (n == NGX_ERROR) {
+            rc = NGX_STREAM_OK;
+            break;
+        }
+
+        if (n > 0) {
+            c->buffer->last += n;
+        }
+
+        rc = ph->handler(s);
+    }
+
+    if (c->read->timer_set) {
+        ngx_del_timer(c->read);
+    }
+
+    if (rc == NGX_OK) {
+        s->phase_handler = ph->next;
+        return NGX_AGAIN;
+    }
+
+    if (rc == NGX_DECLINED) {
+        s->phase_handler++;
+        return NGX_AGAIN;
+    }
+
+    if (rc == NGX_DONE) {
+        return NGX_OK;
+    }
+
+    if (rc == NGX_ERROR) {
+        rc = NGX_STREAM_INTERNAL_SERVER_ERROR;
+    }
+
+    ngx_stream_finalize_session(s, rc);
+
+    return NGX_OK;
+}
+
+
+ngx_int_t
+ngx_stream_core_content_phase(ngx_stream_session_t *s,
+    ngx_stream_phase_handler_t *ph)
+{
+    int                          tcp_nodelay;
+    ngx_connection_t            *c;
+    ngx_stream_core_srv_conf_t  *cscf;
+
+    c = s->connection;
+
+    c->log->action = NULL;
+
+    cscf = ngx_stream_get_module_srv_conf(s, ngx_stream_core_module);
+
+    if (c->type == SOCK_STREAM
+        && cscf->tcp_nodelay
+        && c->tcp_nodelay == NGX_TCP_NODELAY_UNSET)
+    {
+        ngx_log_debug0(NGX_LOG_DEBUG_STREAM, c->log, 0, "tcp_nodelay");
+
+        tcp_nodelay = 1;
+
+        if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY,
+                       (const void *) &tcp_nodelay, sizeof(int)) == -1)
+        {
+            ngx_connection_error(c, ngx_socket_errno,
+                                 "setsockopt(TCP_NODELAY) failed");
+            ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
+            return NGX_OK;
+        }
+
+        c->tcp_nodelay = NGX_TCP_NODELAY_SET;
+    }
+
+    cscf->handler(s);
+
+    return NGX_OK;
+}
+
+
 static ngx_int_t
 ngx_stream_core_preconfiguration(ngx_conf_t *cf)
 {
@@ -201,6 +423,8 @@ ngx_stream_core_create_srv_conf(ngx_conf_t *cf)
     cscf->resolver_timeout = NGX_CONF_UNSET_MSEC;
     cscf->proxy_protocol_timeout = NGX_CONF_UNSET_MSEC;
     cscf->tcp_nodelay = NGX_CONF_UNSET;
+    cscf->preread_buffer_size = NGX_CONF_UNSET_SIZE;
+    cscf->preread_timeout = NGX_CONF_UNSET_MSEC;
 
     return cscf;
 }
@@ -253,6 +477,12 @@ ngx_stream_core_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
 
     ngx_conf_merge_value(conf->tcp_nodelay, prev->tcp_nodelay, 1);
 
+    ngx_conf_merge_size_value(conf->preread_buffer_size,
+                              prev->preread_buffer_size, 16384);
+
+    ngx_conf_merge_msec_value(conf->preread_timeout,
+                              prev->preread_timeout, 30000);
+
     return NGX_CONF_OK;
 }
 
@@ -394,7 +624,7 @@ ngx_stream_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     ls->wildcard = u.wildcard;
     ls->ctx = cf->ctx;
 
-#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
+#if (NGX_HAVE_INET6)
     ls->ipv6only = 1;
 #endif
 

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_geo_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_geoip_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_handler.c (+30 -166) 66%
===================================================================
--- vendor/nginx-1.11.4/src/stream/ngx_stream_handler.c    2016-10-26 16:45:24 +0900 (6e2ed82)
+++ vendor/nginx-1.11.5/src/stream/ngx_stream_handler.c    2016-10-26 17:22:59 +0900 (669b6a1)
@@ -11,15 +11,10 @@
 #include <ngx_stream.h>
 
 
+static void ngx_stream_log_session(ngx_stream_session_t *s);
 static void ngx_stream_close_connection(ngx_connection_t *c);
 static u_char *ngx_stream_log_error(ngx_log_t *log, u_char *buf, size_t len);
 static void ngx_stream_proxy_protocol_handler(ngx_event_t *rev);
-static void ngx_stream_init_session_handler(ngx_event_t *rev);
-
-#if (NGX_STREAM_SSL)
-static void ngx_stream_ssl_init_connection(ngx_ssl_t *ssl, ngx_connection_t *c);
-static void ngx_stream_ssl_handshake_handler(ngx_connection_t *c);
-#endif
 
 
 void
@@ -134,6 +129,10 @@ ngx_stream_init_connection(ngx_connection_t *c)
     s->ssl = addr_conf->ssl;
 #endif
 
+    if (c->buffer) {
+        s->received += c->buffer->last - c->buffer->pos;
+    }
+
     s->connection = c;
     c->data = s;
 
@@ -150,7 +149,7 @@ ngx_stream_init_connection(ngx_connection_t *c)
     c->log->connection = c->number;
     c->log->handler = ngx_stream_log_error;
     c->log->data = s;
-    c->log->action = "initializing connection";
+    c->log->action = "initializing session";
     c->log_error = NGX_ERROR_INFO;
 
     s->ctx = ngx_pcalloc(c->pool, sizeof(void *) * ngx_stream_max_module);
@@ -175,7 +174,7 @@ ngx_stream_init_connection(ngx_connection_t *c)
     s->start_msec = tp->msec;
 
     rev = c->read;
-    rev->handler = ngx_stream_init_session_handler;
+    rev->handler = ngx_stream_session_handler;
 
     if (addr_conf->proxy_protocol) {
         c->log->action = "reading PROXY protocol";
@@ -275,189 +274,54 @@ ngx_stream_proxy_protocol_handler(ngx_event_t *rev)
         return;
     }
 
-    ngx_stream_init_session_handler(rev);
-}
-
-
-static void
-ngx_stream_init_session_handler(ngx_event_t *rev)
-{
-    int                           tcp_nodelay;
-    ngx_int_t                     rc;
-    ngx_connection_t             *c;
-    ngx_stream_session_t         *s;
-    ngx_stream_core_srv_conf_t   *cscf;
-    ngx_stream_core_main_conf_t  *cmcf;
-
-    c = rev->data;
-    s = c->data;
-
     c->log->action = "initializing session";
 
-    cmcf = ngx_stream_get_module_main_conf(s, ngx_stream_core_module);
-
-    if (cmcf->realip_handler) {
-        rc = cmcf->realip_handler(s);
-
-        if (rc == NGX_ERROR) {
-            ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
-            return;
-        }
-    }
-
-    if (cmcf->limit_conn_handler) {
-        rc = cmcf->limit_conn_handler(s);
-
-        if (rc == NGX_ERROR) {
-            ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
-            return;
-        }
-
-        if (rc == NGX_ABORT) {
-            ngx_stream_finalize_session(s, NGX_STREAM_SERVICE_UNAVAILABLE);
-            return;
-        }
-    }
-
-    if (cmcf->access_handler) {
-        rc = cmcf->access_handler(s);
-
-        if (rc == NGX_ERROR) {
-            ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
-            return;
-        }
-
-        if (rc == NGX_ABORT) {
-            ngx_stream_finalize_session(s, NGX_STREAM_FORBIDDEN);
-            return;
-        }
-    }
-
-    cscf = ngx_stream_get_module_srv_conf(s, ngx_stream_core_module);
-
-    if (c->type == SOCK_STREAM
-        && cscf->tcp_nodelay
-        && c->tcp_nodelay == NGX_TCP_NODELAY_UNSET)
-    {
-        ngx_log_debug0(NGX_LOG_DEBUG_STREAM, c->log, 0, "tcp_nodelay");
-
-        tcp_nodelay = 1;
-
-        if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY,
-                       (const void *) &tcp_nodelay, sizeof(int)) == -1)
-        {
-            ngx_connection_error(c, ngx_socket_errno,
-                                 "setsockopt(TCP_NODELAY) failed");
-            ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
-            return;
-        }
-
-        c->tcp_nodelay = NGX_TCP_NODELAY_SET;
-    }
-
-
-#if (NGX_STREAM_SSL)
-    {
-    ngx_stream_ssl_conf_t  *sslcf;
-
-    sslcf = ngx_stream_get_module_srv_conf(s, ngx_stream_ssl_module);
-
-    if (s->ssl) {
-        c->log->action = "SSL handshaking";
-
-        if (sslcf->ssl.ctx == NULL) {
-            ngx_log_error(NGX_LOG_ERR, c->log, 0,
-                          "no \"ssl_certificate\" is defined "
-                          "in server listening on SSL port");
-            ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
-            return;
-        }
-
-        ngx_stream_ssl_init_connection(&sslcf->ssl, c);
-        return;
-    }
-    }
-#endif
-
-    c->log->action = "handling client connection";
-
-    cscf->handler(s);
+    ngx_stream_session_handler(rev);
 }
 
 
-#if (NGX_STREAM_SSL)
-
-static void
-ngx_stream_ssl_init_connection(ngx_ssl_t *ssl, ngx_connection_t *c)
+void
+ngx_stream_session_handler(ngx_event_t *rev)
 {
-    ngx_stream_session_t   *s;
-    ngx_stream_ssl_conf_t  *sslcf;
+    ngx_connection_t      *c;
+    ngx_stream_session_t  *s;
 
+    c = rev->data;
     s = c->data;
 
-    if (ngx_ssl_create_connection(ssl, c, 0) == NGX_ERROR) {
-        ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
-        return;
-    }
-
-    if (ngx_ssl_handshake(c) == NGX_AGAIN) {
-        sslcf = ngx_stream_get_module_srv_conf(s, ngx_stream_ssl_module);
-
-        ngx_add_timer(c->read, sslcf->handshake_timeout);
-
-        c->ssl->handler = ngx_stream_ssl_handshake_handler;
-
-        return;
-    }
-
-    ngx_stream_ssl_handshake_handler(c);
+    ngx_stream_core_run_phases(s);
 }
 
 
-static void
-ngx_stream_ssl_handshake_handler(ngx_connection_t *c)
+void
+ngx_stream_finalize_session(ngx_stream_session_t *s, ngx_uint_t rc)
 {
-    ngx_stream_session_t        *s;
-    ngx_stream_core_srv_conf_t  *cscf;
-
-    if (!c->ssl->handshaked) {
-        ngx_stream_finalize_session(c->data, NGX_STREAM_INTERNAL_SERVER_ERROR);
-        return;
-    }
-
-    if (c->read->timer_set) {
-        ngx_del_timer(c->read);
-    }
-
-    c->log->action = "handling client connection";
+    ngx_log_debug1(NGX_LOG_DEBUG_STREAM, s->connection->log, 0,
+                   "finalize stream session: %i", rc);
 
-    s = c->data;
+    s->status = rc;
 
-    cscf = ngx_stream_get_module_srv_conf(s, ngx_stream_core_module);
+    ngx_stream_log_session(s);
 
-    cscf->handler(s);
+    ngx_stream_close_connection(s->connection);
 }
 
-#endif
-
 
-void
-ngx_stream_finalize_session(ngx_stream_session_t *s, ngx_uint_t rc)
+static void
+ngx_stream_log_session(ngx_stream_session_t *s)
 {
+    ngx_uint_t                    i, n;
+    ngx_stream_handler_pt        *log_handler;
     ngx_stream_core_main_conf_t  *cmcf;
 
-    ngx_log_debug1(NGX_LOG_DEBUG_STREAM, s->connection->log, 0,
-                   "finalize stream session: %i", rc);
-
-    s->status = rc;
-
     cmcf = ngx_stream_get_module_main_conf(s, ngx_stream_core_module);
 
-    if (cmcf->access_log_handler) {
-        (void) cmcf->access_log_handler(s);
-    }
+    log_handler = cmcf->phases[NGX_STREAM_LOG_PHASE].handlers.elts;
+    n = cmcf->phases[NGX_STREAM_LOG_PHASE].handlers.nelts;
 
-    ngx_stream_close_connection(s->connection);
+    for (i = 0; i < n; i++) {
+        log_handler[i](s);
+    }
 }
 
 

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_limit_conn_module.c (+9 -3) 98%
===================================================================
--- vendor/nginx-1.11.4/src/stream/ngx_stream_limit_conn_module.c    2016-10-26 16:45:24 +0900 (40eca94)
+++ vendor/nginx-1.11.5/src/stream/ngx_stream_limit_conn_module.c    2016-10-26 17:22:59 +0900 (b64a426)
@@ -178,7 +178,7 @@ ngx_stream_limit_conn_handler(ngx_stream_session_t *s)
             if (node == NULL) {
                 ngx_shmtx_unlock(&shpool->mutex);
                 ngx_stream_limit_conn_cleanup_all(s->connection->pool);
-                return NGX_ABORT;
+                return NGX_STREAM_SERVICE_UNAVAILABLE;
             }
 
             lc = (ngx_stream_limit_conn_node_t *) &node->color;
@@ -203,7 +203,7 @@ ngx_stream_limit_conn_handler(ngx_stream_session_t *s)
                               &limits[i].shm_zone->shm.name);
 
                 ngx_stream_limit_conn_cleanup_all(s->connection->pool);
-                return NGX_ABORT;
+                return NGX_STREAM_SERVICE_UNAVAILABLE;
             }
 
             lc->conn++;
@@ -630,11 +630,17 @@ ngx_stream_limit_conn(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 static ngx_int_t
 ngx_stream_limit_conn_init(ngx_conf_t *cf)
 {
+    ngx_stream_handler_pt        *h;
     ngx_stream_core_main_conf_t  *cmcf;
 
     cmcf = ngx_stream_conf_get_module_main_conf(cf, ngx_stream_core_module);
 
-    cmcf->limit_conn_handler = ngx_stream_limit_conn_handler;
+    h = ngx_array_push(&cmcf->phases[NGX_STREAM_PREACCESS_PHASE].handlers);
+    if (h == NULL) {
+        return NGX_ERROR;
+    }
+
+    *h = ngx_stream_limit_conn_handler;
 
     return NGX_OK;
 }

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_log_module.c (+7 -1) 99%
===================================================================
--- vendor/nginx-1.11.4/src/stream/ngx_stream_log_module.c    2016-10-26 16:45:24 +0900 (4affbdf)
+++ vendor/nginx-1.11.5/src/stream/ngx_stream_log_module.c    2016-10-26 17:22:59 +0900 (26e6d22)
@@ -1464,11 +1464,17 @@ ngx_stream_log_open_file_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 static ngx_int_t
 ngx_stream_log_init(ngx_conf_t *cf)
 {
+    ngx_stream_handler_pt        *h;
     ngx_stream_core_main_conf_t  *cmcf;
 
     cmcf = ngx_stream_conf_get_module_main_conf(cf, ngx_stream_core_module);
 
-    cmcf->access_log_handler = ngx_stream_log_handler;
+    h = ngx_array_push(&cmcf->phases[NGX_STREAM_LOG_PHASE].handlers);
+    if (h == NULL) {
+        return NGX_ERROR;
+    }
+
+    *h = ngx_stream_log_handler;
 
     return NGX_OK;
 }

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_map_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_proxy_module.c (+140 -78) 93%
===================================================================
--- vendor/nginx-1.11.4/src/stream/ngx_stream_proxy_module.c    2016-10-26 16:45:24 +0900 (ed802e7)
+++ vendor/nginx-1.11.5/src/stream/ngx_stream_proxy_module.c    2016-10-26 17:22:59 +0900 (4231f97)
@@ -84,10 +84,10 @@ static char *ngx_stream_proxy_pass(ngx_conf_t *cf, ngx_command_t *cmd,
     void *conf);
 static char *ngx_stream_proxy_bind(ngx_conf_t *cf, ngx_command_t *cmd,
     void *conf);
-static ngx_int_t ngx_stream_proxy_send_proxy_protocol(ngx_stream_session_t *s);
 
 #if (NGX_STREAM_SSL)
 
+static ngx_int_t ngx_stream_proxy_send_proxy_protocol(ngx_stream_session_t *s);
 static char *ngx_stream_proxy_ssl_password_file(ngx_conf_t *cf,
     ngx_command_t *cmd, void *conf);
 static void ngx_stream_proxy_ssl_init_connection(ngx_stream_session_t *s);
@@ -385,8 +385,6 @@ ngx_stream_proxy_handler(ngx_stream_session_t *s)
     }
 
     u->peer.type = c->type;
-
-    u->proxy_protocol = pscf->proxy_protocol;
     u->start_sec = ngx_time();
 
     c->write->handler = ngx_stream_proxy_downstream_handler;
@@ -411,28 +409,6 @@ ngx_stream_proxy_handler(ngx_stream_session_t *s)
         u->downstream_buf.pos = p;
         u->downstream_buf.last = p;
 
-        if (u->proxy_protocol
-#if (NGX_STREAM_SSL)
-            && pscf->ssl == NULL
-#endif
-            && pscf->buffer_size >= NGX_PROXY_PROTOCOL_MAX_HEADER)
-        {
-            /* optimization for a typical case */
-
-            ngx_log_debug0(NGX_LOG_DEBUG_STREAM, c->log, 0,
-                           "stream proxy send PROXY protocol header");
-
-            p = ngx_proxy_protocol_write(c, u->downstream_buf.last,
-                                         u->downstream_buf.end);
-            if (p == NULL) {
-                ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
-                return;
-            }
-
-            u->downstream_buf.last = p;
-            u->proxy_protocol = 0;
-        }
-
         if (c->read->ready) {
             ngx_post_event(c->read, &ngx_posted_events);
         }
@@ -545,6 +521,8 @@ found:
         return;
     }
 
+    u->upstream = uscf;
+
 #if (NGX_STREAM_SSL)
     u->ssl_name = uscf->host;
 #endif
@@ -682,8 +660,13 @@ ngx_stream_proxy_connect(ngx_stream_session_t *s)
 
     c->log->action = "connecting to upstream";
 
+    pscf = ngx_stream_get_module_srv_conf(s, ngx_stream_proxy_module);
+
     u = s->upstream;
 
+    u->connected = 0;
+    u->proxy_protocol = pscf->proxy_protocol;
+
     if (u->state) {
         u->state->response_time = ngx_current_msec - u->state->response_time;
     }
@@ -740,8 +723,6 @@ ngx_stream_proxy_connect(ngx_stream_session_t *s)
     pc->read->handler = ngx_stream_proxy_connect_handler;
     pc->write->handler = ngx_stream_proxy_connect_handler;
 
-    pscf = ngx_stream_get_module_srv_conf(s, ngx_stream_proxy_module);
-
     ngx_add_timer(pc->write, pscf->connect_timeout);
 }
 
@@ -751,6 +732,7 @@ ngx_stream_proxy_init_upstream(ngx_stream_session_t *s)
 {
     int                           tcp_nodelay;
     u_char                       *p;
+    ngx_chain_t                  *cl;
     ngx_connection_t             *c, *pc;
     ngx_log_handler_pt            handler;
     ngx_stream_upstream_t        *u;
@@ -782,21 +764,26 @@ ngx_stream_proxy_init_upstream(ngx_stream_session_t *s)
         pc->tcp_nodelay = NGX_TCP_NODELAY_SET;
     }
 
-    if (u->proxy_protocol) {
-        if (ngx_stream_proxy_send_proxy_protocol(s) != NGX_OK) {
-            return;
-        }
-
-        u->proxy_protocol = 0;
-    }
-
     pscf = ngx_stream_get_module_srv_conf(s, ngx_stream_proxy_module);
 
 #if (NGX_STREAM_SSL)
-    if (pc->type == SOCK_STREAM && pscf->ssl && pc->ssl == NULL) {
-        ngx_stream_proxy_ssl_init_connection(s);
-        return;
+
+    if (pc->type == SOCK_STREAM && pscf->ssl) {
+
+        if (u->proxy_protocol) {
+            if (ngx_stream_proxy_send_proxy_protocol(s) != NGX_OK) {
+                return;
+            }
+
+            u->proxy_protocol = 0;
+        }
+
+        if (pc->ssl == NULL) {
+            ngx_stream_proxy_ssl_init_connection(s);
+            return;
+        }
     }
+
 #endif
 
     c = s->connection;
@@ -838,14 +825,66 @@ ngx_stream_proxy_init_upstream(ngx_stream_session_t *s)
         u->upstream_buf.last = p;
     }
 
-    if (c->type == SOCK_DGRAM) {
-        s->received = c->buffer->last - c->buffer->pos;
-        u->downstream_buf = *c->buffer;
+    if (c->buffer && c->buffer->pos < c->buffer->last) {
+        ngx_log_debug1(NGX_LOG_DEBUG_STREAM, c->log, 0,
+                       "stream proxy add preread buffer: %uz",
+                       c->buffer->last - c->buffer->pos);
 
-        if (pscf->responses == 0) {
-            pc->read->ready = 0;
-            pc->read->eof = 1;
+        cl = ngx_chain_get_free_buf(c->pool, &u->free);
+        if (cl == NULL) {
+            ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
+            return;
         }
+
+        *cl->buf = *c->buffer;
+
+        cl->buf->tag = (ngx_buf_tag_t) &ngx_stream_proxy_module;
+        cl->buf->flush = 1;
+        cl->buf->last_buf = (c->type == SOCK_DGRAM);
+
+        cl->next = u->upstream_out;
+        u->upstream_out = cl;
+    }
+
+    if (u->proxy_protocol) {
+        ngx_log_debug0(NGX_LOG_DEBUG_STREAM, c->log, 0,
+                       "stream proxy add PROXY protocol header");
+
+        cl = ngx_chain_get_free_buf(c->pool, &u->free);
+        if (cl == NULL) {
+            ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
+            return;
+        }
+
+        p = ngx_pnalloc(c->pool, NGX_PROXY_PROTOCOL_MAX_HEADER);
+        if (p == NULL) {
+            ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
+            return;
+        }
+
+        cl->buf->pos = p;
+
+        p = ngx_proxy_protocol_write(c, p, p + NGX_PROXY_PROTOCOL_MAX_HEADER);
+        if (p == NULL) {
+            ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
+            return;
+        }
+
+        cl->buf->last = p;
+        cl->buf->temporary = 1;
+        cl->buf->flush = 0;
+        cl->buf->last_buf = 0;
+        cl->buf->tag = (ngx_buf_tag_t) &ngx_stream_proxy_module;
+
+        cl->next = u->upstream_out;
+        u->upstream_out = cl;
+
+        u->proxy_protocol = 0;
+    }
+
+    if (c->type == SOCK_DGRAM && pscf->responses == 0) {
+        pc->read->ready = 0;
+        pc->read->eof = 1;
     }
 
     u->connected = 1;
@@ -861,6 +900,8 @@ ngx_stream_proxy_init_upstream(ngx_stream_session_t *s)
 }
 
 
+#if (NGX_STREAM_SSL)
+
 static ngx_int_t
 ngx_stream_proxy_send_proxy_protocol(ngx_stream_session_t *s)
 {
@@ -931,8 +972,6 @@ ngx_stream_proxy_send_proxy_protocol(ngx_stream_session_t *s)
 }
 
 
-#if (NGX_STREAM_SSL)
-
 static char *
 ngx_stream_proxy_ssl_password_file(ngx_conf_t *cf, ngx_command_t *cmd,
     void *conf)
@@ -1412,8 +1451,10 @@ ngx_stream_proxy_process(ngx_stream_session_t *s, ngx_uint_t from_upstream,
     size_t                        size, limit_rate;
     ssize_t                       n;
     ngx_buf_t                    *b;
+    ngx_int_t                     rc;
     ngx_uint_t                    flags;
     ngx_msec_t                    delay;
+    ngx_chain_t                  *cl, **ll, **out, **busy;
     ngx_connection_t             *c, *pc, *src, *dst;
     ngx_log_handler_pt            handler;
     ngx_stream_upstream_t        *u;
@@ -1447,6 +1488,8 @@ ngx_stream_proxy_process(ngx_stream_session_t *s, ngx_uint_t from_upstream,
         b = &u->upstream_buf;
         limit_rate = pscf->download_rate;
         received = &u->received;
+        out = &u->downstream_out;
+        busy = &u->downstream_busy;
 
     } else {
         src = c;
@@ -1454,24 +1497,18 @@ ngx_stream_proxy_process(ngx_stream_session_t *s, ngx_uint_t from_upstream,
         b = &u->downstream_buf;
         limit_rate = pscf->upload_rate;
         received = &s->received;
+        out = &u->upstream_out;
+        busy = &u->upstream_busy;
     }
 
     for ( ;; ) {
 
-        if (do_write) {
-
-            size = b->last - b->pos;
+        if (do_write && dst) {
 
-            if (size && dst && dst->write->ready) {
-
-                n = dst->send(dst, b->pos, size);
-
-                if (n == NGX_AGAIN && dst->shared) {
-                    /* cannot wait on a shared socket */
-                    n = NGX_ERROR;
-                }
+            if (*out || *busy || dst->buffered) {
+                rc = ngx_stream_top_filter(s, *out, from_upstream);
 
-                if (n == NGX_ERROR) {
+                if (rc == NGX_ERROR) {
                     if (c->type == SOCK_DGRAM && !from_upstream) {
                         ngx_stream_proxy_next_upstream(s);
                         return;
@@ -1481,13 +1518,12 @@ ngx_stream_proxy_process(ngx_stream_session_t *s, ngx_uint_t from_upstream,
                     return;
                 }
 
-                if (n > 0) {
-                    b->pos += n;
+                ngx_chain_update_chains(c->pool, &u->free, busy, out,
+                                      (ngx_buf_tag_t) &ngx_stream_proxy_module);
 
-                    if (b->pos == b->last) {
-                        b->pos = b->start;
-                        b->last = b->start;
-                    }
+                if (*busy == NULL) {
+                    b->pos = b->start;
+                    b->last = b->start;
                 }
             }
         }
@@ -1514,11 +1550,21 @@ ngx_stream_proxy_process(ngx_stream_session_t *s, ngx_uint_t from_upstream,
 
             n = src->recv(src, b->last, size);
 
-            if (n == NGX_AGAIN || n == 0) {
+            if (n == NGX_AGAIN) {
                 break;
             }
 
-            if (n > 0) {
+            if (n == NGX_ERROR) {
+                if (c->type == SOCK_DGRAM && u->received == 0) {
+                    ngx_stream_proxy_next_upstream(s);
+                    return;
+                }
+
+                src->read->eof = 1;
+                n = 0;
+            }
+
+            if (n >= 0) {
                 if (limit_rate) {
                     delay = (ngx_msec_t) (n * 1000 / limit_rate);
 
@@ -1541,27 +1587,37 @@ ngx_stream_proxy_process(ngx_stream_session_t *s, ngx_uint_t from_upstream,
                     src->read->eof = 1;
                 }
 
+                for (ll = out; *ll; ll = &(*ll)->next) { /* void */ }
+
+                cl = ngx_chain_get_free_buf(c->pool, &u->free);
+                if (cl == NULL) {
+                    ngx_stream_proxy_finalize(s,
+                                              NGX_STREAM_INTERNAL_SERVER_ERROR);
+                    return;
+                }
+
+                *ll = cl;
+
+                cl->buf->pos = b->last;
+                cl->buf->last = b->last + n;
+                cl->buf->tag = (ngx_buf_tag_t) &ngx_stream_proxy_module;
+
+                cl->buf->temporary = (n ? 1 : 0);
+                cl->buf->last_buf = src->read->eof;
+                cl->buf->flush = 1;
+
                 *received += n;
                 b->last += n;
                 do_write = 1;
 
                 continue;
             }
-
-            if (n == NGX_ERROR) {
-                if (c->type == SOCK_DGRAM && u->received == 0) {
-                    ngx_stream_proxy_next_upstream(s);
-                    return;
-                }
-
-                src->read->eof = 1;
-            }
         }
 
         break;
     }
 
-    if (src->read->eof && (b->pos == b->last || (dst && dst->read->eof))) {
+    if (src->read->eof && dst && (dst->read->eof || !dst->buffered)) {
         handler = c->log->handler;
         c->log->handler = NULL;
 
@@ -1614,6 +1670,14 @@ ngx_stream_proxy_next_upstream(ngx_stream_session_t *s)
                    "stream proxy next upstream");
 
     u = s->upstream;
+    pc = u->peer.connection;
+
+    if (u->upstream_out || u->upstream_busy || (pc && pc->buffered)) {
+        ngx_log_error(NGX_LOG_ERR, s->connection->log, 0,
+                      "pending buffers on next upstream");
+        ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
+        return;
+    }
 
     if (u->peer.sockaddr) {
         u->peer.free(&u->peer, u->peer.data, NGX_PEER_FAILED);
@@ -1632,8 +1696,6 @@ ngx_stream_proxy_next_upstream(ngx_stream_session_t *s)
         return;
     }
 
-    pc = u->peer.connection;
-
     if (pc) {
         ngx_log_debug1(NGX_LOG_DEBUG_STREAM, s->connection->log, 0,
                        "close proxy upstream connection: %d", pc->fd);

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_realip_module.c (+7 -1) 97%
===================================================================
--- vendor/nginx-1.11.4/src/stream/ngx_stream_realip_module.c    2016-10-26 16:45:24 +0900 (8ce05a0)
+++ vendor/nginx-1.11.5/src/stream/ngx_stream_realip_module.c    2016-10-26 17:22:59 +0900 (0740431)
@@ -279,11 +279,17 @@ ngx_stream_realip_add_variables(ngx_conf_t *cf)
 static ngx_int_t
 ngx_stream_realip_init(ngx_conf_t *cf)
 {
+    ngx_stream_handler_pt        *h;
     ngx_stream_core_main_conf_t  *cmcf;
 
     cmcf = ngx_stream_conf_get_module_main_conf(cf, ngx_stream_core_module);
 
-    cmcf->realip_handler = ngx_stream_realip_handler;
+    h = ngx_array_push(&cmcf->phases[NGX_STREAM_POST_ACCEPT_PHASE].handlers);
+    if (h == NULL) {
+        return NGX_ERROR;
+    }
+
+    *h = ngx_stream_realip_handler;
 
     return NGX_OK;
 }

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_return_module.c (+33 -22) 81%
===================================================================
--- vendor/nginx-1.11.4/src/stream/ngx_stream_return_module.c    2016-10-26 16:45:24 +0900 (c22087f)
+++ vendor/nginx-1.11.5/src/stream/ngx_stream_return_module.c    2016-10-26 17:22:59 +0900 (9301b02)
@@ -11,12 +11,12 @@
 
 
 typedef struct {
-    ngx_stream_complex_value_t  text;
+    ngx_stream_complex_value_t   text;
 } ngx_stream_return_srv_conf_t;
 
 
 typedef struct {
-    ngx_buf_t                   buf;
+    ngx_chain_t                 *out;
 } ngx_stream_return_ctx_t;
 
 
@@ -72,6 +72,7 @@ static void
 ngx_stream_return_handler(ngx_stream_session_t *s)
 {
     ngx_str_t                      text;
+    ngx_buf_t                     *b;
     ngx_connection_t              *c;
     ngx_stream_return_ctx_t       *ctx;
     ngx_stream_return_srv_conf_t  *rscf;
@@ -103,8 +104,25 @@ ngx_stream_return_handler(ngx_stream_session_t *s)
 
     ngx_stream_set_ctx(s, ctx, ngx_stream_return_module);
 
-    ctx->buf.pos = text.data;
-    ctx->buf.last = text.data + text.len;
+    b = ngx_calloc_buf(c->pool);
+    if (b == NULL) {
+        ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
+        return;
+    }
+
+    b->memory = 1;
+    b->pos = text.data;
+    b->last = text.data + text.len;
+    b->last_buf = 1;
+
+    ctx->out = ngx_alloc_chain_link(c->pool);
+    if (ctx->out == NULL) {
+        ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
+        return;
+    }
+
+    ctx->out->buf = b;
+    ctx->out->next = NULL;
 
     c->write->handler = ngx_stream_return_write_handler;
 
@@ -115,8 +133,6 @@ ngx_stream_return_handler(ngx_stream_session_t *s)
 static void
 ngx_stream_return_write_handler(ngx_event_t *ev)
 {
-    ssize_t                   n;
-    ngx_buf_t                *b;
     ngx_connection_t         *c;
     ngx_stream_session_t     *s;
     ngx_stream_return_ctx_t  *ctx;
@@ -130,25 +146,20 @@ ngx_stream_return_write_handler(ngx_event_t *ev)
         return;
     }
 
-    if (ev->ready) {
-        ctx = ngx_stream_get_module_ctx(s, ngx_stream_return_module);
-
-        b = &ctx->buf;
+    ctx = ngx_stream_get_module_ctx(s, ngx_stream_return_module);
 
-        n = c->send(c, b->pos, b->last - b->pos);
-        if (n == NGX_ERROR) {
-            ngx_stream_finalize_session(s, NGX_STREAM_OK);
-            return;
-        }
+    if (ngx_stream_top_filter(s, ctx->out, 1) == NGX_ERROR) {
+        ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
+        return;
+    }
 
-        if (n > 0) {
-            b->pos += n;
+    ctx->out = NULL;
 
-            if (b->pos == b->last) {
-                ngx_stream_finalize_session(s, NGX_STREAM_OK);
-                return;
-            }
-        }
+    if (!c->buffered) {
+        ngx_log_debug0(NGX_LOG_DEBUG_STREAM, c->log, 0,
+                       "stream return done sending");
+        ngx_stream_finalize_session(s, NGX_STREAM_OK);
+        return;
     }
 
     if (ngx_handle_write_event(ev, 0) != NGX_OK) {

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_script.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_script.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_split_clients_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_ssl_module.c (+107 -1) 86%
===================================================================
--- vendor/nginx-1.11.4/src/stream/ngx_stream_ssl_module.c    2016-10-26 16:45:24 +0900 (2661220)
+++ vendor/nginx-1.11.5/src/stream/ngx_stream_ssl_module.c    2016-10-26 17:22:59 +0900 (d00718b)
@@ -18,6 +18,10 @@ typedef ngx_int_t (*ngx_ssl_variable_handler_pt)(ngx_connection_t *c,
 #define NGX_DEFAULT_ECDH_CURVE  "auto"
 
 
+static ngx_int_t ngx_stream_ssl_handler(ngx_stream_session_t *s);
+static ngx_int_t ngx_stream_ssl_init_connection(ngx_ssl_t *ssl,
+    ngx_connection_t *c);
+static void ngx_stream_ssl_handshake_handler(ngx_connection_t *c);
 static ngx_int_t ngx_stream_ssl_static_variable(ngx_stream_session_t *s,
     ngx_stream_variable_value_t *v, uintptr_t data);
 static ngx_int_t ngx_stream_ssl_variable(ngx_stream_session_t *s,
@@ -32,6 +36,7 @@ static char *ngx_stream_ssl_password_file(ngx_conf_t *cf, ngx_command_t *cmd,
     void *conf);
 static char *ngx_stream_ssl_session_cache(ngx_conf_t *cf, ngx_command_t *cmd,
     void *conf);
+static ngx_int_t ngx_stream_ssl_init(ngx_conf_t *cf);
 
 
 static ngx_conf_bitmask_t  ngx_stream_ssl_protocols[] = {
@@ -143,7 +148,7 @@ static ngx_command_t  ngx_stream_ssl_commands[] = {
 
 static ngx_stream_module_t  ngx_stream_ssl_module_ctx = {
     ngx_stream_ssl_add_variables,          /* preconfiguration */
-    NULL,                                  /* postconfiguration */
+    ngx_stream_ssl_init,                   /* postconfiguration */
 
     NULL,                                  /* create main configuration */
     NULL,                                  /* init main configuration */
@@ -194,6 +199,88 @@ static ngx_str_t ngx_stream_ssl_sess_id_ctx = ngx_string("STREAM");
 
 
 static ngx_int_t
+ngx_stream_ssl_handler(ngx_stream_session_t *s)
+{
+    ngx_connection_t       *c;
+    ngx_stream_ssl_conf_t  *sslcf;
+
+    c = s->connection;
+
+    sslcf = ngx_stream_get_module_srv_conf(s, ngx_stream_ssl_module);
+
+    if (s->ssl && c->ssl == NULL) {
+        c->log->action = "SSL handshaking";
+
+        if (sslcf->ssl.ctx == NULL) {
+            ngx_log_error(NGX_LOG_ERR, c->log, 0,
+                          "no \"ssl_certificate\" is defined "
+                          "in server listening on SSL port");
+            return NGX_ERROR;
+        }
+
+        return ngx_stream_ssl_init_connection(&sslcf->ssl, c);
+    }
+
+    return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_stream_ssl_init_connection(ngx_ssl_t *ssl, ngx_connection_t *c)
+{
+    ngx_int_t               rc;
+    ngx_stream_session_t   *s;
+    ngx_stream_ssl_conf_t  *sslcf;
+
+    s = c->data;
+
+    if (ngx_ssl_create_connection(ssl, c, 0) == NGX_ERROR) {
+        return NGX_ERROR;
+    }
+
+    rc = ngx_ssl_handshake(c);
+
+    if (rc == NGX_ERROR) {
+        return NGX_ERROR;
+    }
+
+    if (rc == NGX_AGAIN) {
+        sslcf = ngx_stream_get_module_srv_conf(s, ngx_stream_ssl_module);
+
+        ngx_add_timer(c->read, sslcf->handshake_timeout);
+
+        c->ssl->handler = ngx_stream_ssl_handshake_handler;
+
+        return NGX_AGAIN;
+    }
+
+    /* rc == NGX_OK */
+
+    return NGX_OK;
+}
+
+
+static void
+ngx_stream_ssl_handshake_handler(ngx_connection_t *c)
+{
+    ngx_stream_session_t  *s;
+
+    s = c->data;
+
+    if (!c->ssl->handshaked) {
+        ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
+        return;
+    }
+
+    if (c->read->timer_set) {
+        ngx_del_timer(c->read);
+    }
+
+    ngx_stream_core_run_phases(s);
+}
+
+
+static ngx_int_t
 ngx_stream_ssl_static_variable(ngx_stream_session_t *s,
     ngx_stream_variable_value_t *v, uintptr_t data)
 {
@@ -565,3 +652,22 @@ invalid:
 
     return NGX_CONF_ERROR;
 }
+
+
+static ngx_int_t
+ngx_stream_ssl_init(ngx_conf_t *cf)
+{
+    ngx_stream_handler_pt        *h;
+    ngx_stream_core_main_conf_t  *cmcf;
+
+    cmcf = ngx_stream_conf_get_module_main_conf(cf, ngx_stream_core_module);
+
+    h = ngx_array_push(&cmcf->phases[NGX_STREAM_SSL_PHASE].handlers);
+    if (h == NULL) {
+        return NGX_ERROR;
+    }
+
+    *h = ngx_stream_ssl_handler;
+
+    return NGX_OK;
+}

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_ssl_module.h (+0 -0) 100%
===================================================================

  Added: vendor/nginx-1.11.5/src/stream/ngx_stream_ssl_preread_module.c (+449 -0) 100644
===================================================================
--- /dev/null
+++ vendor/nginx-1.11.5/src/stream/ngx_stream_ssl_preread_module.c    2016-10-26 17:22:59 +0900 (e26c518)
@@ -0,0 +1,449 @@
+
+/*
+ * Copyright (C) Nginx, Inc.
+ */
+
+
+#include <ngx_config.h>
+#include <ngx_core.h>
+#include <ngx_stream.h>
+
+
+typedef struct {
+    ngx_flag_t      enabled;
+} ngx_stream_ssl_preread_srv_conf_t;
+
+
+typedef struct {
+    size_t          left;
+    size_t          size;
+    u_char         *pos;
+    u_char         *dst;
+    u_char          buf[4];
+    ngx_str_t       host;
+    ngx_log_t      *log;
+    ngx_pool_t     *pool;
+    ngx_uint_t      state;
+} ngx_stream_ssl_preread_ctx_t;
+
+
+static ngx_int_t ngx_stream_ssl_preread_handler(ngx_stream_session_t *s);
+static ngx_int_t ngx_stream_ssl_preread_parse_record(
+    ngx_stream_ssl_preread_ctx_t *ctx, u_char *pos, u_char *last);
+static ngx_int_t ngx_stream_ssl_preread_server_name_variable(
+    ngx_stream_session_t *s, ngx_stream_variable_value_t *v, uintptr_t data);
+static ngx_int_t ngx_stream_ssl_preread_add_variables(ngx_conf_t *cf);
+static void *ngx_stream_ssl_preread_create_srv_conf(ngx_conf_t *cf);
+static char *ngx_stream_ssl_preread_merge_srv_conf(ngx_conf_t *cf, void *parent,
+    void *child);
+static ngx_int_t ngx_stream_ssl_preread_init(ngx_conf_t *cf);
+
+
+static ngx_command_t  ngx_stream_ssl_preread_commands[] = {
+
+    { ngx_string("ssl_preread"),
+      NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_FLAG,
+      ngx_conf_set_flag_slot,
+      NGX_STREAM_SRV_CONF_OFFSET,
+      offsetof(ngx_stream_ssl_preread_srv_conf_t, enabled),
+      NULL },
+
+      ngx_null_command
+};
+
+
+static ngx_stream_module_t  ngx_stream_ssl_preread_module_ctx = {
+    ngx_stream_ssl_preread_add_variables,   /* preconfiguration */
+    ngx_stream_ssl_preread_init,            /* postconfiguration */
+
+    NULL,                                   /* create main configuration */
+    NULL,                                   /* init main configuration */
+
+    ngx_stream_ssl_preread_create_srv_conf, /* create server configuration */
+    ngx_stream_ssl_preread_merge_srv_conf   /* merge server configuration */
+};
+
+
+ngx_module_t  ngx_stream_ssl_preread_module = {
+    NGX_MODULE_V1,
+    &ngx_stream_ssl_preread_module_ctx,     /* module context */
+    ngx_stream_ssl_preread_commands,        /* module directives */
+    NGX_STREAM_MODULE,                      /* module type */
+    NULL,                                   /* init master */
+    NULL,                                   /* init module */
+    NULL,                                   /* init process */
+    NULL,                                   /* init thread */
+    NULL,                                   /* exit thread */
+    NULL,                                   /* exit process */
+    NULL,                                   /* exit master */
+    NGX_MODULE_V1_PADDING
+};
+
+
+static ngx_stream_variable_t  ngx_stream_ssl_preread_vars[] = {
+
+    { ngx_string("ssl_preread_server_name"), NULL,
+      ngx_stream_ssl_preread_server_name_variable, 0, 0, 0 },
+
+    { ngx_null_string, NULL, NULL, 0, 0, 0 }
+};
+
+
+static ngx_int_t
+ngx_stream_ssl_preread_handler(ngx_stream_session_t *s)
+{
+    u_char                             *last, *p;
+    size_t                              len;
+    ngx_int_t                           rc;
+    ngx_connection_t                   *c;
+    ngx_stream_ssl_preread_ctx_t       *ctx;
+    ngx_stream_ssl_preread_srv_conf_t  *sscf;
+
+    c = s->connection;
+
+    ngx_log_debug0(NGX_LOG_DEBUG_STREAM, c->log, 0, "ssl preread handler");
+
+    sscf = ngx_stream_get_module_srv_conf(s, ngx_stream_ssl_preread_module);
+
+    if (!sscf->enabled) {
+        return NGX_DECLINED;
+    }
+
+    if (c->type != SOCK_STREAM) {
+        return NGX_DECLINED;
+    }
+
+    if (c->buffer == NULL) {
+        return NGX_AGAIN;
+    }
+
+    ctx = ngx_stream_get_module_ctx(s, ngx_stream_ssl_preread_module);
+    if (ctx == NULL) {
+        ctx = ngx_pcalloc(c->pool, sizeof(ngx_stream_ssl_preread_ctx_t));
+        if (ctx == NULL) {
+            return NGX_ERROR;
+        }
+
+        ngx_stream_set_ctx(s, ctx, ngx_stream_ssl_preread_module);
+
+        ctx->pool = c->pool;
+        ctx->log = c->log;
+        ctx->pos = c->buffer->pos;
+    }
+
+    p = ctx->pos;
+    last = c->buffer->last;
+
+    while (last - p >= 5) {
+
+        if (p[0] != 0x16) {
+            ngx_log_debug0(NGX_LOG_DEBUG_STREAM, ctx->log, 0,
+                           "ssl preread: not a handshake");
+            return NGX_DECLINED;
+        }
+
+        if (p[1] != 3 || p[2] == 0) {
+            ngx_log_debug0(NGX_LOG_DEBUG_STREAM, ctx->log, 0,
+                           "ssl preread: unsupported SSL version");
+            return NGX_DECLINED;
+        }
+
+        len = (p[3] << 8) + p[4];
+
+        /* read the whole record before parsing */
+        if ((size_t) (last - p) < len + 5) {
+            break;
+        }
+
+        p += 5;
+
+        rc = ngx_stream_ssl_preread_parse_record(ctx, p, p + len);
+        if (rc != NGX_AGAIN) {
+            return rc;
+        }
+
+        p += len;
+    }
+
+    ctx->pos = p;
+
+    return NGX_AGAIN;
+}
+
+
+static ngx_int_t
+ngx_stream_ssl_preread_parse_record(ngx_stream_ssl_preread_ctx_t *ctx,
+    u_char *pos, u_char *last)
+{
+    size_t   left, n, size;
+    u_char  *dst, *p;
+
+    enum {
+        sw_start = 0,
+        sw_header,          /* handshake msg_type, length */
+        sw_head_tail,       /* version, random */
+        sw_sid_len,         /* session_id length */
+        sw_sid,             /* session_id */
+        sw_cs_len,          /* cipher_suites length */
+        sw_cs,              /* cipher_suites */
+        sw_cm_len,          /* compression_methods length */
+        sw_cm,              /* compression_methods */
+        sw_ext,             /* extension */
+        sw_ext_header,      /* extension_type, extension_data length */
+        sw_sni_len,         /* SNI length */
+        sw_sni_host_head,   /* SNI name_type, host_name length */
+        sw_sni_host         /* SNI host_name */
+    } state;
+
+    ngx_log_debug2(NGX_LOG_DEBUG_STREAM, ctx->log, 0,
+                   "ssl preread: state %ui left %z", ctx->state, ctx->left);
+
+    state = ctx->state;
+    size = ctx->size;
+    left = ctx->left;
+    dst = ctx->dst;
+    p = ctx->buf;
+
+    for ( ;; ) {
+        n = ngx_min((size_t) (last - pos), size);
+
+        if (dst) {
+            dst = ngx_cpymem(dst, pos, n);
+        }
+
+        pos += n;
+        size -= n;
+        left -= n;
+
+        if (size != 0) {
+            break;
+        }
+
+        switch (state) {
+
+        case sw_start:
+            state = sw_header;
+            dst = p;
+            size = 4;
+            left = size;
+            break;
+
+        case sw_header:
+            if (p[0] != 1) {
+                ngx_log_debug0(NGX_LOG_DEBUG_STREAM, ctx->log, 0,
+                               "ssl preread: not a client hello");
+                return NGX_DECLINED;
+            }
+
+            state = sw_head_tail;
+            dst = NULL;
+            size = 34;
+            left = (p[1] << 16) + (p[2] << 8) + p[3];
+            break;
+
+        case sw_head_tail:
+            state = sw_sid_len;
+            dst = p;
+            size = 1;
+            break;
+
+        case sw_sid_len:
+            state = sw_sid;
+            dst = NULL;
+            size = p[0];
+            break;
+
+        case sw_sid:
+            state = sw_cs_len;
+            dst = p;
+            size = 2;
+            break;
+
+        case sw_cs_len:
+            state = sw_cs;
+            dst = NULL;
+            size = (p[0] << 8) + p[1];
+            break;
+
+        case sw_cs:
+            state = sw_cm_len;
+            dst = p;
+            size = 1;
+            break;
+
+        case sw_cm_len:
+            state = sw_cm;
+            dst = NULL;
+            size = p[0];
+            break;
+
+        case sw_cm:
+            if (left == 0) {
+                /* no extensions */
+                return NGX_OK;
+            }
+
+            state = sw_ext;
+            dst = p;
+            size = 2;
+            break;
+
+        case sw_ext:
+            if (left == 0) {
+                return NGX_OK;
+            }
+
+            state = sw_ext_header;
+            dst = p;
+            size = 4;
+            break;
+
+        case sw_ext_header:
+            if (p[0] == 0 && p[1] == 0) {
+                /* SNI extension */
+                state = sw_sni_len;
+                dst = NULL;
+                size = 2;
+                break;
+            }
+
+            state = sw_ext;
+            dst = NULL;
+            size = (p[2] << 8) + p[3];
+            break;
+
+        case sw_sni_len:
+            state = sw_sni_host_head;
+            dst = p;
+            size = 3;
+            break;
+
+        case sw_sni_host_head:
+            if (p[0] != 0) {
+                ngx_log_debug0(NGX_LOG_DEBUG_STREAM, ctx->log, 0,
+                               "ssl preread: SNI hostname type is not DNS");
+                return NGX_DECLINED;
+            }
+
+            state = sw_sni_host;
+            size = (p[1] << 8) + p[2];
+
+            ctx->host.data = ngx_pnalloc(ctx->pool, size);
+            if (ctx->host.data == NULL) {
+                return NGX_ERROR;
+            }
+
+            dst = ctx->host.data;
+            break;
+
+        case sw_sni_host:
+            ctx->host.len = (p[1] << 8) + p[2];
+
+            ngx_log_debug1(NGX_LOG_DEBUG_STREAM, ctx->log, 0,
+                           "ssl preread: SNI hostname \"%V\"", &ctx->host);
+            return NGX_OK;
+        }
+
+        if (left < size) {
+           ngx_log_debug0(NGX_LOG_DEBUG_STREAM, ctx->log, 0,
+                          "ssl preread: failed to parse handshake");
+           return NGX_DECLINED;
+        }
+    }
+
+    ctx->state = state;
+    ctx->size = size;
+    ctx->left = left;
+    ctx->dst = dst;
+
+    return NGX_AGAIN;
+}
+
+
+static ngx_int_t
+ngx_stream_ssl_preread_server_name_variable(ngx_stream_session_t *s,
+    ngx_variable_value_t *v, uintptr_t data)
+{
+    ngx_stream_ssl_preread_ctx_t  *ctx;
+
+    ctx = ngx_stream_get_module_ctx(s, ngx_stream_ssl_preread_module);
+
+    if (ctx == NULL) {
+        v->not_found = 1;
+        return NGX_OK;
+    }
+
+    v->valid = 1;
+    v->no_cacheable = 0;
+    v->not_found = 0;
+    v->len = ctx->host.len;
+    v->data = ctx->host.data;
+
+    return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_stream_ssl_preread_add_variables(ngx_conf_t *cf)
+{
+    ngx_stream_variable_t  *var, *v;
+
+    for (v = ngx_stream_ssl_preread_vars; v->name.len; v++) {
+        var = ngx_stream_add_variable(cf, &v->name, v->flags);
+        if (var == NULL) {
+            return NGX_ERROR;
+        }
+
+        var->get_handler = v->get_handler;
+        var->data = v->data;
+    }
+
+    return NGX_OK;
+}
+
+
+static void *
+ngx_stream_ssl_preread_create_srv_conf(ngx_conf_t *cf)
+{
+    ngx_stream_ssl_preread_srv_conf_t  *conf;
+
+    conf = ngx_pcalloc(cf->pool, sizeof(ngx_stream_ssl_preread_srv_conf_t));
+    if (conf == NULL) {
+        return NULL;
+    }
+
+    conf->enabled = NGX_CONF_UNSET;
+
+    return conf;
+}
+
+
+static char *
+ngx_stream_ssl_preread_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
+{
+    ngx_stream_ssl_preread_srv_conf_t *prev = parent;
+    ngx_stream_ssl_preread_srv_conf_t *conf = child;
+
+    ngx_conf_merge_value(conf->enabled, prev->enabled, 0);
+
+    return NGX_CONF_OK;
+}
+
+
+static ngx_int_t
+ngx_stream_ssl_preread_init(ngx_conf_t *cf)
+{
+    ngx_stream_handler_pt        *h;
+    ngx_stream_core_main_conf_t  *cmcf;
+
+    cmcf = ngx_stream_conf_get_module_main_conf(cf, ngx_stream_core_module);
+
+    h = ngx_array_push(&cmcf->phases[NGX_STREAM_PREREAD_PHASE].handlers);
+    if (h == NULL) {
+        return NGX_ERROR;
+    }
+
+    *h = ngx_stream_ssl_preread_handler;
+
+    return NGX_OK;
+}

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_upstream.c (+21 -3) 96%
===================================================================
--- vendor/nginx-1.11.4/src/stream/ngx_stream_upstream.c    2016-10-26 16:45:24 +0900 (0c59780)
+++ vendor/nginx-1.11.5/src/stream/ngx_stream_upstream.c    2016-10-26 17:22:59 +0900 (c9e1784)
@@ -322,6 +322,7 @@ ngx_stream_upstream(ngx_conf_t *cf, ngx_command_t *cmd, void *dummy)
 
     uscf = ngx_stream_upstream_add(cf, &u, NGX_STREAM_UPSTREAM_CREATE
                                            |NGX_STREAM_UPSTREAM_WEIGHT
+                                           |NGX_STREAM_UPSTREAM_MAX_CONNS
                                            |NGX_STREAM_UPSTREAM_MAX_FAILS
                                            |NGX_STREAM_UPSTREAM_FAIL_TIMEOUT
                                            |NGX_STREAM_UPSTREAM_DOWN
@@ -407,7 +408,7 @@ ngx_stream_upstream_server(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     time_t                         fail_timeout;
     ngx_str_t                     *value, s;
     ngx_url_t                      u;
-    ngx_int_t                      weight, max_fails;
+    ngx_int_t                      weight, max_conns, max_fails;
     ngx_uint_t                     i;
     ngx_stream_upstream_server_t  *us;
 
@@ -421,6 +422,7 @@ ngx_stream_upstream_server(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     value = cf->args->elts;
 
     weight = 1;
+    max_conns = 0;
     max_fails = 1;
     fail_timeout = 10;
 
@@ -441,6 +443,21 @@ ngx_stream_upstream_server(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
             continue;
         }
 
+        if (ngx_strncmp(value[i].data, "max_conns=", 10) == 0) {
+
+            if (!(uscf->flags & NGX_STREAM_UPSTREAM_MAX_CONNS)) {
+                goto not_supported;
+            }
+
+            max_conns = ngx_atoi(&value[i].data[10], value[i].len - 10);
+
+            if (max_conns == NGX_ERROR) {
+                goto invalid;
+            }
+
+            continue;
+        }
+
         if (ngx_strncmp(value[i].data, "max_fails=", 10) == 0) {
 
             if (!(uscf->flags & NGX_STREAM_UPSTREAM_MAX_FAILS)) {
@@ -522,6 +539,7 @@ ngx_stream_upstream_server(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     us->addrs = u.addrs;
     us->naddrs = u.naddrs;
     us->weight = weight;
+    us->max_conns = max_conns;
     us->max_fails = max_fails;
     us->fail_timeout = fail_timeout;
 
@@ -586,14 +604,14 @@ ngx_stream_upstream_add(ngx_conf_t *cf, ngx_url_t *u, ngx_uint_t flags)
         }
 
         if ((uscfp[i]->flags & NGX_STREAM_UPSTREAM_CREATE) && !u->no_port) {
-            ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
+            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                                "upstream \"%V\" may not have port %d",
                                &u->host, u->port);
             return NULL;
         }
 
         if ((flags & NGX_STREAM_UPSTREAM_CREATE) && !uscfp[i]->no_port) {
-            ngx_log_error(NGX_LOG_WARN, cf->log, 0,
+            ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
                           "upstream \"%V\" may not have port %d in %s:%ui",
                           &u->host, uscfp[i]->port,
                           uscfp[i]->file_name, uscfp[i]->line);

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_upstream.h (+17 -2) 88%
===================================================================
--- vendor/nginx-1.11.4/src/stream/ngx_stream_upstream.h    2016-10-26 16:45:24 +0900 (f83b5ba)
+++ vendor/nginx-1.11.5/src/stream/ngx_stream_upstream.h    2016-10-26 17:22:59 +0900 (764a340)
@@ -21,6 +21,7 @@
 #define NGX_STREAM_UPSTREAM_FAIL_TIMEOUT  0x0008
 #define NGX_STREAM_UPSTREAM_DOWN          0x0010
 #define NGX_STREAM_UPSTREAM_BACKUP        0x0020
+#define NGX_STREAM_UPSTREAM_MAX_CONNS     0x0100
 
 
 typedef struct {
@@ -50,11 +51,16 @@ typedef struct {
     ngx_addr_t                        *addrs;
     ngx_uint_t                         naddrs;
     ngx_uint_t                         weight;
+    ngx_uint_t                         max_conns;
     ngx_uint_t                         max_fails;
     time_t                             fail_timeout;
+    ngx_msec_t                         slow_start;
 
     unsigned                           down:1;
     unsigned                           backup:1;
+
+    NGX_COMPAT_BEGIN(4)
+    NGX_COMPAT_END
 } ngx_stream_upstream_server_t;
 
 
@@ -106,14 +112,23 @@ typedef struct {
 
 typedef struct {
     ngx_peer_connection_t              peer;
+
     ngx_buf_t                          downstream_buf;
     ngx_buf_t                          upstream_buf;
+
+    ngx_chain_t                       *free;
+    ngx_chain_t                       *upstream_out;
+    ngx_chain_t                       *upstream_busy;
+    ngx_chain_t                       *downstream_out;
+    ngx_chain_t                       *downstream_busy;
+
     off_t                              received;
     time_t                             start_sec;
     ngx_uint_t                         responses;
-#if (NGX_STREAM_SSL)
+
     ngx_str_t                          ssl_name;
-#endif
+
+    ngx_stream_upstream_srv_conf_t    *upstream;
     ngx_stream_upstream_resolved_t    *resolved;
     ngx_stream_upstream_state_t       *state;
     unsigned                           connected:1;

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_upstream_hash_module.c (+10 -1) 98%
===================================================================
--- vendor/nginx-1.11.4/src/stream/ngx_stream_upstream_hash_module.c    2016-10-26 16:45:24 +0900 (88185eb)
+++ vendor/nginx-1.11.5/src/stream/ngx_stream_upstream_hash_module.c    2016-10-26 17:22:59 +0900 (cb44fcd)
@@ -241,6 +241,10 @@ ngx_stream_upstream_get_hash_peer(ngx_peer_connection_t *pc, void *data)
             goto next;
         }
 
+        if (peer->max_conns && peer->conns >= peer->max_conns) {
+            goto next;
+        }
+
         break;
 
     next:
@@ -524,7 +528,6 @@ ngx_stream_upstream_get_chash_peer(ngx_peer_connection_t *pc, void *data)
              peer;
              peer = peer->next, i++)
         {
-
             n = i / (8 * sizeof(uintptr_t));
             m = (uintptr_t) 1 << i % (8 * sizeof(uintptr_t));
 
@@ -550,6 +553,10 @@ ngx_stream_upstream_get_chash_peer(ngx_peer_connection_t *pc, void *data)
                 continue;
             }
 
+            if (peer->max_conns && peer->conns >= peer->max_conns) {
+                continue;
+            }
+
             peer->current_weight += peer->effective_weight;
             total += peer->effective_weight;
 
@@ -572,6 +579,7 @@ ngx_stream_upstream_get_chash_peer(ngx_peer_connection_t *pc, void *data)
         hp->tries++;
 
         if (hp->tries >= points->number) {
+            pc->name = hp->rrp.peers->name;
             ngx_stream_upstream_rr_peers_unlock(hp->rrp.peers);
             return NGX_BUSY;
         }
@@ -646,6 +654,7 @@ ngx_stream_upstream_hash(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
     uscf->flags = NGX_STREAM_UPSTREAM_CREATE
                   |NGX_STREAM_UPSTREAM_WEIGHT
+                  |NGX_STREAM_UPSTREAM_MAX_CONNS
                   |NGX_STREAM_UPSTREAM_MAX_FAILS
                   |NGX_STREAM_UPSTREAM_FAIL_TIMEOUT
                   |NGX_STREAM_UPSTREAM_DOWN;

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_upstream_least_conn_module.c (+9 -7) 96%
===================================================================
--- vendor/nginx-1.11.4/src/stream/ngx_stream_upstream_least_conn_module.c    2016-10-26 16:45:24 +0900 (e884975)
+++ vendor/nginx-1.11.5/src/stream/ngx_stream_upstream_least_conn_module.c    2016-10-26 17:22:59 +0900 (739b20a)
@@ -132,7 +132,6 @@ ngx_stream_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data)
          peer;
          peer = peer->next, i++)
     {
-
         n = i / (8 * sizeof(uintptr_t));
         m = (uintptr_t) 1 << i % (8 * sizeof(uintptr_t));
 
@@ -151,6 +150,10 @@ ngx_stream_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data)
             continue;
         }
 
+        if (peer->max_conns && peer->conns >= peer->max_conns) {
+            continue;
+        }
+
         /*
          * select peer with least number of connections; if there are
          * multiple peers with the same number of connections, select
@@ -206,6 +209,10 @@ ngx_stream_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data)
                 continue;
             }
 
+            if (peer->max_conns && peer->conns >= peer->max_conns) {
+                continue;
+            }
+
             peer->current_weight += peer->effective_weight;
             total += peer->effective_weight;
 
@@ -269,12 +276,6 @@ failed:
         ngx_stream_upstream_rr_peers_wlock(peers);
     }
 
-    /* all peers failed, mark them as live for quick recovery */
-
-    for (peer = peers->peer; peer; peer = peer->next) {
-        peer->fails = 0;
-    }
-
     ngx_stream_upstream_rr_peers_unlock(peers);
 
     pc->name = peers->name;
@@ -299,6 +300,7 @@ ngx_stream_upstream_least_conn(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
     uscf->flags = NGX_STREAM_UPSTREAM_CREATE
                   |NGX_STREAM_UPSTREAM_WEIGHT
+                  |NGX_STREAM_UPSTREAM_MAX_CONNS
                   |NGX_STREAM_UPSTREAM_MAX_FAILS
                   |NGX_STREAM_UPSTREAM_FAIL_TIMEOUT
                   |NGX_STREAM_UPSTREAM_DOWN

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_upstream_round_robin.c (+15 -7) 97%
===================================================================
--- vendor/nginx-1.11.4/src/stream/ngx_stream_upstream_round_robin.c    2016-10-26 16:45:24 +0900 (7aced0f)
+++ vendor/nginx-1.11.5/src/stream/ngx_stream_upstream_round_robin.c    2016-10-26 17:22:59 +0900 (3a62501)
@@ -96,6 +96,7 @@ ngx_stream_upstream_init_round_robin(ngx_conf_t *cf,
                 peer[n].weight = server[i].weight;
                 peer[n].effective_weight = server[i].weight;
                 peer[n].current_weight = 0;
+                peer[n].max_conns = server[i].max_conns;
                 peer[n].max_fails = server[i].max_fails;
                 peer[n].fail_timeout = server[i].fail_timeout;
                 peer[n].down = server[i].down;
@@ -159,6 +160,7 @@ ngx_stream_upstream_init_round_robin(ngx_conf_t *cf,
                 peer[n].weight = server[i].weight;
                 peer[n].effective_weight = server[i].weight;
                 peer[n].current_weight = 0;
+                peer[n].max_conns = server[i].max_conns;
                 peer[n].max_fails = server[i].max_fails;
                 peer[n].fail_timeout = server[i].fail_timeout;
                 peer[n].down = server[i].down;
@@ -227,6 +229,7 @@ ngx_stream_upstream_init_round_robin(ngx_conf_t *cf,
         peer[i].weight = 1;
         peer[i].effective_weight = 1;
         peer[i].current_weight = 0;
+        peer[i].max_conns = 0;
         peer[i].max_fails = 1;
         peer[i].fail_timeout = 10;
         *peerp = &peer[i];
@@ -262,6 +265,7 @@ ngx_stream_upstream_init_round_robin_peer(ngx_stream_session_t *s,
 
     rrp->peers = us->peer.data;
     rrp->current = NULL;
+    rrp->config = 0;
 
     n = rrp->peers->number;
 
@@ -344,6 +348,7 @@ ngx_stream_upstream_create_round_robin_peer(ngx_stream_session_t *s,
         peer[0].weight = 1;
         peer[0].effective_weight = 1;
         peer[0].current_weight = 0;
+        peer[0].max_conns = 0;
         peer[0].max_fails = 1;
         peer[0].fail_timeout = 10;
         peers->peer = peer;
@@ -377,6 +382,7 @@ ngx_stream_upstream_create_round_robin_peer(ngx_stream_session_t *s,
             peer[i].weight = 1;
             peer[i].effective_weight = 1;
             peer[i].current_weight = 0;
+            peer[i].max_conns = 0;
             peer[i].max_fails = 1;
             peer[i].fail_timeout = 10;
             *peerp = &peer[i];
@@ -386,6 +392,7 @@ ngx_stream_upstream_create_round_robin_peer(ngx_stream_session_t *s,
 
     rrp->peers = peers;
     rrp->current = NULL;
+    rrp->config = 0;
 
     if (rrp->peers->number <= 8 * sizeof(uintptr_t)) {
         rrp->tried = &rrp->data;
@@ -438,6 +445,10 @@ ngx_stream_upstream_get_round_robin_peer(ngx_peer_connection_t *pc, void *data)
             goto failed;
         }
 
+        if (peer->max_conns && peer->conns >= peer->max_conns) {
+            goto failed;
+        }
+
         rrp->current = peer;
 
     } else {
@@ -491,12 +502,6 @@ failed:
         ngx_stream_upstream_rr_peers_wlock(peers);
     }
 
-    /* all peers failed, mark them as live for quick recovery */
-
-    for (peer = peers->peer; peer; peer = peer->next) {
-        peer->fails = 0;
-    }
-
     ngx_stream_upstream_rr_peers_unlock(peers);
 
     pc->name = peers->name;
@@ -527,7 +532,6 @@ ngx_stream_upstream_get_peer(ngx_stream_upstream_rr_peer_data_t *rrp)
          peer;
          peer = peer->next, i++)
     {
-
         n = i / (8 * sizeof(uintptr_t));
         m = (uintptr_t) 1 << i % (8 * sizeof(uintptr_t));
 
@@ -546,6 +550,10 @@ ngx_stream_upstream_get_peer(ngx_stream_upstream_rr_peer_data_t *rrp)
             continue;
         }
 
+        if (peer->max_conns && peer->conns >= peer->max_conns) {
+            continue;
+        }
+
         peer->current_weight += peer->effective_weight;
         total += peer->effective_weight;
 

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_upstream_round_robin.h (+10 -5) 94%
===================================================================
--- vendor/nginx-1.11.4/src/stream/ngx_stream_upstream_round_robin.h    2016-10-26 16:45:24 +0900 (452c2e9)
+++ vendor/nginx-1.11.5/src/stream/ngx_stream_upstream_round_robin.h    2016-10-26 17:22:59 +0900 (35d9fce)
@@ -27,6 +27,7 @@ struct ngx_stream_upstream_rr_peer_s {
     ngx_int_t                        weight;
 
     ngx_uint_t                       conns;
+    ngx_uint_t                       max_conns;
 
     ngx_uint_t                       fails;
     time_t                           accessed;
@@ -34,19 +35,22 @@ struct ngx_stream_upstream_rr_peer_s {
 
     ngx_uint_t                       max_fails;
     time_t                           fail_timeout;
+    ngx_msec_t                       slow_start;
+    ngx_msec_t                       start_time;
 
-    ngx_uint_t                       down;         /* unsigned  down:1; */
+    ngx_uint_t                       down;
 
-#if (NGX_STREAM_SSL)
     void                            *ssl_session;
     int                              ssl_session_len;
-#endif
-
-    ngx_stream_upstream_rr_peer_t   *next;
 
 #if (NGX_STREAM_UPSTREAM_ZONE)
     ngx_atomic_t                     lock;
 #endif
+
+    ngx_stream_upstream_rr_peer_t   *next;
+
+    NGX_COMPAT_BEGIN(25)
+    NGX_COMPAT_END
 };
 
 
@@ -119,6 +123,7 @@ struct ngx_stream_upstream_rr_peers_s {
 
 
 typedef struct {
+    ngx_uint_t                       config;
     ngx_stream_upstream_rr_peers_t  *peers;
     ngx_stream_upstream_rr_peer_t   *current;
     uintptr_t                       *tried;

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_upstream_zone_module.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_variables.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_variables.h (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.5/src/stream/ngx_stream_write_filter_module.c (+71 -125) 55%
===================================================================
--- vendor/nginx-1.11.4/src/http/ngx_http_write_filter_module.c    2016-10-26 16:45:24 +0900 (0036231)
+++ vendor/nginx-1.11.5/src/stream/ngx_stream_write_filter_module.c    2016-10-26 17:22:59 +0900 (8fdcd37)
@@ -7,32 +7,37 @@
 
 #include <ngx_config.h>
 #include <ngx_core.h>
-#include <ngx_http.h>
+#include <ngx_stream.h>
 
 
-static ngx_int_t ngx_http_write_filter_init(ngx_conf_t *cf);
+typedef struct {
+    ngx_chain_t  *from_upstream;
+    ngx_chain_t  *from_downstream;
+} ngx_stream_write_filter_ctx_t;
 
 
-static ngx_http_module_t  ngx_http_write_filter_module_ctx = {
+static ngx_int_t ngx_stream_write_filter(ngx_stream_session_t *s,
+    ngx_chain_t *in, ngx_uint_t from_upstream);
+static ngx_int_t ngx_stream_write_filter_init(ngx_conf_t *cf);
+
+
+static ngx_stream_module_t  ngx_stream_write_filter_module_ctx = {
     NULL,                                  /* preconfiguration */
-    ngx_http_write_filter_init,            /* postconfiguration */
+    ngx_stream_write_filter_init,          /* postconfiguration */
 
     NULL,                                  /* create main configuration */
     NULL,                                  /* init main configuration */
 
     NULL,                                  /* create server configuration */
-    NULL,                                  /* merge server configuration */
-
-    NULL,                                  /* create location configuration */
-    NULL,                                  /* merge location configuration */
+    NULL                                   /* merge server configuration */
 };
 
 
-ngx_module_t  ngx_http_write_filter_module = {
+ngx_module_t  ngx_stream_write_filter_module = {
     NGX_MODULE_V1,
-    &ngx_http_write_filter_module_ctx,     /* module context */
+    &ngx_stream_write_filter_module_ctx,   /* module context */
     NULL,                                  /* module directives */
-    NGX_HTTP_MODULE,                       /* module type */
+    NGX_STREAM_MODULE,                     /* module type */
     NULL,                                  /* init master */
     NULL,                                  /* init module */
     NULL,                                  /* init process */
@@ -44,17 +49,36 @@ ngx_module_t  ngx_http_write_filter_module = {
 };
 
 
-ngx_int_t
-ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
+static ngx_int_t
+ngx_stream_write_filter(ngx_stream_session_t *s, ngx_chain_t *in,
+    ngx_uint_t from_upstream)
 {
-    off_t                      size, sent, nsent, limit;
-    ngx_uint_t                 last, flush, sync;
-    ngx_msec_t                 delay;
-    ngx_chain_t               *cl, *ln, **ll, *chain;
-    ngx_connection_t          *c;
-    ngx_http_core_loc_conf_t  *clcf;
+    off_t                           size;
+    ngx_uint_t                      last, flush, sync;
+    ngx_chain_t                    *cl, *ln, **ll, **out, *chain;
+    ngx_connection_t               *c;
+    ngx_stream_write_filter_ctx_t  *ctx;
+
+    ctx = ngx_stream_get_module_ctx(s, ngx_stream_write_filter_module);
+
+    if (ctx == NULL) {
+        ctx = ngx_pcalloc(s->connection->pool,
+                          sizeof(ngx_stream_write_filter_ctx_t));
+        if (ctx == NULL) {
+            return NGX_ERROR;
+        }
 
-    c = r->connection;
+        ngx_stream_set_ctx(s, ctx, ngx_stream_write_filter_module);
+    }
+
+    if (from_upstream) {
+        c = s->connection;
+        out = &ctx->from_upstream;
+
+    } else {
+        c = s->upstream->peer.connection;
+        out = &ctx->from_downstream;
+    }
 
     if (c->error) {
         return NGX_ERROR;
@@ -64,11 +88,11 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
     flush = 0;
     sync = 0;
     last = 0;
-    ll = &r->out;
+    ll = out;
 
     /* find the size, the flush point and the last link of the saved chain */
 
-    for (cl = r->out; cl; cl = cl->next) {
+    for (cl = *out; cl; cl = cl->next) {
         ll = &cl->next;
 
         ngx_log_debug7(NGX_LOG_DEBUG_EVENT, c->log, 0,
@@ -118,7 +142,7 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
     /* add the new chain to the existent one */
 
     for (ln = in; ln; ln = ln->next) {
-        cl = ngx_alloc_chain_link(r->pool);
+        cl = ngx_alloc_chain_link(c->pool);
         if (cl == NULL) {
             return NGX_ERROR;
         }
@@ -173,144 +197,66 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
 
     *ll = NULL;
 
-    ngx_log_debug3(NGX_LOG_DEBUG_HTTP, c->log, 0,
-                   "http write filter: l:%ui f:%ui s:%O", last, flush, size);
-
-    clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
-
-    /*
-     * avoid the output if there are no last buf, no flush point,
-     * there are the incoming bufs and the size of all bufs
-     * is smaller than "postpone_output" directive
-     */
-
-    if (!last && !flush && in && size < (off_t) clcf->postpone_output) {
-        return NGX_OK;
-    }
-
-    if (c->write->delayed) {
-        c->buffered |= NGX_HTTP_WRITE_BUFFERED;
-        return NGX_AGAIN;
-    }
+    ngx_log_debug3(NGX_LOG_DEBUG_STREAM, c->log, 0,
+                   "stream write filter: l:%ui f:%ui s:%O", last, flush, size);
 
     if (size == 0
         && !(c->buffered & NGX_LOWLEVEL_BUFFERED)
         && !(last && c->need_last_buf))
     {
         if (last || flush || sync) {
-            for (cl = r->out; cl; /* void */) {
+            for (cl = *out; cl; /* void */) {
                 ln = cl;
                 cl = cl->next;
-                ngx_free_chain(r->pool, ln);
+                ngx_free_chain(c->pool, ln);
             }
 
-            r->out = NULL;
-            c->buffered &= ~NGX_HTTP_WRITE_BUFFERED;
+            *out = NULL;
+            c->buffered &= ~NGX_STREAM_WRITE_BUFFERED;
 
             return NGX_OK;
         }
 
         ngx_log_error(NGX_LOG_ALERT, c->log, 0,
-                      "the http output chain is empty");
+                      "the stream output chain is empty");
 
         ngx_debug_point();
 
         return NGX_ERROR;
     }
 
-    if (r->limit_rate) {
-        if (r->limit_rate_after == 0) {
-            r->limit_rate_after = clcf->limit_rate_after;
-        }
-
-        limit = (off_t) r->limit_rate * (ngx_time() - r->start_sec + 1)
-                - (c->sent - r->limit_rate_after);
+    chain = c->send_chain(c, *out, 0);
 
-        if (limit <= 0) {
-            c->write->delayed = 1;
-            delay = (ngx_msec_t) (- limit * 1000 / r->limit_rate + 1);
-            ngx_add_timer(c->write, delay);
-
-            c->buffered |= NGX_HTTP_WRITE_BUFFERED;
-
-            return NGX_AGAIN;
-        }
-
-        if (clcf->sendfile_max_chunk
-            && (off_t) clcf->sendfile_max_chunk < limit)
-        {
-            limit = clcf->sendfile_max_chunk;
-        }
-
-    } else {
-        limit = clcf->sendfile_max_chunk;
-    }
-
-    sent = c->sent;
-
-    ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
-                   "http write filter limit %O", limit);
-
-    chain = c->send_chain(c, r->out, limit);
-
-    ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
-                   "http write filter %p", chain);
+    ngx_log_debug1(NGX_LOG_DEBUG_STREAM, c->log, 0,
+                   "stream write filter %p", chain);
 
     if (chain == NGX_CHAIN_ERROR) {
         c->error = 1;
         return NGX_ERROR;
     }
 
-    if (r->limit_rate) {
-
-        nsent = c->sent;
-
-        if (r->limit_rate_after) {
-
-            sent -= r->limit_rate_after;
-            if (sent < 0) {
-                sent = 0;
-            }
-
-            nsent -= r->limit_rate_after;
-            if (nsent < 0) {
-                nsent = 0;
-            }
-        }
-
-        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);
-        }
-    }
-
-    if (limit
-        && c->write->ready
-        && c->sent - sent >= limit - (off_t) (2 * ngx_pagesize))
-    {
-        c->write->delayed = 1;
-        ngx_add_timer(c->write, 1);
-    }
-
-    for (cl = r->out; cl && cl != chain; /* void */) {
+    for (cl = *out; cl && cl != chain; /* void */) {
         ln = cl;
         cl = cl->next;
-        ngx_free_chain(r->pool, ln);
+        ngx_free_chain(c->pool, ln);
     }
 
-    r->out = chain;
+    *out = chain;
 
     if (chain) {
-        c->buffered |= NGX_HTTP_WRITE_BUFFERED;
+        if (c->shared) {
+            ngx_log_error(NGX_LOG_ALERT, c->log, 0,
+                          "shared connection is busy");
+            return NGX_ERROR;
+        }
+
+        c->buffered |= NGX_STREAM_WRITE_BUFFERED;
         return NGX_AGAIN;
     }
 
-    c->buffered &= ~NGX_HTTP_WRITE_BUFFERED;
+    c->buffered &= ~NGX_STREAM_WRITE_BUFFERED;
 
-    if ((c->buffered & NGX_LOWLEVEL_BUFFERED) && r->postponed == NULL) {
+    if (c->buffered & NGX_LOWLEVEL_BUFFERED) {
         return NGX_AGAIN;
     }
 
@@ -319,9 +265,9 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
 
 
 static ngx_int_t
-ngx_http_write_filter_init(ngx_conf_t *cf)
+ngx_stream_write_filter_init(ngx_conf_t *cf)
 {
-    ngx_http_top_body_filter = ngx_http_write_filter;
+    ngx_stream_top_filter = ngx_stream_write_filter;
 
     return NGX_OK;
 }




More information about the Groonga-commit mailing list
Back to archive index