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

Back to archive index

Kentaro Hayashi null+****@clear*****
Tue Sep 27 23:25:47 JST 2016


Kentaro Hayashi	2016-09-27 23:25:47 +0900 (Tue, 27 Sep 2016)

  New Revision: 4945f985400ccf3be246537f48c0f416a019a682
  https://github.com/groonga/groonga/commit/4945f985400ccf3be246537f48c0f416a019a682

  Message:
    nginx: update to latest release
    
    $ ./update_nginx.sh 1.11.4

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

  Modified: nginx_version (+1 -1)
===================================================================
--- nginx_version    2016-09-27 21:40:31 +0900 (0a5af26)
+++ nginx_version    2016-09-27 23:25:47 +0900 (3d0e623)
@@ -1 +1 @@
-1.11.3
+1.11.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/auto/modules (+12 -0) 98%
===================================================================
--- vendor/nginx-1.11.3/auto/modules    2016-09-27 21:40:31 +0900 (614037c)
+++ vendor/nginx-1.11.4/auto/modules    2016-09-27 23:25:47 +0900 (433767a)
@@ -971,6 +971,7 @@ if [ $STREAM != NO ]; then
 
     ngx_module_name="ngx_stream_module \
                      ngx_stream_core_module \
+                     ngx_stream_log_module \
                      ngx_stream_proxy_module \
                      ngx_stream_upstream_module"
     ngx_module_incs="src/stream"
@@ -984,6 +985,7 @@ if [ $STREAM != NO ]; then
                      src/stream/ngx_stream_script.c \
                      src/stream/ngx_stream_handler.c \
                      src/stream/ngx_stream_core_module.c \
+                     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"
@@ -1005,6 +1007,16 @@ if [ $STREAM != NO ]; then
         . auto/module
     fi
 
+    if [ $STREAM_REALIP = YES ]; then
+        ngx_module_name=ngx_stream_realip_module
+        ngx_module_deps=
+        ngx_module_srcs=src/stream/ngx_stream_realip_module.c
+        ngx_module_libs=
+        ngx_module_link=$STREAM_REALIP
+
+        . auto/module
+    fi
+
     if [ $STREAM_LIMIT_CONN = YES ]; then
         ngx_module_name=ngx_stream_limit_conn_module
         ngx_module_deps=

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

  Renamed: vendor/nginx-1.11.4/auto/options (+3 -0) 99%
===================================================================
--- vendor/nginx-1.11.3/auto/options    2016-09-27 21:40:31 +0900 (a8fce30)
+++ vendor/nginx-1.11.4/auto/options    2016-09-27 23:25:47 +0900 (73149d9)
@@ -115,6 +115,7 @@ MAIL_SMTP=YES
 
 STREAM=NO
 STREAM_SSL=NO
+STREAM_REALIP=NO
 STREAM_LIMIT_CONN=YES
 STREAM_ACCESS=YES
 STREAM_GEO=YES
@@ -296,6 +297,7 @@ use the \"--with-mail_ssl_module\" option instead"
         --with-stream)                   STREAM=YES                 ;;
         --with-stream=dynamic)           STREAM=DYNAMIC             ;;
         --with-stream_ssl_module)        STREAM_SSL=YES             ;;
+        --with-stream_realip_module)     STREAM_REALIP=YES          ;;
         --with-stream_geoip_module)      STREAM_GEOIP=YES           ;;
         --with-stream_geoip_module=dynamic)
                                          STREAM_GEOIP=DYNAMIC       ;;
@@ -503,6 +505,7 @@ cat << END
   --with-stream                      enable TCP/UDP proxy module
   --with-stream=dynamic              enable dynamic TCP/UDP proxy module
   --with-stream_ssl_module           enable ngx_stream_ssl_module
+  --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
   --without-stream_limit_conn_module disable ngx_stream_limit_conn_module

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/auto/os/win32 (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.11.4/auto/sources (+0 -0) 100%
===================================================================

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/auto/unix (+0 -0) 100%
===================================================================

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/contrib/unicode2nginx/unicode-to-nginx.pl (+5 -2) 86%
===================================================================
--- vendor/nginx-1.11.3/contrib/unicode2nginx/unicode-to-nginx.pl    2016-09-27 21:40:31 +0900 (daaf354)
+++ vendor/nginx-1.11.4/contrib/unicode2nginx/unicode-to-nginx.pl    2016-09-27 23:25:47 +0900 (d113fed)
@@ -10,7 +10,7 @@
 
 # Needs perl 5.6 or later.
 
-# Written by Maxim Dounin, mdounin �� rambler-co.ru
+# Written by Maxim Dounin, mdounin �� mdounin.ru
 
 ###############################################################################
 
@@ -33,7 +33,10 @@ while (<>) {
 
 		# Produce UTF-8 sequence from character code;
 
-		my $un_utf8 = join('', map { sprintf("%02X", $_) } unpack("C*", pack("U", hex($un_code))));
+		my $un_utf8 = join('',
+			map { sprintf("%02X", $_) }
+			unpack("U0C*", pack("U", hex($un_code)))
+		);
 
 		print "    $cs_code  $un_utf8 ; $un_name\n";
 

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/docs/xml/nginx/changes.xml (+105 -0) 99%
===================================================================
--- vendor/nginx-1.11.3/docs/xml/nginx/changes.xml    2016-09-27 21:40:31 +0900 (a7e8f5d)
+++ vendor/nginx-1.11.4/docs/xml/nginx/changes.xml    2016-09-27 23:25:47 +0900 (01927e5)
@@ -5,6 +5,111 @@
 <change_log title="nginx">
 
 
+<changes ver="1.11.4" date="13.09.2016">
+
+<change type="feature">
+<para lang="ru">
+переменная $upstream_bytes_received.
+</para>
+<para lang="en">
+the $upstream_bytes_received variable.
+</para>
+</change>
+
+<change type="feature">
+<para lang="ru">
+переменные $bytes_received, $session_time, $protocol, $status,
+$upstream_addr, $upstream_bytes_sent, $upstream_bytes_received,
+$upstream_connect_time, $upstream_first_byte_time
+и $upstream_session_time в модуле stream.
+</para>
+<para lang="en">
+the $bytes_received, $session_time, $protocol, $status,
+$upstream_addr, $upstream_bytes_sent, $upstream_bytes_received,
+$upstream_connect_time, $upstream_first_byte_time,
+and $upstream_session_time variables in the stream module.
+</para>
+</change>
+
+<change type="feature">
+<para lang="ru">
+модуль ngx_stream_log_module.
+</para>
+<para lang="en">
+the ngx_stream_log_module.
+</para>
+</change>
+
+<change type="feature">
+<para lang="ru">
+параметр proxy_protocol в директиве listen,
+переменные $proxy_protocol_addr и $proxy_protocol_port
+в модуле stream.
+</para>
+<para lang="en">
+the "proxy_protocol" parameter of the "listen" directive,
+the $proxy_protocol_addr and $proxy_protocol_port variables
+in the stream module.
+</para>
+</change>
+
+<change type="feature">
+<para lang="ru">
+модуль ngx_stream_realip_module.
+</para>
+<para lang="en">
+the ngx_stream_realip_module.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+nginx не собирался с модулем stream и модулем ngx_http_ssl_module,
+но без модуля ngx_stream_ssl_module;
+ошибка появилась в 1.11.3.
+</para>
+<para lang="en">
+nginx could not be built with the stream module and the ngx_http_ssl_module,
+but without ngx_stream_ssl_module;
+the bug had appeared in 1.11.3.
+</para>
+</change>
+
+<change type="feature">
+<para lang="ru">
+опция сокета IP_BIND_ADDRESS_NO_PORT не использовалась;
+ошибка появилась в 1.11.2.
+</para>
+<para lang="en">
+the IP_BIND_ADDRESS_NO_PORT socket option was not used;
+the bug had appeared in 1.11.2.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+в параметре ranges директивы geo.
+</para>
+<para lang="en">
+in the "ranges" parameter of the "geo" directive.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+при использовании директив "aio threads" и sendfile
+мог возвращаться некорректный ответ; ошибка появилась в 1.9.13.
+</para>
+<para lang="en">
+an incorrect response might be returned
+when using the "aio threads" and "sendfile" directives;
+the bug had appeared in 1.9.13.
+</para>
+</change>
+
+</changes>
+
+
 <changes ver="1.11.3" date="26.07.2016">
 
 <change type="change">

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

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

  Renamed: vendor/nginx-1.11.4/misc/GNUmakefile (+0 -0) 100%
===================================================================

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

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

  Renamed: vendor/nginx-1.11.4/src/core/nginx.h (+2 -2) 85%
===================================================================
--- vendor/nginx-1.11.3/src/core/nginx.h    2016-09-27 21:40:31 +0900 (e303e66)
+++ vendor/nginx-1.11.4/src/core/nginx.h    2016-09-27 23:25:47 +0900 (7e9aae6)
@@ -9,8 +9,8 @@
 #define _NGINX_H_INCLUDED_
 
 
-#define nginx_version      1011003
-#define NGINX_VERSION      "1.11.3"
+#define nginx_version      1011004
+#define NGINX_VERSION      "1.11.4"
 #define NGINX_VER          "nginx/" NGINX_VERSION
 
 #ifdef NGX_BUILD

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/src/core/ngx_inet.c (+87 -0) 94%
===================================================================
--- vendor/nginx-1.11.3/src/core/ngx_inet.c    2016-09-27 21:40:31 +0900 (c4aaf3a)
+++ vendor/nginx-1.11.4/src/core/ngx_inet.c    2016-09-27 23:25:47 +0900 (dbd1f46)
@@ -466,6 +466,93 @@ ngx_ptocidr(ngx_str_t *text, ngx_cidr_t *cidr)
 
 
 ngx_int_t
+ngx_cidr_match(struct sockaddr *sa, ngx_array_t *cidrs)
+{
+#if (NGX_HAVE_INET6)
+    u_char           *p;
+#endif
+    in_addr_t         inaddr;
+    ngx_cidr_t       *cidr;
+    ngx_uint_t        family, i;
+#if (NGX_HAVE_INET6)
+    ngx_uint_t        n;
+    struct in6_addr  *inaddr6;
+#endif
+
+#if (NGX_SUPPRESS_WARN)
+    inaddr = 0;
+#if (NGX_HAVE_INET6)
+    inaddr6 = NULL;
+#endif
+#endif
+
+    family = sa->sa_family;
+
+    if (family == AF_INET) {
+        inaddr = ((struct sockaddr_in *) sa)->sin_addr.s_addr;
+    }
+
+#if (NGX_HAVE_INET6)
+    else if (family == AF_INET6) {
+        inaddr6 = &((struct sockaddr_in6 *) sa)->sin6_addr;
+
+        if (IN6_IS_ADDR_V4MAPPED(inaddr6)) {
+            family = AF_INET;
+
+            p = inaddr6->s6_addr;
+
+            inaddr = p[12] << 24;
+            inaddr += p[13] << 16;
+            inaddr += p[14] << 8;
+            inaddr += p[15];
+
+            inaddr = htonl(inaddr);
+        }
+    }
+#endif
+
+    for (cidr = cidrs->elts, i = 0; i < cidrs->nelts; i++) {
+        if (cidr[i].family != family) {
+            goto next;
+        }
+
+        switch (family) {
+
+#if (NGX_HAVE_INET6)
+        case AF_INET6:
+            for (n = 0; n < 16; n++) {
+                if ((inaddr6->s6_addr[n] & cidr[i].u.in6.mask.s6_addr[n])
+                    != cidr[i].u.in6.addr.s6_addr[n])
+                {
+                    goto next;
+                }
+            }
+            break;
+#endif
+
+#if (NGX_HAVE_UNIX_DOMAIN)
+        case AF_UNIX:
+            break;
+#endif
+
+        default: /* AF_INET */
+            if ((inaddr & cidr[i].u.in.mask) != cidr[i].u.in.addr) {
+                goto next;
+            }
+            break;
+        }
+
+        return NGX_OK;
+
+    next:
+        continue;
+    }
+
+    return NGX_DECLINED;
+}
+
+
+ngx_int_t
 ngx_parse_addr(ngx_pool_t *pool, ngx_addr_t *addr, u_char *text, size_t len)
 {
     in_addr_t             inaddr;

  Renamed: vendor/nginx-1.11.4/src/core/ngx_inet.h (+1 -0) 98%
===================================================================
--- vendor/nginx-1.11.3/src/core/ngx_inet.h    2016-09-27 21:40:31 +0900 (97dc354)
+++ vendor/nginx-1.11.4/src/core/ngx_inet.h    2016-09-27 23:25:47 +0900 (538771e)
@@ -113,6 +113,7 @@ size_t ngx_sock_ntop(struct sockaddr *sa, socklen_t socklen, u_char *text,
     size_t len, ngx_uint_t port);
 size_t ngx_inet_ntop(int family, void *addr, u_char *text, size_t len);
 ngx_int_t ngx_ptocidr(ngx_str_t *text, ngx_cidr_t *cidr);
+ngx_int_t ngx_cidr_match(struct sockaddr *sa, ngx_array_t *cidrs);
 ngx_int_t ngx_parse_addr(ngx_pool_t *pool, ngx_addr_t *addr, u_char *text,
     size_t len);
 ngx_int_t ngx_parse_addr_port(ngx_pool_t *pool, ngx_addr_t *addr,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/src/core/ngx_thread_pool.c (+7 -0) 98%
===================================================================
--- vendor/nginx-1.11.3/src/core/ngx_thread_pool.c    2016-09-27 21:40:31 +0900 (f3655aa)
+++ vendor/nginx-1.11.4/src/core/ngx_thread_pool.c    2016-09-27 23:25:47 +0900 (7fb0f7f)
@@ -137,6 +137,13 @@ ngx_thread_pool_init(ngx_thread_pool_t *tp, ngx_log_t *log, ngx_pool_t *pool)
         return NGX_ERROR;
     }
 
+    err = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+    if (err) {
+        ngx_log_error(NGX_LOG_ALERT, log, err,
+                      "pthread_attr_setdetachstate() failed");
+        return NGX_ERROR;
+    }
+
 #if 0
     err = pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN);
     if (err) {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/src/event/ngx_event_connect.c (+1 -1) 99%
===================================================================
--- vendor/nginx-1.11.3/src/event/ngx_event_connect.c    2016-09-27 21:40:31 +0900 (30cb59a)
+++ vendor/nginx-1.11.4/src/event/ngx_event_connect.c    2016-09-27 23:25:47 +0900 (06534ef)
@@ -91,7 +91,7 @@ ngx_event_connect_peer(ngx_peer_connection_t *pc)
 #endif
 
 #if (NGX_HAVE_IP_BIND_ADDRESS_NO_PORT || NGX_LINUX)
-        port = ngx_inet_get_port(pc->sockaddr);
+        port = ngx_inet_get_port(pc->local->sockaddr);
 #endif
 
 #if (NGX_HAVE_IP_BIND_ADDRESS_NO_PORT)

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

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

  Renamed: vendor/nginx-1.11.4/src/event/ngx_event_openssl.c (+46 -17) 98%
===================================================================
--- vendor/nginx-1.11.3/src/event/ngx_event_openssl.c    2016-09-27 21:40:31 +0900 (bb9a900)
+++ vendor/nginx-1.11.4/src/event/ngx_event_openssl.c    2016-09-27 23:25:47 +0900 (1cbfdf2)
@@ -118,9 +118,7 @@ ngx_ssl_init(ngx_log_t *log)
 
 #else
 
-#ifndef OPENSSL_IS_BORINGSSL
     OPENSSL_config(NULL);
-#endif
 
     SSL_library_init();
     SSL_load_error_strings();
@@ -2023,7 +2021,9 @@ ngx_ssl_connection_error(ngx_connection_t *c, int sslerr, ngx_err_t err,
             || n == SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST              /*  151 */
             || n == SSL_R_EXCESSIVE_MESSAGE_SIZE                     /*  152 */
             || n == SSL_R_LENGTH_MISMATCH                            /*  159 */
+#ifdef SSL_R_NO_CIPHERS_PASSED
             || n == SSL_R_NO_CIPHERS_PASSED                          /*  182 */
+#endif
             || n == SSL_R_NO_CIPHERS_SPECIFIED                       /*  183 */
             || n == SSL_R_NO_COMPRESSION_SPECIFIED                   /*  187 */
             || n == SSL_R_NO_SHARED_CIPHER                           /*  193 */
@@ -2941,13 +2941,6 @@ failed:
 }
 
 
-#ifdef OPENSSL_NO_SHA256
-#define ngx_ssl_session_ticket_md  EVP_sha1
-#else
-#define ngx_ssl_session_ticket_md  EVP_sha256
-#endif
-
-
 static int
 ngx_ssl_session_ticket_key_callback(ngx_ssl_conn_t *ssl_conn,
     unsigned char *name, unsigned char *iv, EVP_CIPHER_CTX *ectx,
@@ -2958,6 +2951,8 @@ ngx_ssl_session_ticket_key_callback(ngx_ssl_conn_t *ssl_conn,
     ngx_array_t                   *keys;
     ngx_connection_t              *c;
     ngx_ssl_session_ticket_key_t  *key;
+    const EVP_MD                  *digest;
+    const EVP_CIPHER              *cipher;
 #if (NGX_DEBUG)
     u_char                         buf[32];
 #endif
@@ -2965,6 +2960,13 @@ ngx_ssl_session_ticket_key_callback(ngx_ssl_conn_t *ssl_conn,
     c = ngx_ssl_get_connection(ssl_conn);
     ssl_ctx = c->ssl->session_ctx;
 
+    cipher = EVP_aes_128_cbc();
+#ifdef OPENSSL_NO_SHA256
+    digest = EVP_sha1();
+#else
+    digest = EVP_sha256();
+#endif
+
     keys = SSL_CTX_get_ex_data(ssl_ctx, ngx_ssl_session_ticket_keys_index);
     if (keys == NULL) {
         return -1;
@@ -2980,13 +2982,29 @@ ngx_ssl_session_ticket_key_callback(ngx_ssl_conn_t *ssl_conn,
                        ngx_hex_dump(buf, key[0].name, 16) - buf, buf,
                        SSL_session_reused(ssl_conn) ? "reused" : "new");
 
-        RAND_bytes(iv, 16);
-        EVP_EncryptInit_ex(ectx, EVP_aes_128_cbc(), NULL, key[0].aes_key, iv);
-        HMAC_Init_ex(hctx, key[0].hmac_key, 16,
-                     ngx_ssl_session_ticket_md(), NULL);
+        if (RAND_bytes(iv, EVP_CIPHER_iv_length(cipher)) != 1) {
+            ngx_ssl_error(NGX_LOG_ALERT, c->log, 0, "RAND_bytes() failed");
+            return -1;
+        }
+
+        if (EVP_EncryptInit_ex(ectx, cipher, NULL, key[0].aes_key, iv) != 1) {
+            ngx_ssl_error(NGX_LOG_ALERT, c->log, 0,
+                          "EVP_EncryptInit_ex() failed");
+            return -1;
+        }
+
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+        if (HMAC_Init_ex(hctx, key[0].hmac_key, 16, digest, NULL) != 1) {
+            ngx_ssl_error(NGX_LOG_ALERT, c->log, 0, "HMAC_Init_ex() failed");
+            return -1;
+        }
+#else
+        HMAC_Init_ex(hctx, key[0].hmac_key, 16, digest, NULL);
+#endif
+
         ngx_memcpy(name, key[0].name, 16);
 
-        return 0;
+        return 1;
 
     } else {
         /* decrypt session ticket */
@@ -3010,9 +3028,20 @@ ngx_ssl_session_ticket_key_callback(ngx_ssl_conn_t *ssl_conn,
                        ngx_hex_dump(buf, key[i].name, 16) - buf, buf,
                        (i == 0) ? " (default)" : "");
 
-        HMAC_Init_ex(hctx, key[i].hmac_key, 16,
-                     ngx_ssl_session_ticket_md(), NULL);
-        EVP_DecryptInit_ex(ectx, EVP_aes_128_cbc(), NULL, key[i].aes_key, iv);
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+        if (HMAC_Init_ex(hctx, key[i].hmac_key, 16, digest, NULL) != 1) {
+            ngx_ssl_error(NGX_LOG_ALERT, c->log, 0, "HMAC_Init_ex() failed");
+            return -1;
+        }
+#else
+        HMAC_Init_ex(hctx, key[i].hmac_key, 16, digest, NULL);
+#endif
+
+        if (EVP_DecryptInit_ex(ectx, cipher, NULL, key[i].aes_key, iv) != 1) {
+            ngx_ssl_error(NGX_LOG_ALERT, c->log, 0,
+                          "EVP_DecryptInit_ex() failed");
+            return -1;
+        }
 
         return (i == 0) ? 1 : 2 /* renew */;
     }

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

  Renamed: vendor/nginx-1.11.4/src/event/ngx_event_openssl_stapling.c (+3 -0) 99%
===================================================================
--- vendor/nginx-1.11.3/src/event/ngx_event_openssl_stapling.c    2016-09-27 21:40:31 +0900 (cce8e9e)
+++ vendor/nginx-1.11.4/src/event/ngx_event_openssl_stapling.c    2016-09-27 23:25:47 +0900 (09fab76)
@@ -376,6 +376,7 @@ ngx_ssl_stapling_responder(ngx_conf_t *cf, ngx_ssl_t *ssl,
 {
     ngx_url_t                  u;
     char                      *s;
+    ngx_str_t                  rsp;
     STACK_OF(OPENSSL_STRING)  *aia;
 
     if (responder->len == 0) {
@@ -403,6 +404,8 @@ ngx_ssl_stapling_responder(ngx_conf_t *cf, ngx_ssl_t *ssl,
             return NGX_DECLINED;
         }
 
+        responder = &rsp;
+
         responder->len = ngx_strlen(s);
         responder->data = ngx_palloc(cf->pool, responder->len);
         if (responder->data == NULL) {

  Renamed: vendor/nginx-1.11.4/src/event/ngx_event_pipe.c (+7 -5) 98%
===================================================================
--- vendor/nginx-1.11.3/src/event/ngx_event_pipe.c    2016-09-27 21:40:31 +0900 (5ce59ae)
+++ vendor/nginx-1.11.4/src/event/ngx_event_pipe.c    2016-09-27 23:25:47 +0900 (249433a)
@@ -300,7 +300,7 @@ ngx_event_pipe_read_upstream(ngx_event_pipe_t *p)
 
             if (n == NGX_ERROR) {
                 p->upstream_error = 1;
-                return NGX_ERROR;
+                break;
             }
 
             if (n == NGX_AGAIN) {
@@ -815,10 +815,12 @@ ngx_event_pipe_write_chain_to_temp_file(ngx_event_pipe_t *p)
     }
 
 #if (NGX_THREADS)
-    p->temp_file->thread_write = p->thread_handler ? 1 : 0;
-    p->temp_file->file.thread_task = p->thread_task;
-    p->temp_file->file.thread_handler = p->thread_handler;
-    p->temp_file->file.thread_ctx = p->thread_ctx;
+    if (p->thread_handler) {
+        p->temp_file->thread_write = 1;
+        p->temp_file->file.thread_task = p->thread_task;
+        p->temp_file->file.thread_handler = p->thread_handler;
+        p->temp_file->file.thread_ctx = p->thread_ctx;
+    }
 #endif
 
     n = ngx_write_chain_to_temp_file(p->temp_file, out);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/src/http/modules/ngx_http_geo_module.c (+32 -18) 97%
===================================================================
--- vendor/nginx-1.11.3/src/http/modules/ngx_http_geo_module.c    2016-09-27 21:40:31 +0900 (9b3c6cb)
+++ vendor/nginx-1.11.4/src/http/modules/ngx_http_geo_module.c    2016-09-27 23:25:47 +0900 (46a8d7c)
@@ -469,7 +469,12 @@ ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
             for (i = 0; i < 0x10000; i++) {
                 a = (ngx_array_t *) ctx.high.low[i];
 
-                if (a == NULL || a->nelts == 0) {
+                if (a == NULL) {
+                    continue;
+                }
+
+                if (a->nelts == 0) {
+                    ctx.high.low[i] = NULL;
                     continue;
                 }
 
@@ -814,7 +819,7 @@ ngx_http_geo_add_range(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
                 range = a->elts;
 
                 ngx_memmove(&range[i + 2], &range[i + 1],
-                           (a->nelts - 2 - i) * sizeof(ngx_http_geo_range_t));
+                            (a->nelts - 2 - i) * sizeof(ngx_http_geo_range_t));
 
                 range[i + 1].start = (u_short) s;
                 range[i + 1].end = (u_short) e;
@@ -853,7 +858,7 @@ ngx_http_geo_add_range(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
                 range = a->elts;
 
                 ngx_memmove(&range[i + 3], &range[i + 1],
-                           (a->nelts - 3 - i) * sizeof(ngx_http_geo_range_t));
+                            (a->nelts - 3 - i) * sizeof(ngx_http_geo_range_t));
 
                 range[i + 2].start = (u_short) (e + 1);
                 range[i + 2].end = range[i].end;
@@ -881,7 +886,7 @@ ngx_http_geo_add_range(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
                 range = a->elts;
 
                 ngx_memmove(&range[i + 1], &range[i],
-                           (a->nelts - 1 - i) * sizeof(ngx_http_geo_range_t));
+                            (a->nelts - 1 - i) * sizeof(ngx_http_geo_range_t));
 
                 range[i + 1].start = (u_short) (e + 1);
 
@@ -905,7 +910,7 @@ ngx_http_geo_add_range(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
                 range = a->elts;
 
                 ngx_memmove(&range[i + 2], &range[i + 1],
-                           (a->nelts - 2 - i) * sizeof(ngx_http_geo_range_t));
+                            (a->nelts - 2 - i) * sizeof(ngx_http_geo_range_t));
 
                 range[i + 1].start = (u_short) s;
                 range[i + 1].end = (u_short) e;
@@ -935,13 +940,20 @@ ngx_http_geo_add_range(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
             return NGX_CONF_ERROR;
         }
 
-        range->start = (u_short) s;
-        range->end = (u_short) e;
-        range->value = ctx->value;
+        range = a->elts;
+
+        ngx_memmove(&range[1], &range[0],
+                    (a->nelts - 1) * sizeof(ngx_http_geo_range_t));
+
+        range[0].start = (u_short) s;
+        range[0].end = (u_short) e;
+        range[0].value = ctx->value;
 
     next:
 
-        continue;
+        if (h == 0xffff) {
+            break;
+        }
     }
 
     return NGX_CONF_OK;
@@ -959,7 +971,7 @@ ngx_http_geo_delete_range(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
 
     warn = 0;
 
-    for (n = start; n <= end; n += 0x10000) {
+    for (n = start; n <= end; n = (n + 0x10000) & 0xffff0000) {
 
         h = n >> 16;
 
@@ -978,9 +990,9 @@ ngx_http_geo_delete_range(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
 
         a = (ngx_array_t *) ctx->high.low[h];
 
-        if (a == NULL) {
+        if (a == NULL || a->nelts == 0) {
             warn = 1;
-            continue;
+            goto next;
         }
 
         range = a->elts;
@@ -990,20 +1002,22 @@ ngx_http_geo_delete_range(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
                 && e == (ngx_uint_t) range[i].end)
             {
                 ngx_memmove(&range[i], &range[i + 1],
-                           (a->nelts - 1 - i) * sizeof(ngx_http_geo_range_t));
+                            (a->nelts - 1 - i) * sizeof(ngx_http_geo_range_t));
 
                 a->nelts--;
 
                 break;
             }
 
-            if (s != (ngx_uint_t) range[i].start
-                && e != (ngx_uint_t) range[i].end)
-            {
-                continue;
+            if (i == a->nelts - 1) {
+                warn = 1;
             }
+        }
 
-            warn = 1;
+    next:
+
+        if (h == 0xffff) {
+            break;
         }
     }
 

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/src/http/modules/ngx_http_limit_req_module.c (+3 -11) 98%
===================================================================
--- vendor/nginx-1.11.3/src/http/modules/ngx_http_limit_req_module.c    2016-09-27 21:40:31 +0900 (9059ac3)
+++ vendor/nginx-1.11.4/src/http/modules/ngx_http_limit_req_module.c    2016-09-27 23:25:47 +0900 (2f695f2)
@@ -362,15 +362,13 @@ ngx_http_limit_req_lookup(ngx_http_limit_req_limit_t *limit, ngx_uint_t hash,
 {
     size_t                      size;
     ngx_int_t                   rc, excess;
-    ngx_time_t                 *tp;
     ngx_msec_t                  now;
     ngx_msec_int_t              ms;
     ngx_rbtree_node_t          *node, *sentinel;
     ngx_http_limit_req_ctx_t   *ctx;
     ngx_http_limit_req_node_t  *lr;
 
-    tp = ngx_timeofday();
-    now = (ngx_msec_t) (tp->sec * 1000 + tp->msec);
+    now = ngx_current_msec;
 
     ctx = limit->shm_zone->data;
 
@@ -483,7 +481,6 @@ ngx_http_limit_req_account(ngx_http_limit_req_limit_t *limits, ngx_uint_t n,
     ngx_uint_t *ep, ngx_http_limit_req_limit_t **limit)
 {
     ngx_int_t                   excess;
-    ngx_time_t                 *tp;
     ngx_msec_t                  now, delay, max_delay;
     ngx_msec_int_t              ms;
     ngx_http_limit_req_ctx_t   *ctx;
@@ -509,9 +506,7 @@ ngx_http_limit_req_account(ngx_http_limit_req_limit_t *limits, ngx_uint_t n,
 
         ngx_shmtx_lock(&ctx->shpool->mutex);
 
-        tp = ngx_timeofday();
-
-        now = (ngx_msec_t) (tp->sec * 1000 + tp->msec);
+        now = ngx_current_msec;
         ms = (ngx_msec_int_t) (now - lr->last);
 
         excess = lr->excess - ctx->rate * ngx_abs(ms) / 1000 + 1000;
@@ -549,16 +544,13 @@ static void
 ngx_http_limit_req_expire(ngx_http_limit_req_ctx_t *ctx, ngx_uint_t n)
 {
     ngx_int_t                   excess;
-    ngx_time_t                 *tp;
     ngx_msec_t                  now;
     ngx_queue_t                *q;
     ngx_msec_int_t              ms;
     ngx_rbtree_node_t          *node;
     ngx_http_limit_req_node_t  *lr;
 
-    tp = ngx_timeofday();
-
-    now = (ngx_msec_t) (tp->sec * 1000 + tp->msec);
+    now = ngx_current_msec;
 
     /*
      * n == 1 deletes one or two zero rate entries

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/src/http/modules/ngx_http_realip_module.c (+1 -1) 100%
===================================================================
@@ -264,7 +264,6 @@ ngx_http_realip_set_addr(ngx_http_request_t *r, ngx_addr_t *addr)
     }
 
     ctx = cln->data;
-    ngx_http_set_ctx(r, ctx, ngx_http_realip_module);
 
     c = r->connection;
 
@@ -282,6 +281,7 @@ ngx_http_realip_set_addr(ngx_http_request_t *r, ngx_addr_t *addr)
     ngx_memcpy(p, text, len);
 
     cln->handler = ngx_http_realip_cleanup;
+    ngx_http_set_ctx(r, ctx, ngx_http_realip_module);
 
     ctx->connection = c;
     ctx->sockaddr = c->sockaddr;

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

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/src/http/modules/ngx_http_ssi_filter_module.c (+5 -5) 99%
===================================================================
--- vendor/nginx-1.11.3/src/http/modules/ngx_http_ssi_filter_module.c    2016-09-27 21:40:31 +0900 (fc6e65b)
+++ vendor/nginx-1.11.4/src/http/modules/ngx_http_ssi_filter_module.c    2016-09-27 23:25:47 +0900 (6fb1fbe)
@@ -2722,8 +2722,8 @@ static ngx_int_t
 ngx_http_ssi_date_gmt_local_variable(ngx_http_request_t *r,
     ngx_http_variable_value_t *v, uintptr_t gmt)
 {
+    time_t               now;
     ngx_http_ssi_ctx_t  *ctx;
-    ngx_time_t          *tp;
     ngx_str_t           *timefmt;
     struct tm            tm;
     char                 buf[NGX_HTTP_SSI_DATE_LEN];
@@ -2732,7 +2732,7 @@ ngx_http_ssi_date_gmt_local_variable(ngx_http_request_t *r,
     v->no_cacheable = 0;
     v->not_found = 0;
 
-    tp = ngx_timeofday();
+    now = ngx_time();
 
     ctx = ngx_http_get_module_ctx(r, ngx_http_ssi_filter_module);
 
@@ -2746,15 +2746,15 @@ ngx_http_ssi_date_gmt_local_variable(ngx_http_request_t *r,
             return NGX_ERROR;
         }
 
-        v->len = ngx_sprintf(v->data, "%T", tp->sec) - v->data;
+        v->len = ngx_sprintf(v->data, "%T", now) - v->data;
 
         return NGX_OK;
     }
 
     if (gmt) {
-        ngx_libc_gmtime(tp->sec, &tm);
+        ngx_libc_gmtime(now, &tm);
     } else {
-        ngx_libc_localtime(tp->sec, &tm);
+        ngx_libc_localtime(now, &tm);
     }
 
     v->len = strftime(buf, NGX_HTTP_SSI_DATE_LEN,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/src/http/modules/perl/Makefile.PL (+0 -0) 100%
===================================================================

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/src/http/ngx_http_core_module.c (+24 -98) 98%
===================================================================
--- vendor/nginx-1.11.3/src/http/ngx_http_core_module.c    2016-09-27 21:40:31 +0900 (76917bb)
+++ vendor/nginx-1.11.4/src/http/ngx_http_core_module.c    2016-09-27 23:25:47 +0900 (e26c3f7)
@@ -2823,120 +2823,46 @@ static ngx_int_t
 ngx_http_get_forwarded_addr_internal(ngx_http_request_t *r, ngx_addr_t *addr,
     u_char *xff, size_t xfflen, ngx_array_t *proxies, int recursive)
 {
-    u_char           *p;
-    in_addr_t         inaddr;
-    ngx_int_t         rc;
-    ngx_addr_t        paddr;
-    ngx_cidr_t       *cidr;
-    ngx_uint_t        family, i;
-#if (NGX_HAVE_INET6)
-    ngx_uint_t        n;
-    struct in6_addr  *inaddr6;
-#endif
+    u_char      *p;
+    ngx_int_t    rc;
+    ngx_addr_t   paddr;
 
-#if (NGX_SUPPRESS_WARN)
-    inaddr = 0;
-#if (NGX_HAVE_INET6)
-    inaddr6 = NULL;
-#endif
-#endif
-
-    family = addr->sockaddr->sa_family;
-
-    if (family == AF_INET) {
-        inaddr = ((struct sockaddr_in *) addr->sockaddr)->sin_addr.s_addr;
+    if (ngx_cidr_match(addr->sockaddr, proxies) != NGX_OK) {
+        return NGX_DECLINED;
     }
 
-#if (NGX_HAVE_INET6)
-    else if (family == AF_INET6) {
-        inaddr6 = &((struct sockaddr_in6 *) addr->sockaddr)->sin6_addr;
-
-        if (IN6_IS_ADDR_V4MAPPED(inaddr6)) {
-            family = AF_INET;
-
-            p = inaddr6->s6_addr;
-
-            inaddr = p[12] << 24;
-            inaddr += p[13] << 16;
-            inaddr += p[14] << 8;
-            inaddr += p[15];
-
-            inaddr = htonl(inaddr);
+    for (p = xff + xfflen - 1; p > xff; p--, xfflen--) {
+        if (*p != ' ' && *p != ',') {
+            break;
         }
     }
-#endif
 
-    for (cidr = proxies->elts, i = 0; i < proxies->nelts; i++) {
-        if (cidr[i].family != family) {
-            goto next;
-        }
-
-        switch (family) {
-
-#if (NGX_HAVE_INET6)
-        case AF_INET6:
-            for (n = 0; n < 16; n++) {
-                if ((inaddr6->s6_addr[n] & cidr[i].u.in6.mask.s6_addr[n])
-                    != cidr[i].u.in6.addr.s6_addr[n])
-                {
-                    goto next;
-                }
-            }
-            break;
-#endif
-
-#if (NGX_HAVE_UNIX_DOMAIN)
-        case AF_UNIX:
-            break;
-#endif
-
-        default: /* AF_INET */
-            if ((inaddr & cidr[i].u.in.mask) != cidr[i].u.in.addr) {
-                goto next;
-            }
+    for ( /* void */ ; p > xff; p--) {
+        if (*p == ' ' || *p == ',') {
+            p++;
             break;
         }
+    }
 
-        for (p = xff + xfflen - 1; p > xff; p--, xfflen--) {
-            if (*p != ' ' && *p != ',') {
-                break;
-            }
-        }
-
-        for ( /* void */ ; p > xff; p--) {
-            if (*p == ' ' || *p == ',') {
-                p++;
-                break;
-            }
-        }
-
-        if (ngx_parse_addr_port(r->pool, &paddr, p, xfflen - (p - xff))
-            != NGX_OK)
-        {
-            return NGX_DECLINED;
-        }
-
-        *addr = paddr;
+    if (ngx_parse_addr_port(r->pool, &paddr, p, xfflen - (p - xff)) != NGX_OK) {
+        return NGX_DECLINED;
+    }
 
-        if (recursive && p > xff) {
-            rc = ngx_http_get_forwarded_addr_internal(r, addr, xff, p - 1 - xff,
-                                                      proxies, 1);
+    *addr = paddr;
 
-            if (rc == NGX_DECLINED) {
-                return NGX_DONE;
-            }
+    if (recursive && p > xff) {
+        rc = ngx_http_get_forwarded_addr_internal(r, addr, xff, p - 1 - xff,
+                                                  proxies, 1);
 
-            /* rc == NGX_OK || rc == NGX_DONE  */
-            return rc;
+        if (rc == NGX_DECLINED) {
+            return NGX_DONE;
         }
 
-        return NGX_OK;
-
-    next:
-        continue;
+        /* rc == NGX_OK || rc == NGX_DONE  */
+        return rc;
     }
 
-    return NGX_DECLINED;
+    return NGX_OK;
 }
 
 

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/src/http/ngx_http_upstream.c (+21 -1) 99%
===================================================================
--- vendor/nginx-1.11.3/src/http/ngx_http_upstream.c    2016-09-27 21:40:31 +0900 (0f6b3ae)
+++ vendor/nginx-1.11.4/src/http/ngx_http_upstream.c    2016-09-27 23:25:47 +0900 (7e4b3c5)
@@ -391,6 +391,10 @@ static ngx_http_variable_t  ngx_http_upstream_vars[] = {
       ngx_http_upstream_response_length_variable, 0,
       NGX_HTTP_VAR_NOCACHEABLE, 0 },
 
+    { ngx_string("upstream_bytes_received"), NULL,
+      ngx_http_upstream_response_length_variable, 1,
+      NGX_HTTP_VAR_NOCACHEABLE, 0 },
+
 #if (NGX_HTTP_CACHE)
 
     { ngx_string("upstream_cache_status"), NULL,
@@ -2136,6 +2140,8 @@ ngx_http_upstream_process_header(ngx_http_request_t *r, ngx_http_upstream_t *u)
             return;
         }
 
+        u->state->bytes_received += n;
+
         u->buffer.last += n;
 
 #if 0
@@ -2642,6 +2648,7 @@ ngx_http_upstream_process_body_in_memory(ngx_http_request_t *r,
             return;
         }
 
+        u->state->bytes_received += n;
         u->state->response_length += n;
 
         if (u->input_filter(u->input_filter_ctx, n) == NGX_ERROR) {
@@ -3215,6 +3222,10 @@ ngx_http_upstream_process_upgraded(ngx_http_request_t *r,
                 do_write = 1;
                 b->last += n;
 
+                if (from_upstream) {
+                    u->state->bytes_received += n;
+                }
+
                 continue;
             }
 
@@ -3411,6 +3422,7 @@ ngx_http_upstream_process_non_buffered_request(ngx_http_request_t *r,
             }
 
             if (n > 0) {
+                u->state->bytes_received += n;
                 u->state->response_length += n;
 
                 if (u->input_filter(u->input_filter_ctx, n) == NGX_ERROR) {
@@ -4095,6 +4107,8 @@ ngx_http_upstream_finalize_request(ngx_http_request_t *r,
         u->state->response_time = ngx_current_msec - u->state->response_time;
 
         if (u->pipe && u->pipe->read_length) {
+            u->state->bytes_received += u->pipe->read_length
+                                        - u->pipe->preread_size;
             u->state->response_length = u->pipe->read_length;
         }
     }
@@ -5242,7 +5256,13 @@ ngx_http_upstream_response_length_variable(ngx_http_request_t *r,
     state = r->upstream_states->elts;
 
     for ( ;; ) {
-        p = ngx_sprintf(p, "%O", state[i].response_length);
+
+        if (data == 1) {
+            p = ngx_sprintf(p, "%O", state[i].bytes_received);
+
+        } else {
+            p = ngx_sprintf(p, "%O", state[i].response_length);
+        }
 
         if (++i == r->upstream_states->nelts) {
             break;

  Renamed: vendor/nginx-1.11.4/src/http/ngx_http_upstream.h (+1 -0) 99%
===================================================================
--- vendor/nginx-1.11.3/src/http/ngx_http_upstream.h    2016-09-27 21:40:31 +0900 (b288f28)
+++ vendor/nginx-1.11.4/src/http/ngx_http_upstream.h    2016-09-27 23:25:47 +0900 (ef861f4)
@@ -63,6 +63,7 @@ typedef struct {
     ngx_msec_t                       connect_time;
     ngx_msec_t                       header_time;
     off_t                            response_length;
+    off_t                            bytes_received;
 
     ngx_str_t                       *peer;
 } ngx_http_upstream_state_t;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/src/mail/ngx_mail.h (+3 -1) 99%
===================================================================
--- vendor/nginx-1.11.3/src/mail/ngx_mail.h    2016-09-27 21:40:31 +0900 (ae1aa41)
+++ vendor/nginx-1.11.4/src/mail/ngx_mail.h    2016-09-27 23:25:47 +0900 (1068bb3)
@@ -117,13 +117,15 @@ typedef struct {
     ngx_str_t               server_name;
 
     u_char                 *file_name;
-    ngx_int_t               line;
+    ngx_uint_t              line;
 
     ngx_resolver_t         *resolver;
     ngx_log_t              *error_log;
 
     /* server ctx */
     ngx_mail_conf_ctx_t    *ctx;
+
+    ngx_uint_t              listen;  /* unsigned  listen:1; */
 } ngx_mail_core_srv_conf_t;
 
 

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

  Renamed: vendor/nginx-1.11.4/src/mail/ngx_mail_core_module.c (+9 -0) 98%
===================================================================
--- vendor/nginx-1.11.3/src/mail/ngx_mail_core_module.c    2016-09-27 21:40:31 +0900 (d992402)
+++ vendor/nginx-1.11.4/src/mail/ngx_mail_core_module.c    2016-09-27 23:25:47 +0900 (48eacfa)
@@ -279,6 +279,13 @@ ngx_mail_core_server(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
     *cf = pcf;
 
+    if (rv == NGX_CONF_OK && !cscf->listen) {
+        ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
+                      "no \"listen\" is defined for server in %s:%ui",
+                      cscf->file_name, cscf->line);
+        return NGX_CONF_ERROR;
+    }
+
     return rv;
 }
 
@@ -295,6 +302,8 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     ngx_mail_module_t          *module;
     ngx_mail_core_main_conf_t  *cmcf;
 
+    cscf->listen = 1;
+
     value = cf->args->elts;
 
     ngx_memzero(&u, sizeof(ngx_url_t));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/src/os/unix/ngx_posix_init.c (+4 -2) 94%
===================================================================
--- vendor/nginx-1.11.3/src/os/unix/ngx_posix_init.c    2016-09-27 21:40:31 +0900 (76ed94e)
+++ vendor/nginx-1.11.4/src/os/unix/ngx_posix_init.c    2016-09-27 23:25:47 +0900 (7e6e79d)
@@ -33,7 +33,8 @@ ngx_os_io_t ngx_os_io = {
 ngx_int_t
 ngx_os_init(ngx_log_t *log)
 {
-    ngx_uint_t  n;
+    ngx_time_t  *tp;
+    ngx_uint_t   n;
 
 #if (NGX_HAVE_OS_SPECIFIC_INIT)
     if (ngx_os_specific_init(log) != NGX_OK) {
@@ -76,7 +77,8 @@ ngx_os_init(ngx_log_t *log)
     ngx_inherited_nonblocking = 0;
 #endif
 
-    srandom(ngx_time());
+    tp = ngx_timeofday();
+    srandom(((unsigned) ngx_pid << 16) ^ tp->sec ^ tp->msec);
 
     return NGX_OK;
 }

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

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

  Renamed: vendor/nginx-1.11.4/src/os/unix/ngx_process_cycle.c (+3 -1) 99%
===================================================================
--- vendor/nginx-1.11.3/src/os/unix/ngx_process_cycle.c    2016-09-27 21:40:31 +0900 (7cee1c5)
+++ vendor/nginx-1.11.4/src/os/unix/ngx_process_cycle.c    2016-09-27 23:25:47 +0900 (83b04ee)
@@ -785,6 +785,7 @@ ngx_worker_process_init(ngx_cycle_t *cycle, ngx_int_t worker)
 {
     sigset_t          set;
     ngx_int_t         n;
+    ngx_time_t       *tp;
     ngx_uint_t        i;
     ngx_cpuset_t     *cpu_affinity;
     struct rlimit     rlmt;
@@ -884,7 +885,8 @@ ngx_worker_process_init(ngx_cycle_t *cycle, ngx_int_t worker)
                       "sigprocmask() failed");
     }
 
-    srandom((ngx_pid << 16) ^ ngx_time());
+    tp = ngx_timeofday();
+    srandom(((unsigned) ngx_pid << 16) ^ tp->sec ^ tp->msec);
 
     /*
      * disable deleting previous events for the listening sockets because

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/src/os/win32/ngx_process_cycle.c (+4 -0) 99%
===================================================================
--- vendor/nginx-1.11.3/src/os/win32/ngx_process_cycle.c    2016-09-27 21:40:31 +0900 (795e41e)
+++ vendor/nginx-1.11.4/src/os/win32/ngx_process_cycle.c    2016-09-27 23:25:47 +0900 (8b9c5ef)
@@ -762,8 +762,12 @@ static ngx_thread_value_t __stdcall
 ngx_worker_thread(void *data)
 {
     ngx_int_t     n;
+    ngx_time_t   *tp;
     ngx_cycle_t  *cycle;
 
+    tp = ngx_timeofday();
+    srand((ngx_pid << 16) ^ (unsigned) tp->sec ^ tp->msec);
+
     cycle = (ngx_cycle_t *) ngx_cycle;
 
     for (n = 0; cycle->modules[n]; n++) {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/src/os/win32/ngx_win32_init.c (+9 -7) 97%
===================================================================
--- vendor/nginx-1.11.3/src/os/win32/ngx_win32_init.c    2016-09-27 21:40:31 +0900 (9b26db5)
+++ vendor/nginx-1.11.4/src/os/win32/ngx_win32_init.c    2016-09-27 23:25:47 +0900 (eb3e138)
@@ -59,12 +59,13 @@ static GUID dx_guid = WSAID_DISCONNECTEX;
 ngx_int_t
 ngx_os_init(ngx_log_t *log)
 {
-    DWORD        bytes;
-    SOCKET       s;
-    WSADATA      wsd;
-    ngx_err_t    err;
-    ngx_uint_t   n;
-    SYSTEM_INFO  si;
+    DWORD         bytes;
+    SOCKET        s;
+    WSADATA       wsd;
+    ngx_err_t     err;
+    ngx_time_t   *tp;
+    ngx_uint_t    n;
+    SYSTEM_INFO   si;
 
     /* get Windows version */
 
@@ -237,7 +238,8 @@ ngx_os_init(ngx_log_t *log)
         ngx_sprintf((u_char *) ngx_unique, "%P%Z", ngx_pid);
     }
 
-    srand((ngx_pid << 16) ^ (unsigned) ngx_time());
+    tp = ngx_timeofday();
+    srand((ngx_pid << 16) ^ (unsigned) tp->sec ^ tp->msec);
 
     return NGX_OK;
 }

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

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

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

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

  Renamed: vendor/nginx-1.11.4/src/stream/ngx_stream.c (+2 -0) 99%
===================================================================
--- vendor/nginx-1.11.3/src/stream/ngx_stream.c    2016-09-27 21:40:31 +0900 (c195171)
+++ vendor/nginx-1.11.4/src/stream/ngx_stream.c    2016-09-27 23:25:47 +0900 (873e102)
@@ -455,6 +455,7 @@ ngx_stream_add_addrs(ngx_conf_t *cf, ngx_stream_port_t *stport,
 #if (NGX_STREAM_SSL)
         addrs[i].conf.ssl = addr[i].opt.ssl;
 #endif
+        addrs[i].conf.proxy_protocol = addr[i].opt.proxy_protocol;
 
         len = ngx_sock_ntop(&addr[i].opt.sockaddr.sockaddr, addr[i].opt.socklen,
                             buf, NGX_SOCKADDR_STRLEN, 1);
@@ -504,6 +505,7 @@ ngx_stream_add_addrs6(ngx_conf_t *cf, ngx_stream_port_t *stport,
 #if (NGX_STREAM_SSL)
         addrs6[i].conf.ssl = addr[i].opt.ssl;
 #endif
+        addrs6[i].conf.proxy_protocol = addr[i].opt.proxy_protocol;
 
         len = ngx_sock_ntop(&addr[i].opt.sockaddr.sockaddr, addr[i].opt.socklen,
                             buf, NGX_SOCKADDR_STRLEN, 1);

  Renamed: vendor/nginx-1.11.4/src/stream/ngx_stream.h (+29 -4) 84%
===================================================================
--- vendor/nginx-1.11.3/src/stream/ngx_stream.h    2016-09-27 21:40:31 +0900 (807ab5b)
+++ vendor/nginx-1.11.4/src/stream/ngx_stream.h    2016-09-27 23:25:47 +0900 (6251cc7)
@@ -26,6 +26,14 @@ typedef struct ngx_stream_session_s  ngx_stream_session_t;
 #include <ngx_stream_upstream_round_robin.h>
 
 
+#define NGX_STREAM_OK                        200
+#define NGX_STREAM_BAD_REQUEST               400
+#define NGX_STREAM_FORBIDDEN                 403
+#define NGX_STREAM_INTERNAL_SERVER_ERROR     500
+#define NGX_STREAM_BAD_GATEWAY               502
+#define NGX_STREAM_SERVICE_UNAVAILABLE       503
+
+
 typedef struct {
     void                         **main_conf;
     void                         **srv_conf;
@@ -51,6 +59,7 @@ typedef struct {
     unsigned                       reuseport:1;
 #endif
     unsigned                       so_keepalive:2;
+    unsigned                       proxy_protocol:1;
 #if (NGX_HAVE_KEEPALIVE_TUNABLE)
     int                            tcp_keepidle;
     int                            tcp_keepintvl;
@@ -65,8 +74,9 @@ typedef struct {
     ngx_stream_conf_ctx_t         *ctx;
     ngx_str_t                      addr_text;
 #if (NGX_STREAM_SSL)
-    ngx_uint_t                     ssl;    /* unsigned   ssl:1; */
+    unsigned                       ssl:1;
 #endif
+    unsigned                       proxy_protocol:1;
 } ngx_stream_addr_conf_t;
 
 typedef struct {
@@ -112,8 +122,10 @@ 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_hash_t                     variables_hash;
 
@@ -136,7 +148,7 @@ typedef struct {
     ngx_stream_conf_ctx_t         *ctx;
 
     u_char                        *file_name;
-    ngx_int_t                      line;
+    ngx_uint_t                     line;
 
     ngx_flag_t                     tcp_nodelay;
 
@@ -144,6 +156,10 @@ typedef struct {
 
     ngx_msec_t                     resolver_timeout;
     ngx_resolver_t                *resolver;
+
+    ngx_msec_t                     proxy_protocol_timeout;
+
+    ngx_uint_t                     listen;  /* unsigned  listen:1; */
 } ngx_stream_core_srv_conf_t;
 
 
@@ -153,6 +169,8 @@ struct ngx_stream_session_s {
     ngx_connection_t              *connection;
 
     off_t                          received;
+    time_t                         start_sec;
+    ngx_msec_t                     start_msec;
 
     ngx_log_handler_pt             log_handler;
 
@@ -161,7 +179,8 @@ struct ngx_stream_session_s {
     void                         **srv_conf;
 
     ngx_stream_upstream_t         *upstream;
-
+    ngx_array_t                   *upstream_states;
+                                           /* of ngx_stream_upstream_state_t */
     ngx_stream_variable_value_t   *variables;
 
 #if (NGX_PCRE)
@@ -169,6 +188,12 @@ struct ngx_stream_session_s {
     int                           *captures;
     u_char                        *captures_data;
 #endif
+
+    ngx_uint_t                     status;
+
+#if (NGX_STREAM_SSL)
+    ngx_uint_t                     ssl;  /* unsigned  ssl:1; */
+#endif
 };
 
 
@@ -219,7 +244,7 @@ typedef struct {
 
 
 void ngx_stream_init_connection(ngx_connection_t *c);
-void ngx_stream_close_connection(ngx_connection_t *c);
+void ngx_stream_finalize_session(ngx_stream_session_t *s, ngx_uint_t rc);
 
 
 extern ngx_module_t  ngx_stream_module;

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

  Renamed: vendor/nginx-1.11.4/src/stream/ngx_stream_core_module.c (+31 -0) 94%
===================================================================
--- vendor/nginx-1.11.3/src/stream/ngx_stream_core_module.c    2016-09-27 21:40:31 +0900 (70b9e2d)
+++ vendor/nginx-1.11.4/src/stream/ngx_stream_core_module.c    2016-09-27 23:25:47 +0900 (1c808ad)
@@ -77,6 +77,13 @@ static ngx_command_t  ngx_stream_core_commands[] = {
       offsetof(ngx_stream_core_srv_conf_t, resolver_timeout),
       NULL },
 
+    { ngx_string("proxy_protocol_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, proxy_protocol_timeout),
+      NULL },
+
     { ngx_string("tcp_nodelay"),
       NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_FLAG,
       ngx_conf_set_flag_slot,
@@ -192,6 +199,7 @@ ngx_stream_core_create_srv_conf(ngx_conf_t *cf)
     cscf->file_name = cf->conf_file->file.name.data;
     cscf->line = cf->conf_file->line;
     cscf->resolver_timeout = NGX_CONF_UNSET_MSEC;
+    cscf->proxy_protocol_timeout = NGX_CONF_UNSET_MSEC;
     cscf->tcp_nodelay = NGX_CONF_UNSET;
 
     return cscf;
@@ -240,6 +248,9 @@ ngx_stream_core_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
         }
     }
 
+    ngx_conf_merge_msec_value(conf->proxy_protocol_timeout,
+                              prev->proxy_protocol_timeout, 30000);
+
     ngx_conf_merge_value(conf->tcp_nodelay, prev->tcp_nodelay, 1);
 
     return NGX_CONF_OK;
@@ -325,6 +336,13 @@ ngx_stream_core_server(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
     *cf = pcf;
 
+    if (rv == NGX_CONF_OK && !cscf->listen) {
+        ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
+                      "no \"listen\" is defined for server in %s:%ui",
+                      cscf->file_name, cscf->line);
+        return NGX_CONF_ERROR;
+    }
+
     return rv;
 }
 
@@ -332,12 +350,16 @@ ngx_stream_core_server(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 static char *
 ngx_stream_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 {
+    ngx_stream_core_srv_conf_t  *cscf = conf;
+
     ngx_str_t                    *value;
     ngx_url_t                     u;
     ngx_uint_t                    i, backlog;
     ngx_stream_listen_t          *ls, *als;
     ngx_stream_core_main_conf_t  *cmcf;
 
+    cscf->listen = 1;
+
     value = cf->args->elts;
 
     ngx_memzero(&u, sizeof(ngx_url_t));
@@ -561,6 +583,11 @@ ngx_stream_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 #endif
         }
 
+        if (ngx_strcmp(value[i].data, "proxy_protocol") == 0) {
+            ls->proxy_protocol = 1;
+            continue;
+        }
+
         ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                            "the invalid \"%V\" parameter", &value[i]);
         return NGX_CONF_ERROR;
@@ -580,6 +607,10 @@ ngx_stream_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         if (ls->so_keepalive) {
             return "\"so_keepalive\" parameter is incompatible with \"udp\"";
         }
+
+        if (ls->proxy_protocol) {
+            return "\"proxy_protocol\" parameter is incompatible with \"udp\"";
+        }
     }
 
     als = cmcf->listen.elts;

  Renamed: vendor/nginx-1.11.4/src/stream/ngx_stream_geo_module.c (+27 -13) 98%
===================================================================
--- vendor/nginx-1.11.3/src/stream/ngx_stream_geo_module.c    2016-09-27 21:40:31 +0900 (ed1a488)
+++ vendor/nginx-1.11.4/src/stream/ngx_stream_geo_module.c    2016-09-27 23:25:47 +0900 (2204546)
@@ -436,7 +436,12 @@ ngx_stream_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
             for (i = 0; i < 0x10000; i++) {
                 a = (ngx_array_t *) ctx.high.low[i];
 
-                if (a == NULL || a->nelts == 0) {
+                if (a == NULL) {
+                    continue;
+                }
+
+                if (a->nelts == 0) {
+                    ctx.high.low[i] = NULL;
                     continue;
                 }
 
@@ -885,13 +890,20 @@ ngx_stream_geo_add_range(ngx_conf_t *cf, ngx_stream_geo_conf_ctx_t *ctx,
             return NGX_CONF_ERROR;
         }
 
-        range->start = (u_short) s;
-        range->end = (u_short) e;
-        range->value = ctx->value;
+        range = a->elts;
+
+        ngx_memmove(&range[1], &range[0],
+                    (a->nelts - 1) * sizeof(ngx_stream_geo_range_t));
+
+        range[0].start = (u_short) s;
+        range[0].end = (u_short) e;
+        range[0].value = ctx->value;
 
     next:
 
-        continue;
+        if (h == 0xffff) {
+            break;
+        }
     }
 
     return NGX_CONF_OK;
@@ -909,7 +921,7 @@ ngx_stream_geo_delete_range(ngx_conf_t *cf, ngx_stream_geo_conf_ctx_t *ctx,
 
     warn = 0;
 
-    for (n = start; n <= end; n += 0x10000) {
+    for (n = start; n <= end; n = (n + 0x10000) & 0xffff0000) {
 
         h = n >> 16;
 
@@ -928,9 +940,9 @@ ngx_stream_geo_delete_range(ngx_conf_t *cf, ngx_stream_geo_conf_ctx_t *ctx,
 
         a = (ngx_array_t *) ctx->high.low[h];
 
-        if (a == NULL) {
+        if (a == NULL || a->nelts == 0) {
             warn = 1;
-            continue;
+            goto next;
         }
 
         range = a->elts;
@@ -947,13 +959,15 @@ ngx_stream_geo_delete_range(ngx_conf_t *cf, ngx_stream_geo_conf_ctx_t *ctx,
                 break;
             }
 
-            if (s != (ngx_uint_t) range[i].start
-                && e != (ngx_uint_t) range[i].end)
-            {
-                continue;
+            if (i == a->nelts - 1) {
+                warn = 1;
             }
+        }
 
-            warn = 1;
+    next:
+
+        if (h == 0xffff) {
+            break;
         }
     }
 

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

  Renamed: vendor/nginx-1.11.4/src/stream/ngx_stream_handler.c (+203 -35) 60%
===================================================================
--- vendor/nginx-1.11.3/src/stream/ngx_stream_handler.c    2016-09-27 21:40:31 +0900 (61169e1)
+++ vendor/nginx-1.11.4/src/stream/ngx_stream_handler.c    2016-09-27 23:25:47 +0900 (6e2ed82)
@@ -11,8 +11,10 @@
 #include <ngx_stream.h>
 
 
+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_init_session(ngx_connection_t *c);
+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);
@@ -23,11 +25,11 @@ static void ngx_stream_ssl_handshake_handler(ngx_connection_t *c);
 void
 ngx_stream_init_connection(ngx_connection_t *c)
 {
-    int                           tcp_nodelay;
     u_char                        text[NGX_SOCKADDR_STRLEN];
     size_t                        len;
-    ngx_int_t                     rc;
     ngx_uint_t                    i;
+    ngx_time_t                   *tp;
+    ngx_event_t                  *rev;
     struct sockaddr              *sa;
     ngx_stream_port_t            *port;
     struct sockaddr_in           *sin;
@@ -128,6 +130,10 @@ ngx_stream_init_connection(ngx_connection_t *c)
     s->main_conf = addr_conf->ctx->main_conf;
     s->srv_conf = addr_conf->ctx->srv_conf;
 
+#if (NGX_STREAM_SSL)
+    s->ssl = addr_conf->ssl;
+#endif
+
     s->connection = c;
     c->data = s;
 
@@ -147,6 +153,12 @@ ngx_stream_init_connection(ngx_connection_t *c)
     c->log->action = "initializing connection";
     c->log_error = NGX_ERROR_INFO;
 
+    s->ctx = ngx_pcalloc(c->pool, sizeof(void *) * ngx_stream_max_module);
+    if (s->ctx == NULL) {
+        ngx_stream_close_connection(c);
+        return;
+    }
+
     cmcf = ngx_stream_get_module_main_conf(s, ngx_stream_core_module);
 
     s->variables = ngx_pcalloc(s->connection->pool,
@@ -158,11 +170,151 @@ ngx_stream_init_connection(ngx_connection_t *c)
         return;
     }
 
+    tp = ngx_timeofday();
+    s->start_sec = tp->sec;
+    s->start_msec = tp->msec;
+
+    rev = c->read;
+    rev->handler = ngx_stream_init_session_handler;
+
+    if (addr_conf->proxy_protocol) {
+        c->log->action = "reading PROXY protocol";
+
+        rev->handler = ngx_stream_proxy_protocol_handler;
+
+        if (!rev->ready) {
+            ngx_add_timer(rev, cscf->proxy_protocol_timeout);
+
+            if (ngx_handle_read_event(rev, 0) != NGX_OK) {
+                ngx_stream_finalize_session(s,
+                                            NGX_STREAM_INTERNAL_SERVER_ERROR);
+            }
+
+            return;
+        }
+    }
+
+    if (ngx_use_accept_mutex) {
+        ngx_post_event(rev, &ngx_posted_events);
+        return;
+    }
+
+    rev->handler(rev);
+}
+
+
+static void
+ngx_stream_proxy_protocol_handler(ngx_event_t *rev)
+{
+    u_char                      *p, buf[NGX_PROXY_PROTOCOL_MAX_HEADER];
+    size_t                       size;
+    ssize_t                      n;
+    ngx_err_t                    err;
+    ngx_connection_t            *c;
+    ngx_stream_session_t        *s;
+    ngx_stream_core_srv_conf_t  *cscf;
+
+    c = rev->data;
+    s = c->data;
+
+    ngx_log_debug0(NGX_LOG_DEBUG_STREAM, c->log, 0,
+                   "stream PROXY protocol handler");
+
+    if (rev->timedout) {
+        ngx_log_error(NGX_LOG_INFO, c->log, NGX_ETIMEDOUT, "client timed out");
+        ngx_stream_finalize_session(s, NGX_STREAM_OK);
+        return;
+    }
+
+    n = recv(c->fd, (char *) buf, sizeof(buf), MSG_PEEK);
+
+    err = ngx_socket_errno;
+
+    ngx_log_debug1(NGX_LOG_DEBUG_STREAM, c->log, 0, "recv(): %z", n);
+
+    if (n == -1) {
+        if (err == NGX_EAGAIN) {
+            rev->ready = 0;
+
+            if (!rev->timer_set) {
+                cscf = ngx_stream_get_module_srv_conf(s,
+                                                      ngx_stream_core_module);
+
+                ngx_add_timer(rev, cscf->proxy_protocol_timeout);
+            }
+
+            if (ngx_handle_read_event(rev, 0) != NGX_OK) {
+                ngx_stream_finalize_session(s,
+                                            NGX_STREAM_INTERNAL_SERVER_ERROR);
+            }
+
+            return;
+        }
+
+        ngx_connection_error(c, err, "recv() failed");
+
+        ngx_stream_finalize_session(s, NGX_STREAM_OK);
+        return;
+    }
+
+    if (rev->timer_set) {
+        ngx_del_timer(rev);
+    }
+
+    p = ngx_proxy_protocol_read(c, buf, buf + n);
+
+    if (p == NULL) {
+        ngx_stream_finalize_session(s, NGX_STREAM_BAD_REQUEST);
+        return;
+    }
+
+    size = p - buf;
+
+    if (c->recv(c, buf, size) != (ssize_t) size) {
+        ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
+        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_DECLINED) {
-            ngx_stream_close_connection(c);
+        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;
         }
     }
@@ -170,12 +322,19 @@ ngx_stream_init_connection(ngx_connection_t *c)
     if (cmcf->access_handler) {
         rc = cmcf->access_handler(s);
 
-        if (rc != NGX_OK && rc != NGX_DECLINED) {
-            ngx_stream_close_connection(c);
+        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)
@@ -189,7 +348,7 @@ ngx_stream_init_connection(ngx_connection_t *c)
         {
             ngx_connection_error(c, ngx_socket_errno,
                                  "setsockopt(TCP_NODELAY) failed");
-            ngx_stream_close_connection(c);
+            ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
             return;
         }
 
@@ -203,14 +362,14 @@ ngx_stream_init_connection(ngx_connection_t *c)
 
     sslcf = ngx_stream_get_module_srv_conf(s, ngx_stream_ssl_module);
 
-    if (addr_conf->ssl) {
+    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_close_connection(c);
+            ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
             return;
         }
 
@@ -220,27 +379,8 @@ ngx_stream_init_connection(ngx_connection_t *c)
     }
 #endif
 
-    ngx_stream_init_session(c);
-}
-
-
-static void
-ngx_stream_init_session(ngx_connection_t *c)
-{
-    ngx_stream_session_t        *s;
-    ngx_stream_core_srv_conf_t  *cscf;
-
-    s = c->data;
     c->log->action = "handling client connection";
 
-    cscf = ngx_stream_get_module_srv_conf(s, ngx_stream_core_module);
-
-    s->ctx = ngx_pcalloc(c->pool, sizeof(void *) * ngx_stream_max_module);
-    if (s->ctx == NULL) {
-        ngx_stream_close_connection(c);
-        return;
-    }
-
     cscf->handler(s);
 }
 
@@ -253,15 +393,14 @@ ngx_stream_ssl_init_connection(ngx_ssl_t *ssl, ngx_connection_t *c)
     ngx_stream_session_t   *s;
     ngx_stream_ssl_conf_t  *sslcf;
 
+    s = c->data;
+
     if (ngx_ssl_create_connection(ssl, c, 0) == NGX_ERROR) {
-        ngx_stream_close_connection(c);
+        ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
         return;
     }
 
     if (ngx_ssl_handshake(c) == NGX_AGAIN) {
-
-        s = c->data;
-
         sslcf = ngx_stream_get_module_srv_conf(s, ngx_stream_ssl_module);
 
         ngx_add_timer(c->read, sslcf->handshake_timeout);
@@ -278,8 +417,11 @@ ngx_stream_ssl_init_connection(ngx_ssl_t *ssl, ngx_connection_t *c)
 static void
 ngx_stream_ssl_handshake_handler(ngx_connection_t *c)
 {
+    ngx_stream_session_t        *s;
+    ngx_stream_core_srv_conf_t  *cscf;
+
     if (!c->ssl->handshaked) {
-        ngx_stream_close_connection(c);
+        ngx_stream_finalize_session(c->data, NGX_STREAM_INTERNAL_SERVER_ERROR);
         return;
     }
 
@@ -287,13 +429,39 @@ ngx_stream_ssl_handshake_handler(ngx_connection_t *c)
         ngx_del_timer(c->read);
     }
 
-    ngx_stream_init_session(c);
+    c->log->action = "handling client connection";
+
+    s = c->data;
+
+    cscf = ngx_stream_get_module_srv_conf(s, ngx_stream_core_module);
+
+    cscf->handler(s);
 }
 
 #endif
 
 
 void
+ngx_stream_finalize_session(ngx_stream_session_t *s, ngx_uint_t rc)
+{
+    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);
+    }
+
+    ngx_stream_close_connection(s->connection);
+}
+
+
+static void
 ngx_stream_close_connection(ngx_connection_t *c)
 {
     ngx_pool_t  *pool;

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

  Renamed: vendor/nginx-1.11.4/src/stream/ngx_stream_log_module.c (+264 -584) 53%
===================================================================
--- vendor/nginx-1.11.3/src/http/modules/ngx_http_log_module.c    2016-09-27 21:40:31 +0900 (c42fb08)
+++ vendor/nginx-1.11.4/src/stream/ngx_stream_log_module.c    2016-09-27 23:25:47 +0900 (4affbdf)
@@ -7,169 +7,148 @@
 
 #include <ngx_config.h>
 #include <ngx_core.h>
-#include <ngx_http.h>
+#include <ngx_stream.h>
 
 #if (NGX_ZLIB)
 #include <zlib.h>
 #endif
 
 
-typedef struct ngx_http_log_op_s  ngx_http_log_op_t;
+typedef struct ngx_stream_log_op_s  ngx_stream_log_op_t;
 
-typedef u_char *(*ngx_http_log_op_run_pt) (ngx_http_request_t *r, u_char *buf,
-    ngx_http_log_op_t *op);
+typedef u_char *(*ngx_stream_log_op_run_pt) (ngx_stream_session_t *s,
+    u_char *buf, ngx_stream_log_op_t *op);
 
-typedef size_t (*ngx_http_log_op_getlen_pt) (ngx_http_request_t *r,
+typedef size_t (*ngx_stream_log_op_getlen_pt) (ngx_stream_session_t *s,
     uintptr_t data);
 
 
-struct ngx_http_log_op_s {
-    size_t                      len;
-    ngx_http_log_op_getlen_pt   getlen;
-    ngx_http_log_op_run_pt      run;
-    uintptr_t                   data;
+struct ngx_stream_log_op_s {
+    size_t                       len;
+    ngx_stream_log_op_getlen_pt  getlen;
+    ngx_stream_log_op_run_pt     run;
+    uintptr_t                    data;
 };
 
 
 typedef struct {
-    ngx_str_t                   name;
-    ngx_array_t                *flushes;
-    ngx_array_t                *ops;        /* array of ngx_http_log_op_t */
-} ngx_http_log_fmt_t;
+    ngx_str_t                    name;
+    ngx_array_t                 *flushes;
+    ngx_array_t                 *ops;        /* array of ngx_stream_log_op_t */
+} ngx_stream_log_fmt_t;
 
 
 typedef struct {
-    ngx_array_t                 formats;    /* array of ngx_http_log_fmt_t */
-    ngx_uint_t                  combined_used; /* unsigned  combined_used:1 */
-} ngx_http_log_main_conf_t;
+    ngx_array_t                  formats;    /* array of ngx_stream_log_fmt_t */
+} ngx_stream_log_main_conf_t;
 
 
 typedef struct {
-    u_char                     *start;
-    u_char                     *pos;
-    u_char                     *last;
+    u_char                      *start;
+    u_char                      *pos;
+    u_char                      *last;
 
-    ngx_event_t                *event;
-    ngx_msec_t                  flush;
-    ngx_int_t                   gzip;
-} ngx_http_log_buf_t;
+    ngx_event_t                 *event;
+    ngx_msec_t                   flush;
+    ngx_int_t                    gzip;
+} ngx_stream_log_buf_t;
 
 
 typedef struct {
-    ngx_array_t                *lengths;
-    ngx_array_t                *values;
-} ngx_http_log_script_t;
+    ngx_array_t                 *lengths;
+    ngx_array_t                 *values;
+} ngx_stream_log_script_t;
 
 
 typedef struct {
-    ngx_open_file_t            *file;
-    ngx_http_log_script_t      *script;
-    time_t                      disk_full_time;
-    time_t                      error_log_time;
-    ngx_syslog_peer_t          *syslog_peer;
-    ngx_http_log_fmt_t         *format;
-    ngx_http_complex_value_t   *filter;
-} ngx_http_log_t;
+    ngx_open_file_t             *file;
+    ngx_stream_log_script_t     *script;
+    time_t                       disk_full_time;
+    time_t                       error_log_time;
+    ngx_syslog_peer_t           *syslog_peer;
+    ngx_stream_log_fmt_t        *format;
+    ngx_stream_complex_value_t  *filter;
+} ngx_stream_log_t;
 
 
 typedef struct {
-    ngx_array_t                *logs;       /* array of ngx_http_log_t */
+    ngx_array_t                 *logs;       /* array of ngx_stream_log_t */
 
-    ngx_open_file_cache_t      *open_file_cache;
-    time_t                      open_file_cache_valid;
-    ngx_uint_t                  open_file_cache_min_uses;
+    ngx_open_file_cache_t       *open_file_cache;
+    time_t                       open_file_cache_valid;
+    ngx_uint_t                   open_file_cache_min_uses;
 
-    ngx_uint_t                  off;        /* unsigned  off:1 */
-} ngx_http_log_loc_conf_t;
+    ngx_uint_t                   off;        /* unsigned  off:1 */
+} ngx_stream_log_srv_conf_t;
 
 
 typedef struct {
-    ngx_str_t                   name;
-    size_t                      len;
-    ngx_http_log_op_run_pt      run;
-} ngx_http_log_var_t;
+    ngx_str_t                    name;
+    size_t                       len;
+    ngx_stream_log_op_run_pt     run;
+} ngx_stream_log_var_t;
 
 
-static void ngx_http_log_write(ngx_http_request_t *r, ngx_http_log_t *log,
+static void ngx_stream_log_write(ngx_stream_session_t *s, ngx_stream_log_t *log,
     u_char *buf, size_t len);
-static ssize_t ngx_http_log_script_write(ngx_http_request_t *r,
-    ngx_http_log_script_t *script, u_char **name, u_char *buf, size_t len);
+static ssize_t ngx_stream_log_script_write(ngx_stream_session_t *s,
+    ngx_stream_log_script_t *script, u_char **name, u_char *buf, size_t len);
 
 #if (NGX_ZLIB)
-static ssize_t ngx_http_log_gzip(ngx_fd_t fd, u_char *buf, size_t len,
+static ssize_t ngx_stream_log_gzip(ngx_fd_t fd, u_char *buf, size_t len,
     ngx_int_t level, ngx_log_t *log);
 
-static void *ngx_http_log_gzip_alloc(void *opaque, u_int items, u_int size);
-static void ngx_http_log_gzip_free(void *opaque, void *address);
+static void *ngx_stream_log_gzip_alloc(void *opaque, u_int items, u_int size);
+static void ngx_stream_log_gzip_free(void *opaque, void *address);
 #endif
 
-static void ngx_http_log_flush(ngx_open_file_t *file, ngx_log_t *log);
-static void ngx_http_log_flush_handler(ngx_event_t *ev);
-
-static u_char *ngx_http_log_pipe(ngx_http_request_t *r, u_char *buf,
-    ngx_http_log_op_t *op);
-static u_char *ngx_http_log_time(ngx_http_request_t *r, u_char *buf,
-    ngx_http_log_op_t *op);
-static u_char *ngx_http_log_iso8601(ngx_http_request_t *r, u_char *buf,
-    ngx_http_log_op_t *op);
-static u_char *ngx_http_log_msec(ngx_http_request_t *r, u_char *buf,
-    ngx_http_log_op_t *op);
-static u_char *ngx_http_log_request_time(ngx_http_request_t *r, u_char *buf,
-    ngx_http_log_op_t *op);
-static u_char *ngx_http_log_status(ngx_http_request_t *r, u_char *buf,
-    ngx_http_log_op_t *op);
-static u_char *ngx_http_log_bytes_sent(ngx_http_request_t *r, u_char *buf,
-    ngx_http_log_op_t *op);
-static u_char *ngx_http_log_body_bytes_sent(ngx_http_request_t *r,
-    u_char *buf, ngx_http_log_op_t *op);
-static u_char *ngx_http_log_request_length(ngx_http_request_t *r, u_char *buf,
-    ngx_http_log_op_t *op);
-
-static ngx_int_t ngx_http_log_variable_compile(ngx_conf_t *cf,
-    ngx_http_log_op_t *op, ngx_str_t *value);
-static size_t ngx_http_log_variable_getlen(ngx_http_request_t *r,
+static void ngx_stream_log_flush(ngx_open_file_t *file, ngx_log_t *log);
+static void ngx_stream_log_flush_handler(ngx_event_t *ev);
+
+static ngx_int_t ngx_stream_log_variable_compile(ngx_conf_t *cf,
+    ngx_stream_log_op_t *op, ngx_str_t *value);
+static size_t ngx_stream_log_variable_getlen(ngx_stream_session_t *s,
     uintptr_t data);
-static u_char *ngx_http_log_variable(ngx_http_request_t *r, u_char *buf,
-    ngx_http_log_op_t *op);
-static uintptr_t ngx_http_log_escape(u_char *dst, u_char *src, size_t size);
+static u_char *ngx_stream_log_variable(ngx_stream_session_t *s, u_char *buf,
+    ngx_stream_log_op_t *op);
+static uintptr_t ngx_stream_log_escape(u_char *dst, u_char *src, size_t size);
 
 
-static void *ngx_http_log_create_main_conf(ngx_conf_t *cf);
-static void *ngx_http_log_create_loc_conf(ngx_conf_t *cf);
-static char *ngx_http_log_merge_loc_conf(ngx_conf_t *cf, void *parent,
+static void *ngx_stream_log_create_main_conf(ngx_conf_t *cf);
+static void *ngx_stream_log_create_srv_conf(ngx_conf_t *cf);
+static char *ngx_stream_log_merge_srv_conf(ngx_conf_t *cf, void *parent,
     void *child);
-static char *ngx_http_log_set_log(ngx_conf_t *cf, ngx_command_t *cmd,
+static char *ngx_stream_log_set_log(ngx_conf_t *cf, ngx_command_t *cmd,
     void *conf);
-static char *ngx_http_log_set_format(ngx_conf_t *cf, ngx_command_t *cmd,
+static char *ngx_stream_log_set_format(ngx_conf_t *cf, ngx_command_t *cmd,
     void *conf);
-static char *ngx_http_log_compile_format(ngx_conf_t *cf,
+static char *ngx_stream_log_compile_format(ngx_conf_t *cf,
     ngx_array_t *flushes, ngx_array_t *ops, ngx_array_t *args, ngx_uint_t s);
-static char *ngx_http_log_open_file_cache(ngx_conf_t *cf, ngx_command_t *cmd,
+static char *ngx_stream_log_open_file_cache(ngx_conf_t *cf, ngx_command_t *cmd,
     void *conf);
-static ngx_int_t ngx_http_log_init(ngx_conf_t *cf);
+static ngx_int_t ngx_stream_log_init(ngx_conf_t *cf);
 
 
-static ngx_command_t  ngx_http_log_commands[] = {
+static ngx_command_t  ngx_stream_log_commands[] = {
 
     { ngx_string("log_format"),
-      NGX_HTTP_MAIN_CONF|NGX_CONF_2MORE,
-      ngx_http_log_set_format,
-      NGX_HTTP_MAIN_CONF_OFFSET,
+      NGX_STREAM_MAIN_CONF|NGX_CONF_2MORE,
+      ngx_stream_log_set_format,
+      NGX_STREAM_MAIN_CONF_OFFSET,
       0,
       NULL },
 
     { ngx_string("access_log"),
-      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-                        |NGX_HTTP_LMT_CONF|NGX_CONF_1MORE,
-      ngx_http_log_set_log,
-      NGX_HTTP_LOC_CONF_OFFSET,
+      NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_1MORE,
+      ngx_stream_log_set_log,
+      NGX_STREAM_SRV_CONF_OFFSET,
       0,
       NULL },
 
     { ngx_string("open_log_file_cache"),
-      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1234,
-      ngx_http_log_open_file_cache,
-      NGX_HTTP_LOC_CONF_OFFSET,
+      NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_TAKE1234,
+      ngx_stream_log_open_file_cache,
+      NGX_STREAM_SRV_CONF_OFFSET,
       0,
       NULL },
 
@@ -177,26 +156,23 @@ static ngx_command_t  ngx_http_log_commands[] = {
 };
 
 
-static ngx_http_module_t  ngx_http_log_module_ctx = {
+static ngx_stream_module_t  ngx_stream_log_module_ctx = {
     NULL,                                  /* preconfiguration */
-    ngx_http_log_init,                     /* postconfiguration */
+    ngx_stream_log_init,                   /* postconfiguration */
 
-    ngx_http_log_create_main_conf,         /* create main configuration */
+    ngx_stream_log_create_main_conf,       /* create main configuration */
     NULL,                                  /* init main configuration */
 
-    NULL,                                  /* create server configuration */
-    NULL,                                  /* merge server configuration */
-
-    ngx_http_log_create_loc_conf,          /* create location configuration */
-    ngx_http_log_merge_loc_conf            /* merge location configuration */
+    ngx_stream_log_create_srv_conf,        /* create server configuration */
+    ngx_stream_log_merge_srv_conf          /* merge server configuration */
 };
 
 
-ngx_module_t  ngx_http_log_module = {
+ngx_module_t  ngx_stream_log_module = {
     NGX_MODULE_V1,
-    &ngx_http_log_module_ctx,              /* module context */
-    ngx_http_log_commands,                 /* module directives */
-    NGX_HTTP_MODULE,                       /* module type */
+    &ngx_stream_log_module_ctx,            /* module context */
+    ngx_stream_log_commands,               /* module directives */
+    NGX_STREAM_MODULE,                     /* module type */
     NULL,                                  /* init master */
     NULL,                                  /* init module */
     NULL,                                  /* init process */
@@ -208,62 +184,33 @@ ngx_module_t  ngx_http_log_module = {
 };
 
 
-static ngx_str_t  ngx_http_access_log = ngx_string(NGX_HTTP_LOG_PATH);
-
-
-static ngx_str_t  ngx_http_combined_fmt =
-    ngx_string("$remote_addr - $remote_user [$time_local] "
-               "\"$request\" $status $body_bytes_sent "
-               "\"$http_referer\" \"$http_user_agent\"");
-
-
-static ngx_http_log_var_t  ngx_http_log_vars[] = {
-    { ngx_string("pipe"), 1, ngx_http_log_pipe },
-    { ngx_string("time_local"), sizeof("28/Sep/1970:12:00:00 +0600") - 1,
-                          ngx_http_log_time },
-    { ngx_string("time_iso8601"), sizeof("1970-09-28T12:00:00+06:00") - 1,
-                          ngx_http_log_iso8601 },
-    { ngx_string("msec"), NGX_TIME_T_LEN + 4, ngx_http_log_msec },
-    { ngx_string("request_time"), NGX_TIME_T_LEN + 4,
-                          ngx_http_log_request_time },
-    { ngx_string("status"), NGX_INT_T_LEN, ngx_http_log_status },
-    { ngx_string("bytes_sent"), NGX_OFF_T_LEN, ngx_http_log_bytes_sent },
-    { ngx_string("body_bytes_sent"), NGX_OFF_T_LEN,
-                          ngx_http_log_body_bytes_sent },
-    { ngx_string("request_length"), NGX_SIZE_T_LEN,
-                          ngx_http_log_request_length },
-
-    { ngx_null_string, 0, NULL }
-};
-
-
 static ngx_int_t
-ngx_http_log_handler(ngx_http_request_t *r)
+ngx_stream_log_handler(ngx_stream_session_t *s)
 {
-    u_char                   *line, *p;
-    size_t                    len, size;
-    ssize_t                   n;
-    ngx_str_t                 val;
-    ngx_uint_t                i, l;
-    ngx_http_log_t           *log;
-    ngx_http_log_op_t        *op;
-    ngx_http_log_buf_t       *buffer;
-    ngx_http_log_loc_conf_t  *lcf;
-
-    ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                   "http log handler");
-
-    lcf = ngx_http_get_module_loc_conf(r, ngx_http_log_module);
-
-    if (lcf->off) {
+    u_char                     *line, *p;
+    size_t                      len, size;
+    ssize_t                     n;
+    ngx_str_t                   val;
+    ngx_uint_t                  i, l;
+    ngx_stream_log_t           *log;
+    ngx_stream_log_op_t        *op;
+    ngx_stream_log_buf_t       *buffer;
+    ngx_stream_log_srv_conf_t  *lscf;
+
+    ngx_log_debug0(NGX_LOG_DEBUG_STREAM, s->connection->log, 0,
+                   "stream log handler");
+
+    lscf = ngx_stream_get_module_srv_conf(s, ngx_stream_log_module);
+
+    if (lscf->off || lscf->logs == NULL) {
         return NGX_OK;
     }
 
-    log = lcf->logs->elts;
-    for (l = 0; l < lcf->logs->nelts; l++) {
+    log = lscf->logs->elts;
+    for (l = 0; l < lscf->logs->nelts; l++) {
 
         if (log[l].filter) {
-            if (ngx_http_complex_value(r, log[l].filter, &val) != NGX_OK) {
+            if (ngx_stream_complex_value(s, log[l].filter, &val) != NGX_OK) {
                 return NGX_ERROR;
             }
 
@@ -283,13 +230,14 @@ ngx_http_log_handler(ngx_http_request_t *r)
             continue;
         }
 
-        ngx_http_script_flush_no_cacheable_variables(r, log[l].format->flushes);
+        ngx_stream_script_flush_no_cacheable_variables(s,
+                                                       log[l].format->flushes);
 
         len = 0;
         op = log[l].format->ops->elts;
         for (i = 0; i < log[l].format->ops->nelts; i++) {
             if (op[i].len == 0) {
-                len += op[i].getlen(r, op[i].data);
+                len += op[i].getlen(s, op[i].data);
 
             } else {
                 len += op[i].len;
@@ -314,8 +262,8 @@ ngx_http_log_handler(ngx_http_request_t *r)
 
             if (len > (size_t) (buffer->last - buffer->pos)) {
 
-                ngx_http_log_write(r, &log[l], buffer->start,
-                                   buffer->pos - buffer->start);
+                ngx_stream_log_write(s, &log[l], buffer->start,
+                                     buffer->pos - buffer->start);
 
                 buffer->pos = buffer->start;
             }
@@ -329,7 +277,7 @@ ngx_http_log_handler(ngx_http_request_t *r)
                 }
 
                 for (i = 0; i < log[l].format->ops->nelts; i++) {
-                    p = op[i].run(r, p, &op[i]);
+                    p = op[i].run(s, p, &op[i]);
                 }
 
                 ngx_linefeed(p);
@@ -346,7 +294,7 @@ ngx_http_log_handler(ngx_http_request_t *r)
 
     alloc_line:
 
-        line = ngx_pnalloc(r->pool, len);
+        line = ngx_pnalloc(s->connection->pool, len);
         if (line == NULL) {
             return NGX_ERROR;
         }
@@ -358,7 +306,7 @@ ngx_http_log_handler(ngx_http_request_t *r)
         }
 
         for (i = 0; i < log[l].format->ops->nelts; i++) {
-            p = op[i].run(r, p, &op[i]);
+            p = op[i].run(s, p, &op[i]);
         }
 
         if (log[l].syslog_peer) {
@@ -368,11 +316,11 @@ ngx_http_log_handler(ngx_http_request_t *r)
             n = ngx_syslog_send(log[l].syslog_peer, line, size);
 
             if (n < 0) {
-                ngx_log_error(NGX_LOG_WARN, r->connection->log, 0,
+                ngx_log_error(NGX_LOG_WARN, s->connection->log, 0,
                               "send() to syslog failed");
 
             } else if ((size_t) n != size) {
-                ngx_log_error(NGX_LOG_WARN, r->connection->log, 0,
+                ngx_log_error(NGX_LOG_WARN, s->connection->log, 0,
                               "send() to syslog has written only %z of %uz",
                               n, size);
             }
@@ -382,7 +330,7 @@ ngx_http_log_handler(ngx_http_request_t *r)
 
         ngx_linefeed(p);
 
-        ngx_http_log_write(r, &log[l], line, p - line);
+        ngx_stream_log_write(s, &log[l], line, p - line);
     }
 
     return NGX_OK;
@@ -390,15 +338,15 @@ ngx_http_log_handler(ngx_http_request_t *r)
 
 
 static void
-ngx_http_log_write(ngx_http_request_t *r, ngx_http_log_t *log, u_char *buf,
-    size_t len)
+ngx_stream_log_write(ngx_stream_session_t *s, ngx_stream_log_t *log,
+    u_char *buf, size_t len)
 {
-    u_char              *name;
-    time_t               now;
-    ssize_t              n;
-    ngx_err_t            err;
+    u_char                *name;
+    time_t                 now;
+    ssize_t                n;
+    ngx_err_t              err;
 #if (NGX_ZLIB)
-    ngx_http_log_buf_t  *buffer;
+    ngx_stream_log_buf_t  *buffer;
 #endif
 
     if (log->script == NULL) {
@@ -408,8 +356,8 @@ ngx_http_log_write(ngx_http_request_t *r, ngx_http_log_t *log, u_char *buf,
         buffer = log->file->data;
 
         if (buffer && buffer->gzip) {
-            n = ngx_http_log_gzip(log->file->fd, buf, len, buffer->gzip,
-                                  r->connection->log);
+            n = ngx_stream_log_gzip(log->file->fd, buf, len, buffer->gzip,
+                                    s->connection->log);
         } else {
             n = ngx_write_fd(log->file->fd, buf, len);
         }
@@ -419,7 +367,7 @@ ngx_http_log_write(ngx_http_request_t *r, ngx_http_log_t *log, u_char *buf,
 
     } else {
         name = NULL;
-        n = ngx_http_log_script_write(r, log->script, &name, buf, len);
+        n = ngx_stream_log_script_write(s, log->script, &name, buf, len);
     }
 
     if (n == (ssize_t) len) {
@@ -436,7 +384,7 @@ ngx_http_log_write(ngx_http_request_t *r, ngx_http_log_t *log, u_char *buf,
         }
 
         if (now - log->error_log_time > 59) {
-            ngx_log_error(NGX_LOG_ALERT, r->connection->log, err,
+            ngx_log_error(NGX_LOG_ALERT, s->connection->log, err,
                           ngx_write_fd_n " to \"%s\" failed", name);
 
             log->error_log_time = now;
@@ -446,7 +394,7 @@ ngx_http_log_write(ngx_http_request_t *r, ngx_http_log_t *log, u_char *buf,
     }
 
     if (now - log->error_log_time > 59) {
-        ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
+        ngx_log_error(NGX_LOG_ALERT, s->connection->log, 0,
                       ngx_write_fd_n " to \"%s\" was incomplete: %z of %uz",
                       name, n, len);
 
@@ -456,69 +404,16 @@ ngx_http_log_write(ngx_http_request_t *r, ngx_http_log_t *log, u_char *buf,
 
 
 static ssize_t
-ngx_http_log_script_write(ngx_http_request_t *r, ngx_http_log_script_t *script,
-    u_char **name, u_char *buf, size_t len)
+ngx_stream_log_script_write(ngx_stream_session_t *s,
+    ngx_stream_log_script_t *script, u_char **name, u_char *buf, size_t len)
 {
-    size_t                     root;
-    ssize_t                    n;
-    ngx_str_t                  log, path;
-    ngx_open_file_info_t       of;
-    ngx_http_log_loc_conf_t   *llcf;
-    ngx_http_core_loc_conf_t  *clcf;
-
-    clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
-
-    if (!r->root_tested) {
-
-        /* test root directory existence */
-
-        if (ngx_http_map_uri_to_path(r, &path, &root, 0) == NULL) {
-            /* simulate successful logging */
-            return len;
-        }
-
-        path.data[root] = '\0';
-
-        ngx_memzero(&of, sizeof(ngx_open_file_info_t));
-
-        of.valid = clcf->open_file_cache_valid;
-        of.min_uses = clcf->open_file_cache_min_uses;
-        of.test_dir = 1;
-        of.test_only = 1;
-        of.errors = clcf->open_file_cache_errors;
-        of.events = clcf->open_file_cache_events;
-
-        if (ngx_http_set_disable_symlinks(r, clcf, &path, &of) != NGX_OK) {
-            /* simulate successful logging */
-            return len;
-        }
+    ssize_t                     n;
+    ngx_str_t                   log;
+    ngx_open_file_info_t        of;
+    ngx_stream_log_srv_conf_t  *lscf;
 
-        if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool)
-            != NGX_OK)
-        {
-            if (of.err == 0) {
-                /* simulate successful logging */
-                return len;
-            }
-
-            ngx_log_error(NGX_LOG_ERR, r->connection->log, of.err,
-                          "testing \"%s\" existence failed", path.data);
-
-            /* simulate successful logging */
-            return len;
-        }
-
-        if (!of.is_dir) {
-            ngx_log_error(NGX_LOG_ERR, r->connection->log, NGX_ENOTDIR,
-                          "testing \"%s\" existence failed", path.data);
-
-            /* simulate successful logging */
-            return len;
-        }
-    }
-
-    if (ngx_http_script_run(r, &log, script->lengths->elts, 1,
-                            script->values->elts)
+    if (ngx_stream_script_run(s, &log, script->lengths->elts, 1,
+                              script->values->elts)
         == NULL)
     {
         /* simulate successful logging */
@@ -528,34 +423,30 @@ ngx_http_log_script_write(ngx_http_request_t *r, ngx_http_log_script_t *script,
     log.data[log.len - 1] = '\0';
     *name = log.data;
 
-    ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                   "http log \"%s\"", log.data);
+    ngx_log_debug1(NGX_LOG_DEBUG_STREAM, s->connection->log, 0,
+                   "stream log \"%s\"", log.data);
 
-    llcf = ngx_http_get_module_loc_conf(r, ngx_http_log_module);
+    lscf = ngx_stream_get_module_srv_conf(s, ngx_stream_log_module);
 
     ngx_memzero(&of, sizeof(ngx_open_file_info_t));
 
     of.log = 1;
-    of.valid = llcf->open_file_cache_valid;
-    of.min_uses = llcf->open_file_cache_min_uses;
+    of.valid = lscf->open_file_cache_valid;
+    of.min_uses = lscf->open_file_cache_min_uses;
     of.directio = NGX_OPEN_FILE_DIRECTIO_OFF;
 
-    if (ngx_http_set_disable_symlinks(r, clcf, &log, &of) != NGX_OK) {
-        /* simulate successful logging */
-        return len;
-    }
-
-    if (ngx_open_cached_file(llcf->open_file_cache, &log, &of, r->pool)
+    if (ngx_open_cached_file(lscf->open_file_cache, &log, &of,
+                             s->connection->pool)
         != NGX_OK)
     {
-        ngx_log_error(NGX_LOG_CRIT, r->connection->log, ngx_errno,
+        ngx_log_error(NGX_LOG_CRIT, s->connection->log, ngx_errno,
                       "%s \"%s\" failed", of.failed, log.data);
         /* simulate successful logging */
         return len;
     }
 
-    ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                   "http log #%d", of.fd);
+    ngx_log_debug1(NGX_LOG_DEBUG_STREAM, s->connection->log, 0,
+                   "stream log #%d", of.fd);
 
     n = ngx_write_fd(of.fd, buf, len);
 
@@ -566,7 +457,7 @@ ngx_http_log_script_write(ngx_http_request_t *r, ngx_http_log_script_t *script,
 #if (NGX_ZLIB)
 
 static ssize_t
-ngx_http_log_gzip(ngx_fd_t fd, u_char *buf, size_t len, ngx_int_t level,
+ngx_stream_log_gzip(ngx_fd_t fd, u_char *buf, size_t len, ngx_int_t level,
     ngx_log_t *log)
 {
     int          rc, wbits, memlevel;
@@ -602,8 +493,8 @@ ngx_http_log_gzip(ngx_fd_t fd, u_char *buf, size_t len, ngx_int_t level,
 
     pool->log = log;
 
-    zstream.zalloc = ngx_http_log_gzip_alloc;
-    zstream.zfree = ngx_http_log_gzip_free;
+    zstream.zalloc = ngx_stream_log_gzip_alloc;
+    zstream.zfree = ngx_stream_log_gzip_free;
     zstream.opaque = pool;
 
     out = ngx_pnalloc(pool, size);
@@ -624,7 +515,7 @@ ngx_http_log_gzip(ngx_fd_t fd, u_char *buf, size_t len, ngx_int_t level,
         goto done;
     }
 
-    ngx_log_debug4(NGX_LOG_DEBUG_HTTP, log, 0,
+    ngx_log_debug4(NGX_LOG_DEBUG_STREAM, log, 0,
                    "deflate in: ni:%p no:%p ai:%ud ao:%ud",
                    zstream.next_in, zstream.next_out,
                    zstream.avail_in, zstream.avail_out);
@@ -637,7 +528,7 @@ ngx_http_log_gzip(ngx_fd_t fd, u_char *buf, size_t len, ngx_int_t level,
         goto done;
     }
 
-    ngx_log_debug5(NGX_LOG_DEBUG_HTTP, log, 0,
+    ngx_log_debug5(NGX_LOG_DEBUG_STREAM, log, 0,
                    "deflate out: ni:%p no:%p ai:%ud ao:%ud rc:%d",
                    zstream.next_in, zstream.next_out,
                    zstream.avail_in, zstream.avail_out,
@@ -673,11 +564,11 @@ done:
 
 
 static void *
-ngx_http_log_gzip_alloc(void *opaque, u_int items, u_int size)
+ngx_stream_log_gzip_alloc(void *opaque, u_int items, u_int size)
 {
     ngx_pool_t *pool = opaque;
 
-    ngx_log_debug2(NGX_LOG_DEBUG_HTTP, pool->log, 0,
+    ngx_log_debug2(NGX_LOG_DEBUG_STREAM, pool->log, 0,
                    "gzip alloc: n:%ud s:%ud", items, size);
 
     return ngx_palloc(pool, items * size);
@@ -685,12 +576,13 @@ ngx_http_log_gzip_alloc(void *opaque, u_int items, u_int size)
 
 
 static void
-ngx_http_log_gzip_free(void *opaque, void *address)
+ngx_stream_log_gzip_free(void *opaque, void *address)
 {
 #if 0
     ngx_pool_t *pool = opaque;
 
-    ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pool->log, 0, "gzip free: %p", address);
+    ngx_log_debug1(NGX_LOG_DEBUG_STREAM, pool->log, 0,
+                   "gzip free: %p", address);
 #endif
 }
 
@@ -698,11 +590,11 @@ ngx_http_log_gzip_free(void *opaque, void *address)
 
 
 static void
-ngx_http_log_flush(ngx_open_file_t *file, ngx_log_t *log)
+ngx_stream_log_flush(ngx_open_file_t *file, ngx_log_t *log)
 {
-    size_t               len;
-    ssize_t              n;
-    ngx_http_log_buf_t  *buffer;
+    size_t                 len;
+    ssize_t                n;
+    ngx_stream_log_buf_t  *buffer;
 
     buffer = file->data;
 
@@ -714,7 +606,8 @@ ngx_http_log_flush(ngx_open_file_t *file, ngx_log_t *log)
 
 #if (NGX_ZLIB)
     if (buffer->gzip) {
-        n = ngx_http_log_gzip(file->fd, buffer->start, len, buffer->gzip, log);
+        n = ngx_stream_log_gzip(file->fd, buffer->start, len, buffer->gzip,
+                                log);
     } else {
         n = ngx_write_fd(file->fd, buffer->start, len);
     }
@@ -742,16 +635,16 @@ ngx_http_log_flush(ngx_open_file_t *file, ngx_log_t *log)
 
 
 static void
-ngx_http_log_flush_handler(ngx_event_t *ev)
+ngx_stream_log_flush_handler(ngx_event_t *ev)
 {
-    ngx_open_file_t     *file;
-    ngx_http_log_buf_t  *buffer;
+    ngx_open_file_t       *file;
+    ngx_stream_log_buf_t  *buffer;
 
     ngx_log_debug0(NGX_LOG_DEBUG_EVENT, ev->log, 0,
-                   "http log buffer flush handler");
+                   "stream log buffer flush handler");
 
     if (ev->timedout) {
-        ngx_http_log_flush(ev->data, ev->log);
+        ngx_stream_log_flush(ev->data, ev->log);
         return;
     }
 
@@ -765,8 +658,8 @@ ngx_http_log_flush_handler(ngx_event_t *ev)
 
 
 static u_char *
-ngx_http_log_copy_short(ngx_http_request_t *r, u_char *buf,
-    ngx_http_log_op_t *op)
+ngx_stream_log_copy_short(ngx_stream_session_t *s, u_char *buf,
+    ngx_stream_log_op_t *op)
 {
     size_t     len;
     uintptr_t  data;
@@ -784,143 +677,27 @@ ngx_http_log_copy_short(ngx_http_request_t *r, u_char *buf,
 
 
 static u_char *
-ngx_http_log_copy_long(ngx_http_request_t *r, u_char *buf,
-    ngx_http_log_op_t *op)
+ngx_stream_log_copy_long(ngx_stream_session_t *s, u_char *buf,
+    ngx_stream_log_op_t *op)
 {
     return ngx_cpymem(buf, (u_char *) op->data, op->len);
 }
 
 
-static u_char *
-ngx_http_log_pipe(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op)
-{
-    if (r->pipeline) {
-        *buf = 'p';
-    } else {
-        *buf = '.';
-    }
-
-    return buf + 1;
-}
-
-
-static u_char *
-ngx_http_log_time(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op)
-{
-    return ngx_cpymem(buf, ngx_cached_http_log_time.data,
-                      ngx_cached_http_log_time.len);
-}
-
-static u_char *
-ngx_http_log_iso8601(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op)
-{
-    return ngx_cpymem(buf, ngx_cached_http_log_iso8601.data,
-                      ngx_cached_http_log_iso8601.len);
-}
-
-static u_char *
-ngx_http_log_msec(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op)
-{
-    ngx_time_t  *tp;
-
-    tp = ngx_timeofday();
-
-    return ngx_sprintf(buf, "%T.%03M", tp->sec, tp->msec);
-}
-
-
-static u_char *
-ngx_http_log_request_time(ngx_http_request_t *r, u_char *buf,
-    ngx_http_log_op_t *op)
-{
-    ngx_time_t      *tp;
-    ngx_msec_int_t   ms;
-
-    tp = ngx_timeofday();
-
-    ms = (ngx_msec_int_t)
-             ((tp->sec - r->start_sec) * 1000 + (tp->msec - r->start_msec));
-    ms = ngx_max(ms, 0);
-
-    return ngx_sprintf(buf, "%T.%03M", (time_t) ms / 1000, ms % 1000);
-}
-
-
-static u_char *
-ngx_http_log_status(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op)
-{
-    ngx_uint_t  status;
-
-    if (r->err_status) {
-        status = r->err_status;
-
-    } else if (r->headers_out.status) {
-        status = r->headers_out.status;
-
-    } else if (r->http_version == NGX_HTTP_VERSION_9) {
-        status = 9;
-
-    } else {
-        status = 0;
-    }
-
-    return ngx_sprintf(buf, "%03ui", status);
-}
-
-
-static u_char *
-ngx_http_log_bytes_sent(ngx_http_request_t *r, u_char *buf,
-    ngx_http_log_op_t *op)
-{
-    return ngx_sprintf(buf, "%O", r->connection->sent);
-}
-
-
-/*
- * although there is a real $body_bytes_sent variable,
- * this log operation code function is more optimized for logging
- */
-
-static u_char *
-ngx_http_log_body_bytes_sent(ngx_http_request_t *r, u_char *buf,
-    ngx_http_log_op_t *op)
-{
-    off_t  length;
-
-    length = r->connection->sent - r->header_size;
-
-    if (length > 0) {
-        return ngx_sprintf(buf, "%O", length);
-    }
-
-    *buf = '0';
-
-    return buf + 1;
-}
-
-
-static u_char *
-ngx_http_log_request_length(ngx_http_request_t *r, u_char *buf,
-    ngx_http_log_op_t *op)
-{
-    return ngx_sprintf(buf, "%O", r->request_length);
-}
-
-
 static ngx_int_t
-ngx_http_log_variable_compile(ngx_conf_t *cf, ngx_http_log_op_t *op,
+ngx_stream_log_variable_compile(ngx_conf_t *cf, ngx_stream_log_op_t *op,
     ngx_str_t *value)
 {
     ngx_int_t  index;
 
-    index = ngx_http_get_variable_index(cf, value);
+    index = ngx_stream_get_variable_index(cf, value);
     if (index == NGX_ERROR) {
         return NGX_ERROR;
     }
 
     op->len = 0;
-    op->getlen = ngx_http_log_variable_getlen;
-    op->run = ngx_http_log_variable;
+    op->getlen = ngx_stream_log_variable_getlen;
+    op->run = ngx_stream_log_variable;
     op->data = index;
 
     return NGX_OK;
@@ -928,18 +705,18 @@ ngx_http_log_variable_compile(ngx_conf_t *cf, ngx_http_log_op_t *op,
 
 
 static size_t
-ngx_http_log_variable_getlen(ngx_http_request_t *r, uintptr_t data)
+ngx_stream_log_variable_getlen(ngx_stream_session_t *s, uintptr_t data)
 {
-    uintptr_t                   len;
-    ngx_http_variable_value_t  *value;
+    uintptr_t                     len;
+    ngx_stream_variable_value_t  *value;
 
-    value = ngx_http_get_indexed_variable(r, data);
+    value = ngx_stream_get_indexed_variable(s, data);
 
     if (value == NULL || value->not_found) {
         return 1;
     }
 
-    len = ngx_http_log_escape(NULL, value->data, value->len);
+    len = ngx_stream_log_escape(NULL, value->data, value->len);
 
     value->escape = len ? 1 : 0;
 
@@ -948,11 +725,12 @@ ngx_http_log_variable_getlen(ngx_http_request_t *r, uintptr_t data)
 
 
 static u_char *
-ngx_http_log_variable(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op)
+ngx_stream_log_variable(ngx_stream_session_t *s, u_char *buf,
+    ngx_stream_log_op_t *op)
 {
-    ngx_http_variable_value_t  *value;
+    ngx_stream_variable_value_t  *value;
 
-    value = ngx_http_get_indexed_variable(r, op->data);
+    value = ngx_stream_get_indexed_variable(s, op->data);
 
     if (value == NULL || value->not_found) {
         *buf = '-';
@@ -963,13 +741,13 @@ ngx_http_log_variable(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op)
         return ngx_cpymem(buf, value->data, value->len);
 
     } else {
-        return (u_char *) ngx_http_log_escape(buf, value->data, value->len);
+        return (u_char *) ngx_stream_log_escape(buf, value->data, value->len);
     }
 }
 
 
 static uintptr_t
-ngx_http_log_escape(u_char *dst, u_char *src, size_t size)
+ngx_stream_log_escape(u_char *dst, u_char *src, size_t size)
 {
     ngx_uint_t      n;
     static u_char   hex[] = "0123456789ABCDEF";
@@ -1029,47 +807,32 @@ ngx_http_log_escape(u_char *dst, u_char *src, size_t size)
 
 
 static void *
-ngx_http_log_create_main_conf(ngx_conf_t *cf)
+ngx_stream_log_create_main_conf(ngx_conf_t *cf)
 {
-    ngx_http_log_main_conf_t  *conf;
-
-    ngx_http_log_fmt_t  *fmt;
+    ngx_stream_log_main_conf_t  *conf;
 
-    conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_log_main_conf_t));
+    conf = ngx_pcalloc(cf->pool, sizeof(ngx_stream_log_main_conf_t));
     if (conf == NULL) {
         return NULL;
     }
 
-    if (ngx_array_init(&conf->formats, cf->pool, 4, sizeof(ngx_http_log_fmt_t))
+    if (ngx_array_init(&conf->formats, cf->pool, 4,
+                       sizeof(ngx_stream_log_fmt_t))
         != NGX_OK)
     {
         return NULL;
     }
 
-    fmt = ngx_array_push(&conf->formats);
-    if (fmt == NULL) {
-        return NULL;
-    }
-
-    ngx_str_set(&fmt->name, "combined");
-
-    fmt->flushes = NULL;
-
-    fmt->ops = ngx_array_create(cf->pool, 16, sizeof(ngx_http_log_op_t));
-    if (fmt->ops == NULL) {
-        return NULL;
-    }
-
     return conf;
 }
 
 
 static void *
-ngx_http_log_create_loc_conf(ngx_conf_t *cf)
+ngx_stream_log_create_srv_conf(ngx_conf_t *cf)
 {
-    ngx_http_log_loc_conf_t  *conf;
+    ngx_stream_log_srv_conf_t  *conf;
 
-    conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_log_loc_conf_t));
+    conf = ngx_pcalloc(cf->pool, sizeof(ngx_stream_log_srv_conf_t));
     if (conf == NULL) {
         return NULL;
     }
@@ -1081,14 +844,10 @@ ngx_http_log_create_loc_conf(ngx_conf_t *cf)
 
 
 static char *
-ngx_http_log_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
+ngx_stream_log_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
 {
-    ngx_http_log_loc_conf_t *prev = parent;
-    ngx_http_log_loc_conf_t *conf = child;
-
-    ngx_http_log_t            *log;
-    ngx_http_log_fmt_t        *fmt;
-    ngx_http_log_main_conf_t  *lmcf;
+    ngx_stream_log_srv_conf_t *prev = parent;
+    ngx_stream_log_srv_conf_t *conf = child;
 
     if (conf->open_file_cache == NGX_CONF_UNSET_PTR) {
 
@@ -1108,60 +867,32 @@ ngx_http_log_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
     conf->logs = prev->logs;
     conf->off = prev->off;
 
-    if (conf->logs || conf->off) {
-        return NGX_CONF_OK;
-    }
-
-    conf->logs = ngx_array_create(cf->pool, 2, sizeof(ngx_http_log_t));
-    if (conf->logs == NULL) {
-        return NGX_CONF_ERROR;
-    }
-
-    log = ngx_array_push(conf->logs);
-    if (log == NULL) {
-        return NGX_CONF_ERROR;
-    }
-
-    ngx_memzero(log, sizeof(ngx_http_log_t));
-
-    log->file = ngx_conf_open_file(cf->cycle, &ngx_http_access_log);
-    if (log->file == NULL) {
-        return NGX_CONF_ERROR;
-    }
-
-    lmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_log_module);
-    fmt = lmcf->formats.elts;
-
-    /* the default "combined" format */
-    log->format = &fmt[0];
-    lmcf->combined_used = 1;
-
     return NGX_CONF_OK;
 }
 
 
 static char *
-ngx_http_log_set_log(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
+ngx_stream_log_set_log(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 {
-    ngx_http_log_loc_conf_t *llcf = conf;
-
-    ssize_t                            size;
-    ngx_int_t                          gzip;
-    ngx_uint_t                         i, n;
-    ngx_msec_t                         flush;
-    ngx_str_t                         *value, name, s;
-    ngx_http_log_t                    *log;
-    ngx_syslog_peer_t                 *peer;
-    ngx_http_log_buf_t                *buffer;
-    ngx_http_log_fmt_t                *fmt;
-    ngx_http_log_main_conf_t          *lmcf;
-    ngx_http_script_compile_t          sc;
-    ngx_http_compile_complex_value_t   ccv;
+    ngx_stream_log_srv_conf_t *lscf = conf;
+
+    ssize_t                              size;
+    ngx_int_t                            gzip;
+    ngx_uint_t                           i, n;
+    ngx_msec_t                           flush;
+    ngx_str_t                           *value, name, s;
+    ngx_stream_log_t                    *log;
+    ngx_syslog_peer_t                   *peer;
+    ngx_stream_log_buf_t                *buffer;
+    ngx_stream_log_fmt_t                *fmt;
+    ngx_stream_script_compile_t          sc;
+    ngx_stream_log_main_conf_t          *lmcf;
+    ngx_stream_compile_complex_value_t   ccv;
 
     value = cf->args->elts;
 
     if (ngx_strcmp(value[1].data, "off") == 0) {
-        llcf->off = 1;
+        lscf->off = 1;
         if (cf->args->nelts == 2) {
             return NGX_CONF_OK;
         }
@@ -1171,21 +902,21 @@ ngx_http_log_set_log(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         return NGX_CONF_ERROR;
     }
 
-    if (llcf->logs == NULL) {
-        llcf->logs = ngx_array_create(cf->pool, 2, sizeof(ngx_http_log_t));
-        if (llcf->logs == NULL) {
+    if (lscf->logs == NULL) {
+        lscf->logs = ngx_array_create(cf->pool, 2, sizeof(ngx_stream_log_t));
+        if (lscf->logs == NULL) {
             return NGX_CONF_ERROR;
         }
     }
 
-    lmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_log_module);
+    lmcf = ngx_stream_conf_get_module_main_conf(cf, ngx_stream_log_module);
 
-    log = ngx_array_push(llcf->logs);
+    log = ngx_array_push(lscf->logs);
     if (log == NULL) {
         return NGX_CONF_ERROR;
     }
 
-    ngx_memzero(log, sizeof(ngx_http_log_t));
+    ngx_memzero(log, sizeof(ngx_stream_log_t));
 
 
     if (ngx_strncmp(value[1].data, "syslog:", 7) == 0) {
@@ -1204,7 +935,7 @@ ngx_http_log_set_log(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         goto process_formats;
     }
 
-    n = ngx_http_script_variables_count(&value[1]);
+    n = ngx_stream_script_variables_count(&value[1]);
 
     if (n == 0) {
         log->file = ngx_conf_open_file(cf->cycle, &value[1]);
@@ -1217,12 +948,12 @@ ngx_http_log_set_log(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
             return NGX_CONF_ERROR;
         }
 
-        log->script = ngx_pcalloc(cf->pool, sizeof(ngx_http_log_script_t));
+        log->script = ngx_pcalloc(cf->pool, sizeof(ngx_stream_log_script_t));
         if (log->script == NULL) {
             return NGX_CONF_ERROR;
         }
 
-        ngx_memzero(&sc, sizeof(ngx_http_script_compile_t));
+        ngx_memzero(&sc, sizeof(ngx_stream_script_compile_t));
 
         sc.cf = cf;
         sc.source = &value[1];
@@ -1232,7 +963,7 @@ ngx_http_log_set_log(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         sc.complete_lengths = 1;
         sc.complete_values = 1;
 
-        if (ngx_http_script_compile(&sc) != NGX_OK) {
+        if (ngx_stream_script_compile(&sc) != NGX_OK) {
             return NGX_CONF_ERROR;
         }
     }
@@ -1242,13 +973,10 @@ process_formats:
     if (cf->args->nelts >= 3) {
         name = value[2];
 
-        if (ngx_strcmp(name.data, "combined") == 0) {
-            lmcf->combined_used = 1;
-        }
-
     } else {
-        ngx_str_set(&name, "combined");
-        lmcf->combined_used = 1;
+        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+                           "log format is not specified");
+        return NGX_CONF_ERROR;
     }
 
     fmt = lmcf->formats.elts;
@@ -1340,17 +1068,17 @@ process_formats:
             s.len = value[i].len - 3;
             s.data = value[i].data + 3;
 
-            ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t));
+            ngx_memzero(&ccv, sizeof(ngx_stream_compile_complex_value_t));
 
             ccv.cf = cf;
             ccv.value = &s;
             ccv.complex_value = ngx_palloc(cf->pool,
-                                           sizeof(ngx_http_complex_value_t));
+                                           sizeof(ngx_stream_complex_value_t));
             if (ccv.complex_value == NULL) {
                 return NGX_CONF_ERROR;
             }
 
-            if (ngx_http_compile_complex_value(&ccv) != NGX_OK) {
+            if (ngx_stream_compile_complex_value(&ccv) != NGX_OK) {
                 return NGX_CONF_ERROR;
             }
 
@@ -1402,7 +1130,7 @@ process_formats:
             return NGX_CONF_OK;
         }
 
-        buffer = ngx_pcalloc(cf->pool, sizeof(ngx_http_log_buf_t));
+        buffer = ngx_pcalloc(cf->pool, sizeof(ngx_stream_log_buf_t));
         if (buffer == NULL) {
             return NGX_CONF_ERROR;
         }
@@ -1422,7 +1150,7 @@ process_formats:
             }
 
             buffer->event->data = log->file;
-            buffer->event->handler = ngx_http_log_flush_handler;
+            buffer->event->handler = ngx_stream_log_flush_handler;
             buffer->event->log = &cf->cycle->new_log;
             buffer->event->cancelable = 1;
 
@@ -1431,7 +1159,7 @@ process_formats:
 
         buffer->gzip = gzip;
 
-        log->file->flush = ngx_http_log_flush;
+        log->file->flush = ngx_stream_log_flush;
         log->file->data = buffer;
     }
 
@@ -1440,13 +1168,13 @@ process_formats:
 
 
 static char *
-ngx_http_log_set_format(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
+ngx_stream_log_set_format(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 {
-    ngx_http_log_main_conf_t *lmcf = conf;
+    ngx_stream_log_main_conf_t *lmcf = conf;
 
-    ngx_str_t           *value;
-    ngx_uint_t           i;
-    ngx_http_log_fmt_t  *fmt;
+    ngx_str_t             *value;
+    ngx_uint_t             i;
+    ngx_stream_log_fmt_t  *fmt;
 
     value = cf->args->elts;
 
@@ -1474,26 +1202,26 @@ ngx_http_log_set_format(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         return NGX_CONF_ERROR;
     }
 
-    fmt->ops = ngx_array_create(cf->pool, 16, sizeof(ngx_http_log_op_t));
+    fmt->ops = ngx_array_create(cf->pool, 16, sizeof(ngx_stream_log_op_t));
     if (fmt->ops == NULL) {
         return NGX_CONF_ERROR;
     }
 
-    return ngx_http_log_compile_format(cf, fmt->flushes, fmt->ops, cf->args, 2);
+    return ngx_stream_log_compile_format(cf, fmt->flushes, fmt->ops,
+                                         cf->args, 2);
 }
 
 
 static char *
-ngx_http_log_compile_format(ngx_conf_t *cf, ngx_array_t *flushes,
+ngx_stream_log_compile_format(ngx_conf_t *cf, ngx_array_t *flushes,
     ngx_array_t *ops, ngx_array_t *args, ngx_uint_t s)
 {
-    u_char              *data, *p, ch;
-    size_t               i, len;
-    ngx_str_t           *value, var;
-    ngx_int_t           *flush;
-    ngx_uint_t           bracket;
-    ngx_http_log_op_t   *op;
-    ngx_http_log_var_t  *v;
+    u_char                *data, *p, ch;
+    size_t                 i, len;
+    ngx_str_t             *value, var;
+    ngx_int_t             *flush;
+    ngx_uint_t             bracket;
+    ngx_stream_log_op_t   *op;
 
     value = args->elts;
 
@@ -1561,21 +1289,7 @@ ngx_http_log_compile_format(ngx_conf_t *cf, ngx_array_t *flushes,
                     goto invalid;
                 }
 
-                for (v = ngx_http_log_vars; v->name.len; v++) {
-
-                    if (v->name.len == var.len
-                        && ngx_strncmp(v->name.data, var.data, var.len) == 0)
-                    {
-                        op->len = v->len;
-                        op->getlen = NULL;
-                        op->run = v->run;
-                        op->data = 0;
-
-                        goto found;
-                    }
-                }
-
-                if (ngx_http_log_variable_compile(cf, op, &var) != NGX_OK) {
+                if (ngx_stream_log_variable_compile(cf, op, &var) != NGX_OK) {
                     return NGX_CONF_ERROR;
                 }
 
@@ -1589,8 +1303,6 @@ ngx_http_log_compile_format(ngx_conf_t *cf, ngx_array_t *flushes,
                     *flush = op->data; /* variable index */
                 }
 
-            found:
-
                 continue;
             }
 
@@ -1608,7 +1320,7 @@ ngx_http_log_compile_format(ngx_conf_t *cf, ngx_array_t *flushes,
                 op->getlen = NULL;
 
                 if (len <= sizeof(uintptr_t)) {
-                    op->run = ngx_http_log_copy_short;
+                    op->run = ngx_stream_log_copy_short;
                     op->data = 0;
 
                     while (len--) {
@@ -1617,7 +1329,7 @@ ngx_http_log_compile_format(ngx_conf_t *cf, ngx_array_t *flushes,
                     }
 
                 } else {
-                    op->run = ngx_http_log_copy_long;
+                    op->run = ngx_stream_log_copy_long;
 
                     p = ngx_pnalloc(cf->pool, len);
                     if (p == NULL) {
@@ -1642,16 +1354,16 @@ invalid:
 
 
 static char *
-ngx_http_log_open_file_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
+ngx_stream_log_open_file_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 {
-    ngx_http_log_loc_conf_t *llcf = conf;
+    ngx_stream_log_srv_conf_t *lscf = conf;
 
     time_t       inactive, valid;
     ngx_str_t   *value, s;
     ngx_int_t    max, min_uses;
     ngx_uint_t   i;
 
-    if (llcf->open_file_cache != NGX_CONF_UNSET_PTR) {
+    if (lscf->open_file_cache != NGX_CONF_UNSET_PTR) {
         return "is duplicate";
     }
 
@@ -1712,7 +1424,7 @@ ngx_http_log_open_file_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
         if (ngx_strcmp(value[i].data, "off") == 0) {
 
-            llcf->open_file_cache = NULL;
+            lscf->open_file_cache = NULL;
 
             continue;
         }
@@ -1725,7 +1437,7 @@ ngx_http_log_open_file_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         return NGX_CONF_ERROR;
     }
 
-    if (llcf->open_file_cache == NULL) {
+    if (lscf->open_file_cache == NULL) {
         return NGX_CONF_OK;
     }
 
@@ -1735,12 +1447,12 @@ ngx_http_log_open_file_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         return NGX_CONF_ERROR;
     }
 
-    llcf->open_file_cache = ngx_open_file_cache_init(cf->pool, max, inactive);
+    lscf->open_file_cache = ngx_open_file_cache_init(cf->pool, max, inactive);
 
-    if (llcf->open_file_cache) {
+    if (lscf->open_file_cache) {
 
-        llcf->open_file_cache_valid = valid;
-        llcf->open_file_cache_min_uses = min_uses;
+        lscf->open_file_cache_valid = valid;
+        lscf->open_file_cache_min_uses = min_uses;
 
         return NGX_CONF_OK;
     }
@@ -1750,45 +1462,13 @@ ngx_http_log_open_file_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
 
 static ngx_int_t
-ngx_http_log_init(ngx_conf_t *cf)
+ngx_stream_log_init(ngx_conf_t *cf)
 {
-    ngx_str_t                  *value;
-    ngx_array_t                 a;
-    ngx_http_handler_pt        *h;
-    ngx_http_log_fmt_t         *fmt;
-    ngx_http_log_main_conf_t   *lmcf;
-    ngx_http_core_main_conf_t  *cmcf;
-
-    lmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_log_module);
-
-    if (lmcf->combined_used) {
-        if (ngx_array_init(&a, cf->pool, 1, sizeof(ngx_str_t)) != NGX_OK) {
-            return NGX_ERROR;
-        }
-
-        value = ngx_array_push(&a);
-        if (value == NULL) {
-            return NGX_ERROR;
-        }
+    ngx_stream_core_main_conf_t  *cmcf;
 
-        *value = ngx_http_combined_fmt;
-        fmt = lmcf->formats.elts;
-
-        if (ngx_http_log_compile_format(cf, NULL, fmt->ops, &a, 0)
-            != NGX_CONF_OK)
-        {
-            return NGX_ERROR;
-        }
-    }
-
-    cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module);
-
-    h = ngx_array_push(&cmcf->phases[NGX_HTTP_LOG_PHASE].handlers);
-    if (h == NULL) {
-        return NGX_ERROR;
-    }
+    cmcf = ngx_stream_conf_get_module_main_conf(cf, ngx_stream_core_module);
 
-    *h = ngx_http_log_handler;
+    cmcf->access_log_handler = ngx_stream_log_handler;
 
     return NGX_OK;
 }

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

  Renamed: vendor/nginx-1.11.4/src/stream/ngx_stream_proxy_module.c (+88 -41) 92%
===================================================================
--- vendor/nginx-1.11.3/src/stream/ngx_stream_proxy_module.c    2016-09-27 21:40:31 +0900 (9d43109)
+++ vendor/nginx-1.11.4/src/stream/ngx_stream_proxy_module.c    2016-09-27 23:25:47 +0900 (ed802e7)
@@ -73,7 +73,7 @@ static ngx_int_t ngx_stream_proxy_test_connect(ngx_connection_t *c);
 static void ngx_stream_proxy_process(ngx_stream_session_t *s,
     ngx_uint_t from_upstream, ngx_uint_t do_write);
 static void ngx_stream_proxy_next_upstream(ngx_stream_session_t *s);
-static void ngx_stream_proxy_finalize(ngx_stream_session_t *s, ngx_int_t rc);
+static void ngx_stream_proxy_finalize(ngx_stream_session_t *s, ngx_uint_t rc);
 static u_char *ngx_stream_proxy_log_error(ngx_log_t *log, u_char *buf,
     size_t len);
 
@@ -368,7 +368,7 @@ ngx_stream_proxy_handler(ngx_stream_session_t *s)
 
     u = ngx_pcalloc(c->pool, sizeof(ngx_stream_upstream_t));
     if (u == NULL) {
-        ngx_stream_proxy_finalize(s, NGX_ERROR);
+        ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
         return;
     }
 
@@ -380,7 +380,7 @@ ngx_stream_proxy_handler(ngx_stream_session_t *s)
     u->peer.log_error = NGX_ERROR_ERR;
 
     if (ngx_stream_proxy_set_local(s, u, pscf->local) != NGX_OK) {
-        ngx_stream_proxy_finalize(s, NGX_ERROR);
+        ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
         return;
     }
 
@@ -392,10 +392,17 @@ ngx_stream_proxy_handler(ngx_stream_session_t *s)
     c->write->handler = ngx_stream_proxy_downstream_handler;
     c->read->handler = ngx_stream_proxy_downstream_handler;
 
+    s->upstream_states = ngx_array_create(c->pool, 1,
+                                          sizeof(ngx_stream_upstream_state_t));
+    if (s->upstream_states == NULL) {
+        ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
+        return;
+    }
+
     if (c->type == SOCK_STREAM) {
         p = ngx_pnalloc(c->pool, pscf->buffer_size);
         if (p == NULL) {
-            ngx_stream_proxy_finalize(s, NGX_ERROR);
+            ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
             return;
         }
 
@@ -418,7 +425,7 @@ ngx_stream_proxy_handler(ngx_stream_session_t *s)
             p = ngx_proxy_protocol_write(c, u->downstream_buf.last,
                                          u->downstream_buf.end);
             if (p == NULL) {
-                ngx_stream_proxy_finalize(s, NGX_ERROR);
+                ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
                 return;
             }
 
@@ -433,7 +440,7 @@ ngx_stream_proxy_handler(ngx_stream_session_t *s)
 
     if (pscf->upstream_value) {
         if (ngx_stream_proxy_eval(s, pscf) != NGX_OK) {
-            ngx_stream_proxy_finalize(s, NGX_ERROR);
+            ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
             return;
         }
     }
@@ -457,14 +464,14 @@ ngx_stream_proxy_handler(ngx_stream_session_t *s)
             {
                 ngx_log_error(NGX_LOG_ERR, c->log, 0,
                               "no port in upstream \"%V\"", host);
-                ngx_stream_proxy_finalize(s, NGX_ERROR);
+                ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
                 return;
             }
 
             if (ngx_stream_upstream_create_round_robin_peer(s, u->resolved)
                 != NGX_OK)
             {
-                ngx_stream_proxy_finalize(s, NGX_ERROR);
+                ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
                 return;
             }
 
@@ -493,7 +500,7 @@ ngx_stream_proxy_handler(ngx_stream_session_t *s)
         if (u->resolved->port == 0) {
             ngx_log_error(NGX_LOG_ERR, c->log, 0,
                           "no port in upstream \"%V\"", host);
-            ngx_stream_proxy_finalize(s, NGX_ERROR);
+            ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
             return;
         }
 
@@ -503,14 +510,14 @@ ngx_stream_proxy_handler(ngx_stream_session_t *s)
 
         ctx = ngx_resolve_start(cscf->resolver, &temp);
         if (ctx == NULL) {
-            ngx_stream_proxy_finalize(s, NGX_ERROR);
+            ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
             return;
         }
 
         if (ctx == NGX_NO_RESOLVER) {
             ngx_log_error(NGX_LOG_ERR, c->log, 0,
                           "no resolver defined to resolve %V", host);
-            ngx_stream_proxy_finalize(s, NGX_ERROR);
+            ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
             return;
         }
 
@@ -523,7 +530,7 @@ ngx_stream_proxy_handler(ngx_stream_session_t *s)
 
         if (ngx_resolve_name(ctx) != NGX_OK) {
             u->resolved->ctx = NULL;
-            ngx_stream_proxy_finalize(s, NGX_ERROR);
+            ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
             return;
         }
 
@@ -534,16 +541,16 @@ found:
 
     if (uscf == NULL) {
         ngx_log_error(NGX_LOG_ALERT, c->log, 0, "no upstream configuration");
-        ngx_stream_proxy_finalize(s, NGX_ERROR);
+        ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
         return;
     }
 
-#if (NGX_HTTP_SSL)
+#if (NGX_STREAM_SSL)
     u->ssl_name = uscf->host;
 #endif
 
     if (uscf->peer.init(s, uscf) != NGX_OK) {
-        ngx_stream_proxy_finalize(s, NGX_ERROR);
+        ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
         return;
     }
 
@@ -677,18 +684,36 @@ ngx_stream_proxy_connect(ngx_stream_session_t *s)
 
     u = s->upstream;
 
+    if (u->state) {
+        u->state->response_time = ngx_current_msec - u->state->response_time;
+    }
+
+    u->state = ngx_array_push(s->upstream_states);
+    if (u->state == NULL) {
+        ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
+        return;
+    }
+
+    ngx_memzero(u->state, sizeof(ngx_stream_upstream_state_t));
+
+    u->state->connect_time = (ngx_msec_t) -1;
+    u->state->first_byte_time = (ngx_msec_t) -1;
+    u->state->response_time = ngx_current_msec;
+
     rc = ngx_event_connect_peer(&u->peer);
 
     ngx_log_debug1(NGX_LOG_DEBUG_STREAM, c->log, 0, "proxy connect: %i", rc);
 
     if (rc == NGX_ERROR) {
-        ngx_stream_proxy_finalize(s, NGX_ERROR);
+        ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
         return;
     }
 
+    u->state->peer = u->peer.name;
+
     if (rc == NGX_BUSY) {
         ngx_log_error(NGX_LOG_ERR, c->log, 0, "no live upstreams");
-        ngx_stream_proxy_finalize(s, NGX_DECLINED);
+        ngx_stream_proxy_finalize(s, NGX_STREAM_BAD_GATEWAY);
         return;
     }
 
@@ -796,12 +821,14 @@ ngx_stream_proxy_init_upstream(ngx_stream_session_t *s)
         }
     }
 
+    u->state->connect_time = ngx_current_msec - u->state->response_time;
+
     c->log->action = "proxying connection";
 
     if (u->upstream_buf.start == NULL) {
         p = ngx_pnalloc(c->pool, pscf->buffer_size);
         if (p == NULL) {
-            ngx_stream_proxy_finalize(s, NGX_ERROR);
+            ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
             return;
         }
 
@@ -851,7 +878,7 @@ ngx_stream_proxy_send_proxy_protocol(ngx_stream_session_t *s)
 
     p = ngx_proxy_protocol_write(c, buf, buf + NGX_PROXY_PROTOCOL_MAX_HEADER);
     if (p == NULL) {
-        ngx_stream_proxy_finalize(s, NGX_ERROR);
+        ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
         return NGX_ERROR;
     }
 
@@ -865,7 +892,7 @@ ngx_stream_proxy_send_proxy_protocol(ngx_stream_session_t *s)
 
     if (n == NGX_AGAIN) {
         if (ngx_handle_write_event(pc->write, 0) != NGX_OK) {
-            ngx_stream_proxy_finalize(s, NGX_ERROR);
+            ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
             return NGX_ERROR;
         }
 
@@ -879,7 +906,7 @@ ngx_stream_proxy_send_proxy_protocol(ngx_stream_session_t *s)
     }
 
     if (n == NGX_ERROR) {
-        ngx_stream_proxy_finalize(s, NGX_DECLINED);
+        ngx_stream_proxy_finalize(s, NGX_STREAM_OK);
         return NGX_ERROR;
     }
 
@@ -895,7 +922,7 @@ ngx_stream_proxy_send_proxy_protocol(ngx_stream_session_t *s)
         ngx_log_error(NGX_LOG_ERR, c->log, 0,
                       "could not send PROXY protocol header at once");
 
-        ngx_stream_proxy_finalize(s, NGX_DECLINED);
+        ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
 
         return NGX_ERROR;
     }
@@ -947,20 +974,20 @@ ngx_stream_proxy_ssl_init_connection(ngx_stream_session_t *s)
     if (ngx_ssl_create_connection(pscf->ssl, pc, NGX_SSL_BUFFER|NGX_SSL_CLIENT)
         != NGX_OK)
     {
-        ngx_stream_proxy_finalize(s, NGX_ERROR);
+        ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
         return;
     }
 
     if (pscf->ssl_server_name || pscf->ssl_verify) {
         if (ngx_stream_proxy_ssl_name(s) != NGX_OK) {
-            ngx_stream_proxy_finalize(s, NGX_ERROR);
+            ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
             return;
         }
     }
 
     if (pscf->ssl_session_reuse) {
         if (u->peer.set_session(&u->peer, u->peer.data) != NGX_OK) {
-            ngx_stream_proxy_finalize(s, NGX_ERROR);
+            ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
             return;
         }
     }
@@ -1157,7 +1184,7 @@ ngx_stream_proxy_resolve_handler(ngx_resolver_ctx_t *ctx)
     u = s->upstream;
     ur = u->resolved;
 
-    ngx_log_debug0(NGX_LOG_DEBUG_HTTP, s->connection->log, 0,
+    ngx_log_debug0(NGX_LOG_DEBUG_STREAM, s->connection->log, 0,
                    "stream upstream resolve");
 
     if (ctx->state) {
@@ -1166,7 +1193,7 @@ ngx_stream_proxy_resolve_handler(ngx_resolver_ctx_t *ctx)
                       &ctx->name, ctx->state,
                       ngx_resolver_strerror(ctx->state));
 
-        ngx_stream_proxy_finalize(s, NGX_ERROR);
+        ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
         return;
     }
 
@@ -1192,7 +1219,7 @@ ngx_stream_proxy_resolve_handler(ngx_resolver_ctx_t *ctx)
 #endif
 
     if (ngx_stream_upstream_create_round_robin_peer(s, ur) != NGX_OK) {
-        ngx_stream_proxy_finalize(s, NGX_ERROR);
+        ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
         return;
     }
 
@@ -1245,7 +1272,8 @@ ngx_stream_proxy_process_connection(ngx_event_t *ev, ngx_uint_t from_upstream)
 
             if (!ev->ready) {
                 if (ngx_handle_read_event(ev, 0) != NGX_OK) {
-                    ngx_stream_proxy_finalize(s, NGX_ERROR);
+                    ngx_stream_proxy_finalize(s,
+                                              NGX_STREAM_INTERNAL_SERVER_ERROR);
                     return;
                 }
 
@@ -1279,7 +1307,7 @@ ngx_stream_proxy_process_connection(ngx_event_t *ev, ngx_uint_t from_upstream)
             }
 
             ngx_connection_error(c, NGX_ETIMEDOUT, "connection timed out");
-            ngx_stream_proxy_finalize(s, NGX_DECLINED);
+            ngx_stream_proxy_finalize(s, NGX_STREAM_OK);
             return;
         }
 
@@ -1289,7 +1317,7 @@ ngx_stream_proxy_process_connection(ngx_event_t *ev, ngx_uint_t from_upstream)
                        "stream connection delayed");
 
         if (ngx_handle_read_event(ev, 0) != NGX_OK) {
-            ngx_stream_proxy_finalize(s, NGX_ERROR);
+            ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
         }
 
         return;
@@ -1407,7 +1435,7 @@ ngx_stream_proxy_process(ngx_stream_session_t *s, ngx_uint_t from_upstream,
 
         c->log->handler = handler;
 
-        ngx_stream_proxy_finalize(s, NGX_OK);
+        ngx_stream_proxy_finalize(s, NGX_STREAM_OK);
         return;
     }
 
@@ -1449,7 +1477,7 @@ ngx_stream_proxy_process(ngx_stream_session_t *s, ngx_uint_t from_upstream,
                         return;
                     }
 
-                    ngx_stream_proxy_finalize(s, NGX_DECLINED);
+                    ngx_stream_proxy_finalize(s, NGX_STREAM_OK);
                     return;
                 }
 
@@ -1500,6 +1528,13 @@ ngx_stream_proxy_process(ngx_stream_session_t *s, ngx_uint_t from_upstream,
                     }
                 }
 
+                if (from_upstream) {
+                    if (u->state->first_byte_time == (ngx_msec_t) -1) {
+                        u->state->first_byte_time = ngx_current_msec
+                                                    - u->state->response_time;
+                    }
+                }
+
                 if (c->type == SOCK_DGRAM && ++u->responses == pscf->responses)
                 {
                     src->read->ready = 0;
@@ -1540,20 +1575,20 @@ ngx_stream_proxy_process(ngx_stream_session_t *s, ngx_uint_t from_upstream,
 
         c->log->handler = handler;
 
-        ngx_stream_proxy_finalize(s, NGX_OK);
+        ngx_stream_proxy_finalize(s, NGX_STREAM_OK);
         return;
     }
 
     flags = src->read->eof ? NGX_CLOSE_EVENT : 0;
 
     if (!src->shared && ngx_handle_read_event(src->read, flags) != NGX_OK) {
-        ngx_stream_proxy_finalize(s, NGX_ERROR);
+        ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
         return;
     }
 
     if (dst) {
         if (!dst->shared && ngx_handle_write_event(dst->write, 0) != NGX_OK) {
-            ngx_stream_proxy_finalize(s, NGX_ERROR);
+            ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
             return;
         }
 
@@ -1593,7 +1628,7 @@ ngx_stream_proxy_next_upstream(ngx_stream_session_t *s)
         || !pscf->next_upstream
         || (timeout && ngx_current_msec - u->peer.start_time >= timeout))
     {
-        ngx_stream_proxy_finalize(s, NGX_DECLINED);
+        ngx_stream_proxy_finalize(s, NGX_STREAM_BAD_GATEWAY);
         return;
     }
 
@@ -1612,6 +1647,9 @@ ngx_stream_proxy_next_upstream(ngx_stream_session_t *s)
         }
 #endif
 
+        u->state->bytes_received = u->received;
+        u->state->bytes_sent = pc->sent;
+
         ngx_close_connection(pc);
         u->peer.connection = NULL;
     }
@@ -1621,7 +1659,7 @@ ngx_stream_proxy_next_upstream(ngx_stream_session_t *s)
 
 
 static void
-ngx_stream_proxy_finalize(ngx_stream_session_t *s, ngx_int_t rc)
+ngx_stream_proxy_finalize(ngx_stream_session_t *s, ngx_uint_t rc)
 {
     ngx_connection_t       *pc;
     ngx_stream_upstream_t  *u;
@@ -1640,13 +1678,22 @@ ngx_stream_proxy_finalize(ngx_stream_session_t *s, ngx_int_t rc)
         u->resolved->ctx = NULL;
     }
 
+    pc = u->peer.connection;
+
+    if (u->state) {
+        u->state->response_time = ngx_current_msec - u->state->response_time;
+
+        if (pc) {
+            u->state->bytes_received = u->received;
+            u->state->bytes_sent = pc->sent;
+        }
+    }
+
     if (u->peer.free && u->peer.sockaddr) {
         u->peer.free(&u->peer, u->peer.data, 0);
         u->peer.sockaddr = NULL;
     }
 
-    pc = u->peer.connection;
-
     if (pc) {
         ngx_log_debug1(NGX_LOG_DEBUG_STREAM, s->connection->log, 0,
                        "close stream proxy upstream connection: %d", pc->fd);
@@ -1664,7 +1711,7 @@ ngx_stream_proxy_finalize(ngx_stream_session_t *s, ngx_int_t rc)
 
 noupstream:
 
-    ngx_stream_close_connection(s->connection);
+    ngx_stream_finalize_session(s, rc);
 }
 
 

  Added: vendor/nginx-1.11.4/src/stream/ngx_stream_realip_module.c (+342 -0) 100644
===================================================================
--- /dev/null
+++ vendor/nginx-1.11.4/src/stream/ngx_stream_realip_module.c    2016-09-27 23:25:47 +0900 (8ce05a0)
@@ -0,0 +1,342 @@
+
+/*
+ * Copyright (C) Igor Sysoev
+ * Copyright (C) Nginx, Inc.
+ */
+
+
+#include <ngx_config.h>
+#include <ngx_core.h>
+#include <ngx_stream.h>
+
+
+typedef struct {
+    ngx_array_t       *from;     /* array of ngx_cidr_t */
+} ngx_stream_realip_srv_conf_t;
+
+
+typedef struct {
+    struct sockaddr   *sockaddr;
+    socklen_t          socklen;
+    ngx_str_t          addr_text;
+} ngx_stream_realip_ctx_t;
+
+
+static ngx_int_t ngx_stream_realip_handler(ngx_stream_session_t *s);
+static ngx_int_t ngx_stream_realip_set_addr(ngx_stream_session_t *s,
+    ngx_addr_t *addr);
+static char *ngx_stream_realip_from(ngx_conf_t *cf, ngx_command_t *cmd,
+    void *conf);
+static void *ngx_stream_realip_create_srv_conf(ngx_conf_t *cf);
+static char *ngx_stream_realip_merge_srv_conf(ngx_conf_t *cf, void *parent,
+    void *child);
+static ngx_int_t ngx_stream_realip_add_variables(ngx_conf_t *cf);
+static ngx_int_t ngx_stream_realip_init(ngx_conf_t *cf);
+
+
+static ngx_int_t ngx_stream_realip_remote_addr_variable(ngx_stream_session_t *s,
+    ngx_stream_variable_value_t *v, uintptr_t data);
+static ngx_int_t ngx_stream_realip_remote_port_variable(ngx_stream_session_t *s,
+    ngx_stream_variable_value_t *v, uintptr_t data);
+
+
+static ngx_command_t  ngx_stream_realip_commands[] = {
+
+    { ngx_string("set_real_ip_from"),
+      NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_TAKE1,
+      ngx_stream_realip_from,
+      NGX_STREAM_SRV_CONF_OFFSET,
+      0,
+      NULL },
+
+      ngx_null_command
+};
+
+
+static ngx_stream_module_t  ngx_stream_realip_module_ctx = {
+    ngx_stream_realip_add_variables,       /* preconfiguration */
+    ngx_stream_realip_init,                /* postconfiguration */
+
+    NULL,                                  /* create main configuration */
+    NULL,                                  /* init main configuration */
+
+    ngx_stream_realip_create_srv_conf,     /* create server configuration */
+    ngx_stream_realip_merge_srv_conf       /* merge server configuration */
+};
+
+
+ngx_module_t  ngx_stream_realip_module = {
+    NGX_MODULE_V1,
+    &ngx_stream_realip_module_ctx,         /* module context */
+    ngx_stream_realip_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_realip_vars[] = {
+
+    { ngx_string("realip_remote_addr"), NULL,
+      ngx_stream_realip_remote_addr_variable, 0, 0, 0 },
+
+    { ngx_string("realip_remote_port"), NULL,
+      ngx_stream_realip_remote_port_variable, 0, 0, 0 },
+
+    { ngx_null_string, NULL, NULL, 0, 0, 0 }
+};
+
+
+static ngx_int_t
+ngx_stream_realip_handler(ngx_stream_session_t *s)
+{
+    ngx_addr_t                     addr;
+    ngx_connection_t              *c;
+    ngx_stream_realip_srv_conf_t  *rscf;
+
+    rscf = ngx_stream_get_module_srv_conf(s, ngx_stream_realip_module);
+
+    if (rscf->from == NULL) {
+        return NGX_DECLINED;
+    }
+
+    c = s->connection;
+
+    if (c->proxy_protocol_addr.len == 0) {
+        return NGX_DECLINED;
+    }
+
+    if (ngx_cidr_match(c->sockaddr, rscf->from) != NGX_OK) {
+        return NGX_DECLINED;
+    }
+
+    if (ngx_parse_addr(c->pool, &addr, c->proxy_protocol_addr.data,
+                       c->proxy_protocol_addr.len)
+        != NGX_OK)
+    {
+        return NGX_DECLINED;
+    }
+
+    ngx_inet_set_port(addr.sockaddr, c->proxy_protocol_port);
+
+    return ngx_stream_realip_set_addr(s, &addr);
+}
+
+
+static ngx_int_t
+ngx_stream_realip_set_addr(ngx_stream_session_t *s, ngx_addr_t *addr)
+{
+    size_t                    len;
+    u_char                   *p;
+    u_char                    text[NGX_SOCKADDR_STRLEN];
+    ngx_connection_t         *c;
+    ngx_stream_realip_ctx_t  *ctx;
+
+    c = s->connection;
+
+    ctx = ngx_palloc(c->pool, sizeof(ngx_stream_realip_ctx_t));
+    if (ctx == NULL) {
+        return NGX_ERROR;
+    }
+
+    len = ngx_sock_ntop(addr->sockaddr, addr->socklen, text,
+                        NGX_SOCKADDR_STRLEN, 0);
+    if (len == 0) {
+        return NGX_ERROR;
+    }
+
+    p = ngx_pnalloc(c->pool, len);
+    if (p == NULL) {
+        return NGX_ERROR;
+    }
+
+    ngx_memcpy(p, text, len);
+
+    ngx_stream_set_ctx(s, ctx, ngx_stream_realip_module);
+
+    ctx->sockaddr = c->sockaddr;
+    ctx->socklen = c->socklen;
+    ctx->addr_text = c->addr_text;
+
+    c->sockaddr = addr->sockaddr;
+    c->socklen = addr->socklen;
+    c->addr_text.len = len;
+    c->addr_text.data = p;
+
+    return NGX_DECLINED;
+}
+
+
+static char *
+ngx_stream_realip_from(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
+{
+    ngx_stream_realip_srv_conf_t *rscf = conf;
+
+    ngx_int_t                rc;
+    ngx_str_t               *value;
+    ngx_cidr_t              *cidr;
+
+    value = cf->args->elts;
+
+    if (rscf->from == NULL) {
+        rscf->from = ngx_array_create(cf->pool, 2,
+                                      sizeof(ngx_cidr_t));
+        if (rscf->from == NULL) {
+            return NGX_CONF_ERROR;
+        }
+    }
+
+    cidr = ngx_array_push(rscf->from);
+    if (cidr == NULL) {
+        return NGX_CONF_ERROR;
+    }
+
+#if (NGX_HAVE_UNIX_DOMAIN)
+
+    if (ngx_strcmp(value[1].data, "unix:") == 0) {
+        cidr->family = AF_UNIX;
+        return NGX_CONF_OK;
+    }
+
+#endif
+
+    rc = ngx_ptocidr(&value[1], cidr);
+
+    if (rc == NGX_ERROR) {
+        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "invalid parameter \"%V\"",
+                           &value[1]);
+        return NGX_CONF_ERROR;
+    }
+
+    if (rc == NGX_DONE) {
+        ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
+                           "low address bits of %V are meaningless", &value[1]);
+    }
+
+    return NGX_CONF_OK;
+}
+
+
+static void *
+ngx_stream_realip_create_srv_conf(ngx_conf_t *cf)
+{
+    ngx_stream_realip_srv_conf_t  *conf;
+
+    conf = ngx_pcalloc(cf->pool, sizeof(ngx_stream_realip_srv_conf_t));
+    if (conf == NULL) {
+        return NULL;
+    }
+
+    /*
+     * set by ngx_pcalloc():
+     *
+     *     conf->from = NULL;
+     */
+
+    return conf;
+}
+
+
+static char *
+ngx_stream_realip_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
+{
+    ngx_stream_realip_srv_conf_t *prev = parent;
+    ngx_stream_realip_srv_conf_t *conf = child;
+
+    if (conf->from == NULL) {
+        conf->from = prev->from;
+    }
+
+    return NGX_CONF_OK;
+}
+
+
+static ngx_int_t
+ngx_stream_realip_add_variables(ngx_conf_t *cf)
+{
+    ngx_stream_variable_t  *var, *v;
+
+    for (v = ngx_stream_realip_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 ngx_int_t
+ngx_stream_realip_init(ngx_conf_t *cf)
+{
+    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;
+
+    return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_stream_realip_remote_addr_variable(ngx_stream_session_t *s,
+    ngx_stream_variable_value_t *v, uintptr_t data)
+{
+    ngx_str_t                *addr_text;
+    ngx_stream_realip_ctx_t  *ctx;
+
+    ctx = ngx_stream_get_module_ctx(s, ngx_stream_realip_module);
+
+    addr_text = ctx ? &ctx->addr_text : &s->connection->addr_text;
+
+    v->len = addr_text->len;
+    v->valid = 1;
+    v->no_cacheable = 0;
+    v->not_found = 0;
+    v->data = addr_text->data;
+
+    return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_stream_realip_remote_port_variable(ngx_stream_session_t *s,
+    ngx_stream_variable_value_t *v, uintptr_t data)
+{
+    ngx_uint_t                port;
+    struct sockaddr          *sa;
+    ngx_stream_realip_ctx_t  *ctx;
+
+    ctx = ngx_stream_get_module_ctx(s, ngx_stream_realip_module);
+
+    sa = ctx ? ctx->sockaddr : s->connection->sockaddr;
+
+    v->len = 0;
+    v->valid = 1;
+    v->no_cacheable = 0;
+    v->not_found = 0;
+
+    v->data = ngx_pnalloc(s->connection->pool, sizeof("65535") - 1);
+    if (v->data == NULL) {
+        return NGX_ERROR;
+    }
+
+    port = ngx_inet_get_port(sa);
+
+    if (port > 0 && port < 65536) {
+        v->len = ngx_sprintf(v->data, "%ui", port) - v->data;
+    }
+
+    return NGX_OK;
+}

  Renamed: vendor/nginx-1.11.4/src/stream/ngx_stream_return_module.c (+7 -7) 91%
===================================================================
--- vendor/nginx-1.11.3/src/stream/ngx_stream_return_module.c    2016-09-27 21:40:31 +0900 (3ab9bdf)
+++ vendor/nginx-1.11.4/src/stream/ngx_stream_return_module.c    2016-09-27 23:25:47 +0900 (c22087f)
@@ -83,7 +83,7 @@ ngx_stream_return_handler(ngx_stream_session_t *s)
     rscf = ngx_stream_get_module_srv_conf(s, ngx_stream_return_module);
 
     if (ngx_stream_complex_value(s, &rscf->text, &text) != NGX_OK) {
-        ngx_stream_close_connection(c);
+        ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
         return;
     }
 
@@ -91,13 +91,13 @@ ngx_stream_return_handler(ngx_stream_session_t *s)
                    "stream return text: \"%V\"", &text);
 
     if (text.len == 0) {
-        ngx_stream_close_connection(c);
+        ngx_stream_finalize_session(s, NGX_STREAM_OK);
         return;
     }
 
     ctx = ngx_pcalloc(c->pool, sizeof(ngx_stream_return_ctx_t));
     if (ctx == NULL) {
-        ngx_stream_close_connection(c);
+        ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
         return;
     }
 
@@ -126,7 +126,7 @@ ngx_stream_return_write_handler(ngx_event_t *ev)
 
     if (ev->timedout) {
         ngx_connection_error(c, NGX_ETIMEDOUT, "connection timed out");
-        ngx_stream_close_connection(c);
+        ngx_stream_finalize_session(s, NGX_STREAM_OK);
         return;
     }
 
@@ -137,7 +137,7 @@ ngx_stream_return_write_handler(ngx_event_t *ev)
 
         n = c->send(c, b->pos, b->last - b->pos);
         if (n == NGX_ERROR) {
-            ngx_stream_close_connection(c);
+            ngx_stream_finalize_session(s, NGX_STREAM_OK);
             return;
         }
 
@@ -145,14 +145,14 @@ ngx_stream_return_write_handler(ngx_event_t *ev)
             b->pos += n;
 
             if (b->pos == b->last) {
-                ngx_stream_close_connection(c);
+                ngx_stream_finalize_session(s, NGX_STREAM_OK);
                 return;
             }
         }
     }
 
     if (ngx_handle_write_event(ev, 0) != NGX_OK) {
-        ngx_stream_close_connection(c);
+        ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
         return;
     }
 

  Renamed: vendor/nginx-1.11.4/src/stream/ngx_stream_script.c (+67 -0) 92%
===================================================================
--- vendor/nginx-1.11.3/src/stream/ngx_stream_script.c    2016-09-27 21:40:31 +0900 (8130f92)
+++ vendor/nginx-1.11.4/src/stream/ngx_stream_script.c    2016-09-27 23:25:47 +0900 (ff8e655)
@@ -388,6 +388,73 @@ invalid_variable:
 }
 
 
+u_char *
+ngx_stream_script_run(ngx_stream_session_t *s, ngx_str_t *value,
+    void *code_lengths, size_t len, void *code_values)
+{
+    ngx_uint_t                      i;
+    ngx_stream_script_code_pt       code;
+    ngx_stream_script_engine_t      e;
+    ngx_stream_core_main_conf_t    *cmcf;
+    ngx_stream_script_len_code_pt   lcode;
+
+    cmcf = ngx_stream_get_module_main_conf(s, ngx_stream_core_module);
+
+    for (i = 0; i < cmcf->variables.nelts; i++) {
+        if (s->variables[i].no_cacheable) {
+            s->variables[i].valid = 0;
+            s->variables[i].not_found = 0;
+        }
+    }
+
+    ngx_memzero(&e, sizeof(ngx_stream_script_engine_t));
+
+    e.ip = code_lengths;
+    e.session = s;
+    e.flushed = 1;
+
+    while (*(uintptr_t *) e.ip) {
+        lcode = *(ngx_stream_script_len_code_pt *) e.ip;
+        len += lcode(&e);
+    }
+
+
+    value->len = len;
+    value->data = ngx_pnalloc(s->connection->pool, len);
+    if (value->data == NULL) {
+        return NULL;
+    }
+
+    e.ip = code_values;
+    e.pos = value->data;
+
+    while (*(uintptr_t *) e.ip) {
+        code = *(ngx_stream_script_code_pt *) e.ip;
+        code((ngx_stream_script_engine_t *) &e);
+    }
+
+    return e.pos;
+}
+
+
+void
+ngx_stream_script_flush_no_cacheable_variables(ngx_stream_session_t *s,
+    ngx_array_t *indices)
+{
+    ngx_uint_t  n, *index;
+
+    if (indices) {
+        index = indices->elts;
+        for (n = 0; n < indices->nelts; n++) {
+            if (s->variables[index[n]].no_cacheable) {
+                s->variables[index[n]].valid = 0;
+                s->variables[index[n]].not_found = 0;
+            }
+        }
+    }
+}
+
+
 static ngx_int_t
 ngx_stream_script_init_arrays(ngx_stream_script_compile_t *sc)
 {

  Renamed: vendor/nginx-1.11.4/src/stream/ngx_stream_script.h (+4 -0) 93%
===================================================================
--- vendor/nginx-1.11.3/src/stream/ngx_stream_script.h    2016-09-27 21:40:31 +0900 (0abe50e)
+++ vendor/nginx-1.11.4/src/stream/ngx_stream_script.h    2016-09-27 23:25:47 +0900 (25a450d)
@@ -110,6 +110,10 @@ char *ngx_stream_set_complex_value_slot(ngx_conf_t *cf, ngx_command_t *cmd,
 
 ngx_uint_t ngx_stream_script_variables_count(ngx_str_t *value);
 ngx_int_t ngx_stream_script_compile(ngx_stream_script_compile_t *sc);
+u_char *ngx_stream_script_run(ngx_stream_session_t *s, ngx_str_t *value,
+    void *code_lengths, size_t reserved, void *code_values);
+void ngx_stream_script_flush_no_cacheable_variables(ngx_stream_session_t *s,
+    ngx_array_t *indices);
 
 void *ngx_stream_script_add_code(ngx_array_t *codes, size_t size, void *code);
 

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

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

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

  Renamed: vendor/nginx-1.11.4/src/stream/ngx_stream_upstream.c (+235 -1) 69%
===================================================================
--- vendor/nginx-1.11.3/src/stream/ngx_stream_upstream.c    2016-09-27 21:40:31 +0900 (2ea5eeb)
+++ vendor/nginx-1.11.4/src/stream/ngx_stream_upstream.c    2016-09-27 23:25:47 +0900 (0c59780)
@@ -10,6 +10,14 @@
 #include <ngx_stream.h>
 
 
+static ngx_int_t ngx_stream_upstream_add_variables(ngx_conf_t *cf);
+static ngx_int_t ngx_stream_upstream_addr_variable(ngx_stream_session_t *s,
+    ngx_stream_variable_value_t *v, uintptr_t data);
+static ngx_int_t ngx_stream_upstream_response_time_variable(
+    ngx_stream_session_t *s, ngx_stream_variable_value_t *v, uintptr_t data);
+static ngx_int_t ngx_stream_upstream_bytes_variable(ngx_stream_session_t *s,
+    ngx_stream_variable_value_t *v, uintptr_t data);
+
 static char *ngx_stream_upstream(ngx_conf_t *cf, ngx_command_t *cmd,
     void *dummy);
 static char *ngx_stream_upstream_server(ngx_conf_t *cf, ngx_command_t *cmd,
@@ -39,7 +47,7 @@ static ngx_command_t  ngx_stream_upstream_commands[] = {
 
 
 static ngx_stream_module_t  ngx_stream_upstream_module_ctx = {
-    NULL,                                  /* preconfiguration */
+    ngx_stream_upstream_add_variables,     /* preconfiguration */
     NULL,                                  /* postconfiguration */
 
     ngx_stream_upstream_create_main_conf,  /* create main configuration */
@@ -66,6 +74,232 @@ ngx_module_t  ngx_stream_upstream_module = {
 };
 
 
+static ngx_stream_variable_t  ngx_stream_upstream_vars[] = {
+
+    { ngx_string("upstream_addr"), NULL,
+      ngx_stream_upstream_addr_variable, 0,
+      NGX_STREAM_VAR_NOCACHEABLE, 0 },
+
+    { ngx_string("upstream_bytes_sent"), NULL,
+      ngx_stream_upstream_bytes_variable, 0,
+      NGX_STREAM_VAR_NOCACHEABLE, 0 },
+
+    { ngx_string("upstream_connect_time"), NULL,
+      ngx_stream_upstream_response_time_variable, 2,
+      NGX_STREAM_VAR_NOCACHEABLE, 0 },
+
+    { ngx_string("upstream_first_byte_time"), NULL,
+      ngx_stream_upstream_response_time_variable, 1,
+      NGX_STREAM_VAR_NOCACHEABLE, 0 },
+
+    { ngx_string("upstream_session_time"), NULL,
+      ngx_stream_upstream_response_time_variable, 0,
+      NGX_STREAM_VAR_NOCACHEABLE, 0 },
+
+    { ngx_string("upstream_bytes_received"), NULL,
+      ngx_stream_upstream_bytes_variable, 1,
+      NGX_STREAM_VAR_NOCACHEABLE, 0 },
+
+    { ngx_null_string, NULL, NULL, 0, 0, 0 }
+};
+
+
+static ngx_int_t
+ngx_stream_upstream_add_variables(ngx_conf_t *cf)
+{
+    ngx_stream_variable_t  *var, *v;
+
+    for (v = ngx_stream_upstream_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 ngx_int_t
+ngx_stream_upstream_addr_variable(ngx_stream_session_t *s,
+    ngx_stream_variable_value_t *v, uintptr_t data)
+{
+    u_char                       *p;
+    size_t                        len;
+    ngx_uint_t                    i;
+    ngx_stream_upstream_state_t  *state;
+
+    v->valid = 1;
+    v->no_cacheable = 0;
+    v->not_found = 0;
+
+    if (s->upstream_states == NULL || s->upstream_states->nelts == 0) {
+        v->not_found = 1;
+        return NGX_OK;
+    }
+
+    len = 0;
+    state = s->upstream_states->elts;
+
+    for (i = 0; i < s->upstream_states->nelts; i++) {
+        if (state[i].peer) {
+            len += state[i].peer->len;
+        }
+
+        len += 2;
+    }
+
+    p = ngx_pnalloc(s->connection->pool, len);
+    if (p == NULL) {
+        return NGX_ERROR;
+    }
+
+    v->data = p;
+
+    i = 0;
+
+    for ( ;; ) {
+        if (state[i].peer) {
+            p = ngx_cpymem(p, state[i].peer->data, state[i].peer->len);
+        }
+
+        if (++i == s->upstream_states->nelts) {
+            break;
+        }
+
+        *p++ = ',';
+        *p++ = ' ';
+    }
+
+    v->len = p - v->data;
+
+    return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_stream_upstream_bytes_variable(ngx_stream_session_t *s,
+    ngx_stream_variable_value_t *v, uintptr_t data)
+{
+    u_char                       *p;
+    size_t                        len;
+    ngx_uint_t                    i;
+    ngx_stream_upstream_state_t  *state;
+
+    v->valid = 1;
+    v->no_cacheable = 0;
+    v->not_found = 0;
+
+    if (s->upstream_states == NULL || s->upstream_states->nelts == 0) {
+        v->not_found = 1;
+        return NGX_OK;
+    }
+
+    len = s->upstream_states->nelts * (NGX_OFF_T_LEN + 2);
+
+    p = ngx_pnalloc(s->connection->pool, len);
+    if (p == NULL) {
+        return NGX_ERROR;
+    }
+
+    v->data = p;
+
+    i = 0;
+    state = s->upstream_states->elts;
+
+    for ( ;; ) {
+
+        if (data == 1) {
+            p = ngx_sprintf(p, "%O", state[i].bytes_received);
+
+        } else {
+            p = ngx_sprintf(p, "%O", state[i].bytes_sent);
+        }
+
+        if (++i == s->upstream_states->nelts) {
+            break;
+        }
+
+        *p++ = ',';
+        *p++ = ' ';
+    }
+
+    v->len = p - v->data;
+
+    return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_stream_upstream_response_time_variable(ngx_stream_session_t *s,
+    ngx_stream_variable_value_t *v, uintptr_t data)
+{
+    u_char                       *p;
+    size_t                        len;
+    ngx_uint_t                    i;
+    ngx_msec_int_t                ms;
+    ngx_stream_upstream_state_t  *state;
+
+    v->valid = 1;
+    v->no_cacheable = 0;
+    v->not_found = 0;
+
+    if (s->upstream_states == NULL || s->upstream_states->nelts == 0) {
+        v->not_found = 1;
+        return NGX_OK;
+    }
+
+    len = s->upstream_states->nelts * (NGX_TIME_T_LEN + 4 + 2);
+
+    p = ngx_pnalloc(s->connection->pool, len);
+    if (p == NULL) {
+        return NGX_ERROR;
+    }
+
+    v->data = p;
+
+    i = 0;
+    state = s->upstream_states->elts;
+
+    for ( ;; ) {
+
+        if (data == 1) {
+            if (state[i].first_byte_time == (ngx_msec_t) -1) {
+                *p++ = '-';
+                goto next;
+            }
+
+            ms = state[i].first_byte_time;
+
+        } else if (data == 2 && state[i].connect_time != (ngx_msec_t) -1) {
+            ms = state[i].connect_time;
+
+        } else {
+            ms = state[i].response_time;
+        }
+
+        ms = ngx_max(ms, 0);
+        p = ngx_sprintf(p, "%T.%03M", (time_t) ms / 1000, ms % 1000);
+
+    next:
+
+        if (++i == s->upstream_states->nelts) {
+            break;
+        }
+
+        *p++ = ',';
+        *p++ = ' ';
+    }
+
+    v->len = p - v->data;
+
+    return NGX_OK;
+}
+
+
 static char *
 ngx_stream_upstream(ngx_conf_t *cf, ngx_command_t *cmd, void *dummy)
 {

  Renamed: vendor/nginx-1.11.4/src/stream/ngx_stream_upstream.h (+12 -0) 89%
===================================================================
--- vendor/nginx-1.11.3/src/stream/ngx_stream_upstream.h    2016-09-27 21:40:31 +0900 (5f067c0)
+++ vendor/nginx-1.11.4/src/stream/ngx_stream_upstream.h    2016-09-27 23:25:47 +0900 (f83b5ba)
@@ -79,6 +79,17 @@ struct ngx_stream_upstream_srv_conf_s {
 
 
 typedef struct {
+    ngx_msec_t                         response_time;
+    ngx_msec_t                         connect_time;
+    ngx_msec_t                         first_byte_time;
+    off_t                              bytes_sent;
+    off_t                              bytes_received;
+
+    ngx_str_t                         *peer;
+} ngx_stream_upstream_state_t;
+
+
+typedef struct {
     ngx_str_t                          host;
     in_port_t                          port;
     ngx_uint_t                         no_port; /* unsigned no_port:1 */
@@ -104,6 +115,7 @@ typedef struct {
     ngx_str_t                          ssl_name;
 #endif
     ngx_stream_upstream_resolved_t    *resolved;
+    ngx_stream_upstream_state_t       *state;
     unsigned                           connected:1;
     unsigned                           proxy_protocol:1;
 } ngx_stream_upstream_t;

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

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

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

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

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

  Renamed: vendor/nginx-1.11.4/src/stream/ngx_stream_variables.c (+139 -4) 85%
===================================================================
--- vendor/nginx-1.11.3/src/stream/ngx_stream_variables.c    2016-09-27 21:40:31 +0900 (10f9c7e)
+++ vendor/nginx-1.11.4/src/stream/ngx_stream_variables.c    2016-09-27 23:25:47 +0900 (aa5361d)
@@ -17,11 +17,19 @@ static ngx_int_t ngx_stream_variable_remote_addr(ngx_stream_session_t *s,
     ngx_stream_variable_value_t *v, uintptr_t data);
 static ngx_int_t ngx_stream_variable_remote_port(ngx_stream_session_t *s,
     ngx_stream_variable_value_t *v, uintptr_t data);
+static ngx_int_t ngx_stream_variable_proxy_protocol_addr(
+    ngx_stream_session_t *s, ngx_stream_variable_value_t *v, uintptr_t data);
+static ngx_int_t ngx_stream_variable_proxy_protocol_port(
+    ngx_stream_session_t *s, ngx_stream_variable_value_t *v, uintptr_t data);
 static ngx_int_t ngx_stream_variable_server_addr(ngx_stream_session_t *s,
     ngx_stream_variable_value_t *v, uintptr_t data);
 static ngx_int_t ngx_stream_variable_server_port(ngx_stream_session_t *s,
     ngx_stream_variable_value_t *v, uintptr_t data);
-static ngx_int_t ngx_stream_variable_bytes_sent(ngx_stream_session_t *s,
+static ngx_int_t ngx_stream_variable_bytes(ngx_stream_session_t *s,
+    ngx_stream_variable_value_t *v, uintptr_t data);
+static ngx_int_t ngx_stream_variable_session_time(ngx_stream_session_t *s,
+    ngx_stream_variable_value_t *v, uintptr_t data);
+static ngx_int_t ngx_stream_variable_status(ngx_stream_session_t *s,
     ngx_stream_variable_value_t *v, uintptr_t data);
 static ngx_int_t ngx_stream_variable_connection(ngx_stream_session_t *s,
     ngx_stream_variable_value_t *v, uintptr_t data);
@@ -38,6 +46,8 @@ static ngx_int_t ngx_stream_variable_time_iso8601(ngx_stream_session_t *s,
     ngx_stream_variable_value_t *v, uintptr_t data);
 static ngx_int_t ngx_stream_variable_time_local(ngx_stream_session_t *s,
     ngx_stream_variable_value_t *v, uintptr_t data);
+static ngx_int_t ngx_stream_variable_protocol(ngx_stream_session_t *s,
+    ngx_stream_variable_value_t *v, uintptr_t data);
 
 
 static ngx_stream_variable_t  ngx_stream_core_variables[] = {
@@ -51,15 +61,30 @@ static ngx_stream_variable_t  ngx_stream_core_variables[] = {
     { ngx_string("remote_port"), NULL,
       ngx_stream_variable_remote_port, 0, 0, 0 },
 
+    { ngx_string("proxy_protocol_addr"), NULL,
+      ngx_stream_variable_proxy_protocol_addr, 0, 0, 0 },
+
+    { ngx_string("proxy_protocol_port"), NULL,
+      ngx_stream_variable_proxy_protocol_port, 0, 0, 0 },
+
     { ngx_string("server_addr"), NULL,
       ngx_stream_variable_server_addr, 0, 0, 0 },
 
     { ngx_string("server_port"), NULL,
       ngx_stream_variable_server_port, 0, 0, 0 },
 
-    { ngx_string("bytes_sent"), NULL, ngx_stream_variable_bytes_sent,
+    { ngx_string("bytes_sent"), NULL, ngx_stream_variable_bytes,
       0, 0, 0 },
 
+    { ngx_string("bytes_received"), NULL, ngx_stream_variable_bytes,
+      1, 0, 0 },
+
+    { ngx_string("session_time"), NULL, ngx_stream_variable_session_time,
+      0, NGX_STREAM_VAR_NOCACHEABLE, 0 },
+
+    { ngx_string("status"), NULL, ngx_stream_variable_status,
+      0, NGX_STREAM_VAR_NOCACHEABLE, 0 },
+
     { ngx_string("connection"), NULL,
       ngx_stream_variable_connection, 0, 0, 0 },
 
@@ -81,6 +106,9 @@ static ngx_stream_variable_t  ngx_stream_core_variables[] = {
     { ngx_string("time_local"), NULL, ngx_stream_variable_time_local,
       0, NGX_STREAM_VAR_NOCACHEABLE, 0 },
 
+    { ngx_string("protocol"), NULL,
+      ngx_stream_variable_protocol, 0, 0, 0 },
+
     { ngx_null_string, NULL, NULL, 0, 0, 0 }
 };
 
@@ -400,6 +428,46 @@ ngx_stream_variable_remote_port(ngx_stream_session_t *s,
 
 
 static ngx_int_t
+ngx_stream_variable_proxy_protocol_addr(ngx_stream_session_t *s,
+    ngx_stream_variable_value_t *v, uintptr_t data)
+{
+    v->len = s->connection->proxy_protocol_addr.len;
+    v->valid = 1;
+    v->no_cacheable = 0;
+    v->not_found = 0;
+    v->data = s->connection->proxy_protocol_addr.data;
+
+    return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_stream_variable_proxy_protocol_port(ngx_stream_session_t *s,
+    ngx_stream_variable_value_t *v, uintptr_t data)
+{
+    ngx_uint_t  port;
+
+    v->len = 0;
+    v->valid = 1;
+    v->no_cacheable = 0;
+    v->not_found = 0;
+
+    v->data = ngx_pnalloc(s->connection->pool, sizeof("65535") - 1);
+    if (v->data == NULL) {
+        return NGX_ERROR;
+    }
+
+    port = s->connection->proxy_protocol_port;
+
+    if (port > 0 && port < 65536) {
+        v->len = ngx_sprintf(v->data, "%ui", port) - v->data;
+    }
+
+    return NGX_OK;
+}
+
+
+static ngx_int_t
 ngx_stream_variable_server_addr(ngx_stream_session_t *s,
     ngx_stream_variable_value_t *v, uintptr_t data)
 {
@@ -461,7 +529,7 @@ ngx_stream_variable_server_port(ngx_stream_session_t *s,
 
 
 static ngx_int_t
-ngx_stream_variable_bytes_sent(ngx_stream_session_t *s,
+ngx_stream_variable_bytes(ngx_stream_session_t *s,
     ngx_stream_variable_value_t *v, uintptr_t data)
 {
     u_char  *p;
@@ -471,7 +539,13 @@ ngx_stream_variable_bytes_sent(ngx_stream_session_t *s,
         return NGX_ERROR;
     }
 
-    v->len = ngx_sprintf(p, "%O", s->connection->sent) - p;
+    if (data == 1) {
+        v->len = ngx_sprintf(p, "%O", s->received) - p;
+
+    } else {
+        v->len = ngx_sprintf(p, "%O", s->connection->sent) - p;
+    }
+
     v->valid = 1;
     v->no_cacheable = 0;
     v->not_found = 0;
@@ -482,6 +556,53 @@ ngx_stream_variable_bytes_sent(ngx_stream_session_t *s,
 
 
 static ngx_int_t
+ngx_stream_variable_session_time(ngx_stream_session_t *s,
+    ngx_stream_variable_value_t *v, uintptr_t data)
+{
+    u_char          *p;
+    ngx_time_t      *tp;
+    ngx_msec_int_t   ms;
+
+    p = ngx_pnalloc(s->connection->pool, NGX_TIME_T_LEN + 4);
+    if (p == NULL) {
+        return NGX_ERROR;
+    }
+
+    tp = ngx_timeofday();
+
+    ms = (ngx_msec_int_t)
+             ((tp->sec - s->start_sec) * 1000 + (tp->msec - s->start_msec));
+    ms = ngx_max(ms, 0);
+
+    v->len = ngx_sprintf(p, "%T.%03M", (time_t) ms / 1000, ms % 1000) - p;
+    v->valid = 1;
+    v->no_cacheable = 0;
+    v->not_found = 0;
+    v->data = p;
+
+    return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_stream_variable_status(ngx_stream_session_t *s,
+    ngx_stream_variable_value_t *v, uintptr_t data)
+{
+    v->data = ngx_pnalloc(s->connection->pool, NGX_INT_T_LEN);
+    if (v->data == NULL) {
+        return NGX_ERROR;
+    }
+
+    v->len = ngx_sprintf(v->data, "%03ui", s->status) - v->data;
+    v->valid = 1;
+    v->no_cacheable = 0;
+    v->not_found = 0;
+
+    return NGX_OK;
+}
+
+
+static ngx_int_t
 ngx_stream_variable_connection(ngx_stream_session_t *s,
     ngx_stream_variable_value_t *v, uintptr_t data)
 {
@@ -622,6 +743,20 @@ ngx_stream_variable_time_local(ngx_stream_session_t *s,
 }
 
 
+static ngx_int_t
+ngx_stream_variable_protocol(ngx_stream_session_t *s,
+    ngx_stream_variable_value_t *v, uintptr_t data)
+{
+    v->len = 3;
+    v->valid = 1;
+    v->no_cacheable = 0;
+    v->not_found = 0;
+    v->data = (u_char *) (s->connection->type == SOCK_DGRAM ? "UDP" : "TCP");
+
+    return NGX_OK;
+}
+
+
 void *
 ngx_stream_map_find(ngx_stream_session_t *s, ngx_stream_map_t *map,
     ngx_str_t *match)

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




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