[Groonga-commit] groonga/groonga at cc669f1 [master] nginx: update mainline version

Back to archive index

HAYASHI Kentaro null+****@clear*****
Mon Feb 9 04:48:38 JST 2015


HAYASHI Kentaro	2015-02-09 04:48:38 +0900 (Mon, 09 Feb 2015)

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

  Message:
    nginx: update mainline version
    
    1.7.7 ->
    1.7.9

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

  Modified: nginx_version (+1 -1)
===================================================================
--- nginx_version    2015-02-09 04:43:41 +0900 (91c74a5)
+++ nginx_version    2015-02-09 04:48:38 +0900 (f65dc1e)
@@ -1 +1 @@
-1.7.7
+1.7.9

  Deleted: vendor/nginx-1.7.7/src/event/ngx_event_timer.c (+0 -128) 100644
===================================================================
--- vendor/nginx-1.7.7/src/event/ngx_event_timer.c    2015-02-09 04:43:41 +0900 (1075586)
+++ /dev/null
@@ -1,128 +0,0 @@
-
-/*
- * Copyright (C) Igor Sysoev
- * Copyright (C) Nginx, Inc.
- */
-
-
-#include <ngx_config.h>
-#include <ngx_core.h>
-#include <ngx_event.h>
-
-
-#if (NGX_THREADS)
-ngx_mutex_t  *ngx_event_timer_mutex;
-#endif
-
-
-ngx_thread_volatile ngx_rbtree_t  ngx_event_timer_rbtree;
-static ngx_rbtree_node_t          ngx_event_timer_sentinel;
-
-/*
- * the event timer rbtree may contain the duplicate keys, however,
- * it should not be a problem, because we use the rbtree to find
- * a minimum timer value only
- */
-
-ngx_int_t
-ngx_event_timer_init(ngx_log_t *log)
-{
-    ngx_rbtree_init(&ngx_event_timer_rbtree, &ngx_event_timer_sentinel,
-                    ngx_rbtree_insert_timer_value);
-
-#if (NGX_THREADS)
-
-    if (ngx_event_timer_mutex) {
-        ngx_event_timer_mutex->log = log;
-        return NGX_OK;
-    }
-
-    ngx_event_timer_mutex = ngx_mutex_init(log, 0);
-    if (ngx_event_timer_mutex == NULL) {
-        return NGX_ERROR;
-    }
-
-#endif
-
-    return NGX_OK;
-}
-
-
-ngx_msec_t
-ngx_event_find_timer(void)
-{
-    ngx_msec_int_t      timer;
-    ngx_rbtree_node_t  *node, *root, *sentinel;
-
-    if (ngx_event_timer_rbtree.root == &ngx_event_timer_sentinel) {
-        return NGX_TIMER_INFINITE;
-    }
-
-    ngx_mutex_lock(ngx_event_timer_mutex);
-
-    root = ngx_event_timer_rbtree.root;
-    sentinel = ngx_event_timer_rbtree.sentinel;
-
-    node = ngx_rbtree_min(root, sentinel);
-
-    ngx_mutex_unlock(ngx_event_timer_mutex);
-
-    timer = (ngx_msec_int_t) (node->key - ngx_current_msec);
-
-    return (ngx_msec_t) (timer > 0 ? timer : 0);
-}
-
-
-void
-ngx_event_expire_timers(void)
-{
-    ngx_event_t        *ev;
-    ngx_rbtree_node_t  *node, *root, *sentinel;
-
-    sentinel = ngx_event_timer_rbtree.sentinel;
-
-    for ( ;; ) {
-
-        ngx_mutex_lock(ngx_event_timer_mutex);
-
-        root = ngx_event_timer_rbtree.root;
-
-        if (root == sentinel) {
-            return;
-        }
-
-        node = ngx_rbtree_min(root, sentinel);
-
-        /* node->key <= ngx_current_time */
-
-        if ((ngx_msec_int_t) (node->key - ngx_current_msec) <= 0) {
-            ev = (ngx_event_t *) ((char *) node - offsetof(ngx_event_t, timer));
-
-            ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ev->log, 0,
-                           "event timer del: %d: %M",
-                           ngx_event_ident(ev->data), ev->timer.key);
-
-            ngx_rbtree_delete(&ngx_event_timer_rbtree, &ev->timer);
-
-            ngx_mutex_unlock(ngx_event_timer_mutex);
-
-#if (NGX_DEBUG)
-            ev->timer.left = NULL;
-            ev->timer.right = NULL;
-            ev->timer.parent = NULL;
-#endif
-
-            ev->timer_set = 0;
-
-            ev->timedout = 1;
-
-            ev->handler(ev);
-
-            continue;
-        }
-
-        break;
-    }
-
-    ngx_mutex_unlock(ngx_event_timer_mutex);
-}

  Deleted: vendor/nginx-1.7.7/src/os/unix/ngx_darwin_sendfile_chain.c (+0 -324) 100644
===================================================================
--- vendor/nginx-1.7.7/src/os/unix/ngx_darwin_sendfile_chain.c    2015-02-09 04:43:41 +0900 (8485f97)
+++ /dev/null
@@ -1,324 +0,0 @@
-
-/*
- * Copyright (C) Igor Sysoev
- * Copyright (C) Nginx, Inc.
- */
-
-
-#include <ngx_config.h>
-#include <ngx_core.h>
-#include <ngx_event.h>
-
-
-/*
- * It seems that Darwin 9.4 (Mac OS X 1.5) sendfile() has the same
- * old bug as early FreeBSD sendfile() syscall:
- * http://bugs.freebsd.org/33771
- *
- * Besides sendfile() has another bug: if one calls sendfile()
- * with both a header and a trailer, then sendfile() ignores a file part
- * at all and sends only the header and the trailer together.
- * For this reason we send a trailer only if there is no a header.
- *
- * Although sendfile() allows to pass a header or a trailer,
- * it may send the header or the trailer and a part of the file
- * in different packets.  And FreeBSD workaround (TCP_NOPUSH option)
- * does not help.
- */
-
-
-ngx_chain_t *
-ngx_darwin_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
-{
-    int              rc;
-    u_char          *prev;
-    off_t            size, send, prev_send, aligned, sent, fprev;
-    off_t            header_size, file_size;
-    ngx_uint_t       eintr;
-    ngx_err_t        err;
-    ngx_buf_t       *file;
-    ngx_array_t      header, trailer;
-    ngx_event_t     *wev;
-    ngx_chain_t     *cl;
-    struct sf_hdtr   hdtr;
-    struct iovec    *iov;
-    struct iovec     headers[NGX_IOVS_PREALLOCATE];
-    struct iovec     trailers[NGX_IOVS_PREALLOCATE];
-
-    wev = c->write;
-
-    if (!wev->ready) {
-        return in;
-    }
-
-#if (NGX_HAVE_KQUEUE)
-
-    if ((ngx_event_flags & NGX_USE_KQUEUE_EVENT) && wev->pending_eof) {
-        (void) ngx_connection_error(c, wev->kq_errno,
-                               "kevent() reported about an closed connection");
-        wev->error = 1;
-        return NGX_CHAIN_ERROR;
-    }
-
-#endif
-
-    /* the maximum limit size is the maximum size_t value - the page size */
-
-    if (limit == 0 || limit > (off_t) (NGX_MAX_SIZE_T_VALUE - ngx_pagesize)) {
-        limit = NGX_MAX_SIZE_T_VALUE - ngx_pagesize;
-    }
-
-    send = 0;
-
-    header.elts = headers;
-    header.size = sizeof(struct iovec);
-    header.nalloc = NGX_IOVS_PREALLOCATE;
-    header.pool = c->pool;
-
-    trailer.elts = trailers;
-    trailer.size = sizeof(struct iovec);
-    trailer.nalloc = NGX_IOVS_PREALLOCATE;
-    trailer.pool = c->pool;
-
-    for ( ;; ) {
-        file = NULL;
-        file_size = 0;
-        header_size = 0;
-        eintr = 0;
-        prev_send = send;
-
-        header.nelts = 0;
-        trailer.nelts = 0;
-
-        /* create the header iovec and coalesce the neighbouring bufs */
-
-        prev = NULL;
-        iov = NULL;
-
-        for (cl = in; cl && send < limit; cl = cl->next) {
-
-            if (ngx_buf_special(cl->buf)) {
-                continue;
-            }
-
-            if (!ngx_buf_in_memory_only(cl->buf)) {
-                break;
-            }
-
-            size = cl->buf->last - cl->buf->pos;
-
-            if (send + size > limit) {
-                size = limit - send;
-            }
-
-            if (prev == cl->buf->pos) {
-                iov->iov_len += (size_t) size;
-
-            } else {
-                if (header.nelts >= IOV_MAX) {
-                    break;
-                }
-
-                iov = ngx_array_push(&header);
-                if (iov == NULL) {
-                    return NGX_CHAIN_ERROR;
-                }
-
-                iov->iov_base = (void *) cl->buf->pos;
-                iov->iov_len = (size_t) size;
-            }
-
-            prev = cl->buf->pos + (size_t) size;
-            header_size += size;
-            send += size;
-        }
-
-
-        if (cl && cl->buf->in_file && send < limit) {
-            file = cl->buf;
-
-            /* coalesce the neighbouring file bufs */
-
-            do {
-                size = cl->buf->file_last - cl->buf->file_pos;
-
-                if (send + size > limit) {
-                    size = limit - send;
-
-                    aligned = (cl->buf->file_pos + size + ngx_pagesize - 1)
-                               & ~((off_t) ngx_pagesize - 1);
-
-                    if (aligned <= cl->buf->file_last) {
-                        size = aligned - cl->buf->file_pos;
-                    }
-                }
-
-                file_size += size;
-                send += size;
-                fprev = cl->buf->file_pos + size;
-                cl = cl->next;
-
-            } while (cl
-                     && cl->buf->in_file
-                     && send < limit
-                     && file->file->fd == cl->buf->file->fd
-                     && fprev == cl->buf->file_pos);
-        }
-
-        if (file && header.nelts == 0) {
-
-            /* create the trailer iovec and coalesce the neighbouring bufs */
-
-            prev = NULL;
-            iov = NULL;
-
-            while (cl && send < limit) {
-
-                if (ngx_buf_special(cl->buf)) {
-                    cl = cl->next;
-                    continue;
-                }
-
-                if (!ngx_buf_in_memory_only(cl->buf)) {
-                    break;
-                }
-
-                size = cl->buf->last - cl->buf->pos;
-
-                if (send + size > limit) {
-                    size = limit - send;
-                }
-
-                if (prev == cl->buf->pos) {
-                    iov->iov_len += (size_t) size;
-
-                } else {
-                    if (trailer.nelts >= IOV_MAX) {
-                        break;
-                    }
-
-                    iov = ngx_array_push(&trailer);
-                    if (iov == NULL) {
-                        return NGX_CHAIN_ERROR;
-                    }
-
-                    iov->iov_base = (void *) cl->buf->pos;
-                    iov->iov_len = (size_t) size;
-                }
-
-                prev = cl->buf->pos + (size_t) size;
-                send += size;
-                cl = cl->next;
-            }
-        }
-
-        if (file) {
-
-            /*
-             * sendfile() returns EINVAL if sf_hdtr's count is 0,
-             * but corresponding pointer is not NULL
-             */
-
-            hdtr.headers = header.nelts ? (struct iovec *) header.elts: NULL;
-            hdtr.hdr_cnt = header.nelts;
-            hdtr.trailers = trailer.nelts ? (struct iovec *) trailer.elts: NULL;
-            hdtr.trl_cnt = trailer.nelts;
-
-            sent = header_size + file_size;
-
-            ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                           "sendfile: @%O %O h:%O",
-                           file->file_pos, sent, header_size);
-
-            rc = sendfile(file->file->fd, c->fd, file->file_pos,
-                          &sent, &hdtr, 0);
-
-            if (rc == -1) {
-                err = ngx_errno;
-
-                switch (err) {
-                case NGX_EAGAIN:
-                    break;
-
-                case NGX_EINTR:
-                    eintr = 1;
-                    break;
-
-                default:
-                    wev->error = 1;
-                    (void) ngx_connection_error(c, err, "sendfile() failed");
-                    return NGX_CHAIN_ERROR;
-                }
-
-                ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, err,
-                               "sendfile() sent only %O bytes", sent);
-            }
-
-            if (rc == 0 && sent == 0) {
-
-                /*
-                 * if rc and sent equal to zero, then someone
-                 * has truncated the file, so the offset became beyond
-                 * the end of the file
-                 */
-
-                ngx_log_error(NGX_LOG_ALERT, c->log, 0,
-                              "sendfile() reported that \"%s\" was truncated",
-                              file->file->name.data);
-
-                return NGX_CHAIN_ERROR;
-            }
-
-            ngx_log_debug4(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                           "sendfile: %d, @%O %O:%O",
-                           rc, file->file_pos, sent, file_size + header_size);
-
-        } else {
-            rc = writev(c->fd, header.elts, header.nelts);
-
-            ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                           "writev: %d of %O", rc, header_size);
-
-            if (rc == -1) {
-                err = ngx_errno;
-
-                switch (err) {
-                case NGX_EAGAIN:
-                    break;
-
-                case NGX_EINTR:
-                    eintr = 1;
-                    break;
-
-                default:
-                    wev->error = 1;
-                    ngx_connection_error(c, err, "writev() failed");
-                    return NGX_CHAIN_ERROR;
-                }
-
-                ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, err,
-                               "writev() not ready");
-            }
-
-            sent = rc > 0 ? rc : 0;
-        }
-
-        c->sent += sent;
-
-        in = ngx_handle_sent_chain(in, sent);
-
-        if (eintr) {
-            send = prev_send + sent;
-            continue;
-        }
-
-        if (send - prev_send != sent) {
-            wev->ready = 0;
-            return in;
-        }
-
-        if (send >= limit || in == NULL) {
-            return in;
-        }
-    }
-}

  Deleted: vendor/nginx-1.7.7/src/os/unix/ngx_writev_chain.c (+0 -150) 100644
===================================================================
--- vendor/nginx-1.7.7/src/os/unix/ngx_writev_chain.c    2015-02-09 04:43:41 +0900 (c7b6ebf)
+++ /dev/null
@@ -1,150 +0,0 @@
-
-/*
- * Copyright (C) Igor Sysoev
- * Copyright (C) Nginx, Inc.
- */
-
-
-#include <ngx_config.h>
-#include <ngx_core.h>
-#include <ngx_event.h>
-
-
-ngx_chain_t *
-ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
-{
-    u_char        *prev;
-    ssize_t        n, size, sent;
-    off_t          send, prev_send;
-    ngx_uint_t     eintr;
-    ngx_err_t      err;
-    ngx_array_t    vec;
-    ngx_chain_t   *cl;
-    ngx_event_t   *wev;
-    struct iovec  *iov, iovs[NGX_IOVS_PREALLOCATE];
-
-    wev = c->write;
-
-    if (!wev->ready) {
-        return in;
-    }
-
-#if (NGX_HAVE_KQUEUE)
-
-    if ((ngx_event_flags & NGX_USE_KQUEUE_EVENT) && wev->pending_eof) {
-        (void) ngx_connection_error(c, wev->kq_errno,
-                               "kevent() reported about an closed connection");
-        wev->error = 1;
-        return NGX_CHAIN_ERROR;
-    }
-
-#endif
-
-    /* the maximum limit size is the maximum size_t value - the page size */
-
-    if (limit == 0 || limit > (off_t) (NGX_MAX_SIZE_T_VALUE - ngx_pagesize)) {
-        limit = NGX_MAX_SIZE_T_VALUE - ngx_pagesize;
-    }
-
-    send = 0;
-
-    vec.elts = iovs;
-    vec.size = sizeof(struct iovec);
-    vec.nalloc = NGX_IOVS_PREALLOCATE;
-    vec.pool = c->pool;
-
-    for ( ;; ) {
-        prev = NULL;
-        iov = NULL;
-        eintr = 0;
-        prev_send = send;
-
-        vec.nelts = 0;
-
-        /* create the iovec and coalesce the neighbouring bufs */
-
-        for (cl = in; cl && send < limit; cl = cl->next) {
-
-            if (ngx_buf_special(cl->buf)) {
-                continue;
-            }
-
-#if 1
-            if (!ngx_buf_in_memory(cl->buf)) {
-                ngx_debug_point();
-            }
-#endif
-
-            size = cl->buf->last - cl->buf->pos;
-
-            if (send + size > limit) {
-                size = (ssize_t) (limit - send);
-            }
-
-            if (prev == cl->buf->pos) {
-                iov->iov_len += size;
-
-            } else {
-                if (vec.nelts >= IOV_MAX) {
-                    break;
-                }
-
-                iov = ngx_array_push(&vec);
-                if (iov == NULL) {
-                    return NGX_CHAIN_ERROR;
-                }
-
-                iov->iov_base = (void *) cl->buf->pos;
-                iov->iov_len = size;
-            }
-
-            prev = cl->buf->pos + size;
-            send += size;
-        }
-
-        n = writev(c->fd, vec.elts, vec.nelts);
-
-        if (n == -1) {
-            err = ngx_errno;
-
-            switch (err) {
-            case NGX_EAGAIN:
-                break;
-
-            case NGX_EINTR:
-                eintr = 1;
-                break;
-
-            default:
-                wev->error = 1;
-                (void) ngx_connection_error(c, err, "writev() failed");
-                return NGX_CHAIN_ERROR;
-            }
-
-            ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, err,
-                           "writev() not ready");
-        }
-
-        sent = n > 0 ? n : 0;
-
-        ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, "writev: %z", sent);
-
-        c->sent += sent;
-
-        in = ngx_handle_sent_chain(in, sent);
-
-        if (eintr) {
-            send = prev_send;
-            continue;
-        }
-
-        if (send - prev_send != sent) {
-            wev->ready = 0;
-            return in;
-        }
-
-        if (send >= limit || in == NULL) {
-            return in;
-        }
-    }
-}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/auto/lib/test (+0 -0) 100%
===================================================================

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/auto/modules (+0 -0) 100%
===================================================================

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

  Renamed: vendor/nginx-1.7.9/auto/options (+0 -0) 100%
===================================================================

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/contrib/vim/syntax/nginx.vim (+183 -50) 78%
===================================================================
--- vendor/nginx-1.7.7/contrib/vim/syntax/nginx.vim    2015-02-09 04:43:41 +0900 (50d809b)
+++ vendor/nginx-1.7.9/contrib/vim/syntax/nginx.vim    2015-02-09 04:48:38 +0900 (444d96e)
@@ -31,6 +31,7 @@ syn keyword ngxDirectiveBlock limit_except contained
 syn keyword ngxDirectiveBlock if           contained
 syn keyword ngxDirectiveBlock geo          contained
 syn keyword ngxDirectiveBlock map          contained
+syn keyword ngxDirectiveBlock split_clients contained
 
 syn keyword ngxDirectiveImportant include
 syn keyword ngxDirectiveImportant root
@@ -41,6 +42,8 @@ syn keyword ngxDirectiveImportant internal
 syn keyword ngxDirectiveImportant proxy_pass
 syn keyword ngxDirectiveImportant memcached_pass
 syn keyword ngxDirectiveImportant fastcgi_pass
+syn keyword ngxDirectiveImportant scgi_pass
+syn keyword ngxDirectiveImportant uwsgi_pass
 syn keyword ngxDirectiveImportant try_files
 
 syn keyword ngxDirectiveControl break
@@ -53,12 +56,15 @@ syn keyword ngxDirectiveError post_action
 
 syn keyword ngxDirectiveDeprecated connections
 syn keyword ngxDirectiveDeprecated imap
+syn keyword ngxDirectiveDeprecated limit_zone
 syn keyword ngxDirectiveDeprecated open_file_cache_retest
 syn keyword ngxDirectiveDeprecated optimize_server_names
 syn keyword ngxDirectiveDeprecated satisfy_any
+syn keyword ngxDirectiveDeprecated so_keepalive
 
 syn keyword ngxDirective accept_mutex
 syn keyword ngxDirective accept_mutex_delay
+syn keyword ngxDirective acceptex_read
 syn keyword ngxDirective access_log
 syn keyword ngxDirective add_after_body
 syn keyword ngxDirective add_before_body
@@ -74,11 +80,14 @@ syn keyword ngxDirective auth_basic_user_file
 syn keyword ngxDirective auth_http
 syn keyword ngxDirective auth_http_header
 syn keyword ngxDirective auth_http_timeout
+syn keyword ngxDirective auth_request
+syn keyword ngxDirective auth_request_set
 syn keyword ngxDirective autoindex
 syn keyword ngxDirective autoindex_exact_size
 syn keyword ngxDirective autoindex_localtime
 syn keyword ngxDirective charset
 syn keyword ngxDirective charset_types
+syn keyword ngxDirective chunked_transfer_encoding
 syn keyword ngxDirective client_body_buffer_size
 syn keyword ngxDirective client_body_in_file_only
 syn keyword ngxDirective client_body_in_single_buffer
@@ -102,32 +111,44 @@ syn keyword ngxDirective devpoll_changes
 syn keyword ngxDirective devpoll_events
 syn keyword ngxDirective directio
 syn keyword ngxDirective directio_alignment
+syn keyword ngxDirective disable_symlinks
 syn keyword ngxDirective empty_gif
 syn keyword ngxDirective env
 syn keyword ngxDirective epoll_events
 syn keyword ngxDirective error_log
+syn keyword ngxDirective etag
 syn keyword ngxDirective eventport_events
 syn keyword ngxDirective expires
 syn keyword ngxDirective fastcgi_bind
 syn keyword ngxDirective fastcgi_buffer_size
+syn keyword ngxDirective fastcgi_buffering
 syn keyword ngxDirective fastcgi_buffers
 syn keyword ngxDirective fastcgi_busy_buffers_size
 syn keyword ngxDirective fastcgi_cache
+syn keyword ngxDirective fastcgi_cache_bypass
 syn keyword ngxDirective fastcgi_cache_key
+syn keyword ngxDirective fastcgi_cache_lock
+syn keyword ngxDirective fastcgi_cache_lock_timeout
 syn keyword ngxDirective fastcgi_cache_methods
 syn keyword ngxDirective fastcgi_cache_min_uses
 syn keyword ngxDirective fastcgi_cache_path
+syn keyword ngxDirective fastcgi_cache_revalidate
 syn keyword ngxDirective fastcgi_cache_use_stale
 syn keyword ngxDirective fastcgi_cache_valid
 syn keyword ngxDirective fastcgi_catch_stderr
 syn keyword ngxDirective fastcgi_connect_timeout
+syn keyword ngxDirective fastcgi_force_ranges
 syn keyword ngxDirective fastcgi_hide_header
 syn keyword ngxDirective fastcgi_ignore_client_abort
 syn keyword ngxDirective fastcgi_ignore_headers
 syn keyword ngxDirective fastcgi_index
 syn keyword ngxDirective fastcgi_intercept_errors
+syn keyword ngxDirective fastcgi_keep_conn
 syn keyword ngxDirective fastcgi_max_temp_file_size
 syn keyword ngxDirective fastcgi_next_upstream
+syn keyword ngxDirective fastcgi_next_upstream_timeout
+syn keyword ngxDirective fastcgi_next_upstream_tries
+syn keyword ngxDirective fastcgi_no_cache
 syn keyword ngxDirective fastcgi_param
 syn keyword ngxDirective fastcgi_pass_header
 syn keyword ngxDirective fastcgi_pass_request_body
@@ -140,12 +161,15 @@ syn keyword ngxDirective fastcgi_store
 syn keyword ngxDirective fastcgi_store_access
 syn keyword ngxDirective fastcgi_temp_file_write_size
 syn keyword ngxDirective fastcgi_temp_path
-syn keyword ngxDirective fastcgi_upstream_fail_timeout
-syn keyword ngxDirective fastcgi_upstream_max_fails
 syn keyword ngxDirective flv
 syn keyword ngxDirective geoip_city
 syn keyword ngxDirective geoip_country
+syn keyword ngxDirective geoip_org
+syn keyword ngxDirective geoip_proxy
+syn keyword ngxDirective geoip_proxy_recursive
 syn keyword ngxDirective google_perftools_profiles
+syn keyword ngxDirective gunzip
+syn keyword ngxDirective gunzip_buffers
 syn keyword ngxDirective gzip
 syn keyword ngxDirective gzip_buffers
 syn keyword ngxDirective gzip_comp_level
@@ -159,30 +183,40 @@ syn keyword ngxDirective gzip_static
 syn keyword ngxDirective gzip_types
 syn keyword ngxDirective gzip_vary
 syn keyword ngxDirective gzip_window
+syn keyword ngxDirective hash
 syn keyword ngxDirective if_modified_since
 syn keyword ngxDirective ignore_invalid_headers
 syn keyword ngxDirective image_filter
 syn keyword ngxDirective image_filter_buffer
+syn keyword ngxDirective image_filter_interlace
 syn keyword ngxDirective image_filter_jpeg_quality
+syn keyword ngxDirective image_filter_sharpen
 syn keyword ngxDirective image_filter_transparency
 syn keyword ngxDirective imap_auth
 syn keyword ngxDirective imap_capabilities
 syn keyword ngxDirective imap_client_buffer
 syn keyword ngxDirective index
+syn keyword ngxDirective iocp_threads
 syn keyword ngxDirective ip_hash
+syn keyword ngxDirective keepalive
+syn keyword ngxDirective keepalive_disable
 syn keyword ngxDirective keepalive_requests
 syn keyword ngxDirective keepalive_timeout
 syn keyword ngxDirective kqueue_changes
 syn keyword ngxDirective kqueue_events
 syn keyword ngxDirective large_client_header_buffers
+syn keyword ngxDirective least_conn
 syn keyword ngxDirective limit_conn
 syn keyword ngxDirective limit_conn_log_level
+syn keyword ngxDirective limit_conn_status
+syn keyword ngxDirective limit_conn_zone
 syn keyword ngxDirective limit_rate
 syn keyword ngxDirective limit_rate_after
 syn keyword ngxDirective limit_req
 syn keyword ngxDirective limit_req_log_level
+syn keyword ngxDirective limit_req_status
 syn keyword ngxDirective limit_req_zone
-syn keyword ngxDirective limit_zone
+syn keyword ngxDirective lingering_close
 syn keyword ngxDirective lingering_time
 syn keyword ngxDirective lingering_timeout
 syn keyword ngxDirective lock_file
@@ -192,21 +226,27 @@ syn keyword ngxDirective log_subrequest
 syn keyword ngxDirective map_hash_bucket_size
 syn keyword ngxDirective map_hash_max_size
 syn keyword ngxDirective master_process
+syn keyword ngxDirective max_ranges
 syn keyword ngxDirective memcached_bind
 syn keyword ngxDirective memcached_buffer_size
 syn keyword ngxDirective memcached_connect_timeout
+syn keyword ngxDirective memcached_gzip_flag
 syn keyword ngxDirective memcached_next_upstream
+syn keyword ngxDirective memcached_next_upstream_timeout
+syn keyword ngxDirective memcached_next_upstream_tries
 syn keyword ngxDirective memcached_read_timeout
 syn keyword ngxDirective memcached_send_timeout
-syn keyword ngxDirective memcached_upstream_fail_timeout
-syn keyword ngxDirective memcached_upstream_max_fails
 syn keyword ngxDirective merge_slashes
 syn keyword ngxDirective min_delete_depth
 syn keyword ngxDirective modern_browser
 syn keyword ngxDirective modern_browser_value
+syn keyword ngxDirective mp4
+syn keyword ngxDirective mp4_buffer_size
+syn keyword ngxDirective mp4_max_buffer_size
 syn keyword ngxDirective msie_padding
 syn keyword ngxDirective msie_refresh
 syn keyword ngxDirective multi_accept
+syn keyword ngxDirective mysql_test
 syn keyword ngxDirective open_file_cache
 syn keyword ngxDirective open_file_cache_errors
 syn keyword ngxDirective open_file_cache_events
@@ -215,6 +255,7 @@ syn keyword ngxDirective open_file_cache_valid
 syn keyword ngxDirective open_log_file_cache
 syn keyword ngxDirective output_buffers
 syn keyword ngxDirective override_charset
+syn keyword ngxDirective pcre_jit
 syn keyword ngxDirective perl
 syn keyword ngxDirective perl_modules
 syn keyword ngxDirective perl_require
@@ -223,6 +264,7 @@ syn keyword ngxDirective pid
 syn keyword ngxDirective pop3_auth
 syn keyword ngxDirective pop3_capabilities
 syn keyword ngxDirective port_in_redirect
+syn keyword ngxDirective post_acceptex
 syn keyword ngxDirective postpone_gzipping
 syn keyword ngxDirective postpone_output
 syn keyword ngxDirective protocol
@@ -234,22 +276,33 @@ syn keyword ngxDirective proxy_buffering
 syn keyword ngxDirective proxy_buffers
 syn keyword ngxDirective proxy_busy_buffers_size
 syn keyword ngxDirective proxy_cache
+syn keyword ngxDirective proxy_cache_bypass
 syn keyword ngxDirective proxy_cache_key
+syn keyword ngxDirective proxy_cache_lock
+syn keyword ngxDirective proxy_cache_lock_timeout
 syn keyword ngxDirective proxy_cache_methods
 syn keyword ngxDirective proxy_cache_min_uses
 syn keyword ngxDirective proxy_cache_path
+syn keyword ngxDirective proxy_cache_revalidate
 syn keyword ngxDirective proxy_cache_use_stale
 syn keyword ngxDirective proxy_cache_valid
 syn keyword ngxDirective proxy_connect_timeout
+syn keyword ngxDirective proxy_cookie_domain
+syn keyword ngxDirective proxy_cookie_path
+syn keyword ngxDirective proxy_force_ranges
 syn keyword ngxDirective proxy_headers_hash_bucket_size
 syn keyword ngxDirective proxy_headers_hash_max_size
 syn keyword ngxDirective proxy_hide_header
+syn keyword ngxDirective proxy_http_version
 syn keyword ngxDirective proxy_ignore_client_abort
 syn keyword ngxDirective proxy_ignore_headers
 syn keyword ngxDirective proxy_intercept_errors
 syn keyword ngxDirective proxy_max_temp_file_size
 syn keyword ngxDirective proxy_method
 syn keyword ngxDirective proxy_next_upstream
+syn keyword ngxDirective proxy_next_upstream_timeout
+syn keyword ngxDirective proxy_next_upstream_tries
+syn keyword ngxDirective proxy_no_cache
 syn keyword ngxDirective proxy_pass_error_message
 syn keyword ngxDirective proxy_pass_header
 syn keyword ngxDirective proxy_pass_request_body
@@ -260,18 +313,27 @@ syn keyword ngxDirective proxy_send_lowat
 syn keyword ngxDirective proxy_send_timeout
 syn keyword ngxDirective proxy_set_body
 syn keyword ngxDirective proxy_set_header
+syn keyword ngxDirective proxy_ssl_ciphers
+syn keyword ngxDirective proxy_ssl_crl
+syn keyword ngxDirective proxy_ssl_name
+syn keyword ngxDirective proxy_ssl_protocols
+syn keyword ngxDirective proxy_ssl_server_name
 syn keyword ngxDirective proxy_ssl_session_reuse
+syn keyword ngxDirective proxy_ssl_trusted_certificate
+syn keyword ngxDirective proxy_ssl_verify
+syn keyword ngxDirective proxy_ssl_verify_depth
 syn keyword ngxDirective proxy_store
 syn keyword ngxDirective proxy_store_access
 syn keyword ngxDirective proxy_temp_file_write_size
 syn keyword ngxDirective proxy_temp_path
 syn keyword ngxDirective proxy_timeout
-syn keyword ngxDirective proxy_upstream_fail_timeout
-syn keyword ngxDirective proxy_upstream_max_fails
 syn keyword ngxDirective random_index
 syn keyword ngxDirective read_ahead
 syn keyword ngxDirective real_ip_header
+syn keyword ngxDirective real_ip_recursive
 syn keyword ngxDirective recursive_error_pages
+syn keyword ngxDirective referer_hash_bucket_size
+syn keyword ngxDirective referer_hash_max_size
 syn keyword ngxDirective request_pool_size
 syn keyword ngxDirective reset_timedout_connection
 syn keyword ngxDirective resolver
@@ -282,6 +344,45 @@ syn keyword ngxDirective rtsig_overflow_test
 syn keyword ngxDirective rtsig_overflow_threshold
 syn keyword ngxDirective rtsig_signo
 syn keyword ngxDirective satisfy
+syn keyword ngxDirective scgi_bind
+syn keyword ngxDirective scgi_buffer_size
+syn keyword ngxDirective scgi_buffering
+syn keyword ngxDirective scgi_buffers
+syn keyword ngxDirective scgi_busy_buffers_size
+syn keyword ngxDirective scgi_cache
+syn keyword ngxDirective scgi_cache_bypass
+syn keyword ngxDirective scgi_cache_key
+syn keyword ngxDirective scgi_cache_lock
+syn keyword ngxDirective scgi_cache_lock_timeout
+syn keyword ngxDirective scgi_cache_methods
+syn keyword ngxDirective scgi_cache_min_uses
+syn keyword ngxDirective scgi_cache_path
+syn keyword ngxDirective scgi_cache_revalidate
+syn keyword ngxDirective scgi_cache_use_stale
+syn keyword ngxDirective scgi_cache_valid
+syn keyword ngxDirective scgi_connect_timeout
+syn keyword ngxDirective scgi_force_ranges
+syn keyword ngxDirective scgi_hide_header
+syn keyword ngxDirective scgi_ignore_client_abort
+syn keyword ngxDirective scgi_ignore_headers
+syn keyword ngxDirective scgi_intercept_errors
+syn keyword ngxDirective scgi_max_temp_file_size
+syn keyword ngxDirective scgi_next_upstream
+syn keyword ngxDirective scgi_next_upstream_timeout
+syn keyword ngxDirective scgi_next_upstream_tries
+syn keyword ngxDirective scgi_no_cache
+syn keyword ngxDirective scgi_param
+syn keyword ngxDirective scgi_pass_header
+syn keyword ngxDirective scgi_pass_request_body
+syn keyword ngxDirective scgi_pass_request_headers
+syn keyword ngxDirective scgi_read_timeout
+syn keyword ngxDirective scgi_send_timeout
+syn keyword ngxDirective scgi_store
+syn keyword ngxDirective scgi_store_access
+syn keyword ngxDirective scgi_temp_file_write_size
+syn keyword ngxDirective scgi_temp_path
+syn keyword ngxDirective secure_link
+syn keyword ngxDirective secure_link_md5
 syn keyword ngxDirective secure_link_secret
 syn keyword ngxDirective send_lowat
 syn keyword ngxDirective send_timeout
@@ -296,31 +397,50 @@ syn keyword ngxDirective smtp_auth
 syn keyword ngxDirective smtp_capabilities
 syn keyword ngxDirective smtp_client_buffer
 syn keyword ngxDirective smtp_greeting_delay
-syn keyword ngxDirective so_keepalive
 syn keyword ngxDirective source_charset
+syn keyword ngxDirective spdy_chunk_size
+syn keyword ngxDirective spdy_headers_comp
+syn keyword ngxDirective spdy_keepalive_timeout
+syn keyword ngxDirective spdy_max_concurrent_streams
+syn keyword ngxDirective spdy_pool_size
+syn keyword ngxDirective spdy_recv_buffer_size
+syn keyword ngxDirective spdy_recv_timeout
+syn keyword ngxDirective spdy_streams_index_size
 syn keyword ngxDirective ssi
 syn keyword ngxDirective ssi_ignore_recycled_buffers
+syn keyword ngxDirective ssi_last_modified
 syn keyword ngxDirective ssi_min_file_chunk
 syn keyword ngxDirective ssi_silent_errors
 syn keyword ngxDirective ssi_types
 syn keyword ngxDirective ssi_value_length
 syn keyword ngxDirective ssl
+syn keyword ngxDirective ssl_buffer_size
 syn keyword ngxDirective ssl_certificate
 syn keyword ngxDirective ssl_certificate_key
 syn keyword ngxDirective ssl_ciphers
 syn keyword ngxDirective ssl_client_certificate
 syn keyword ngxDirective ssl_crl
 syn keyword ngxDirective ssl_dhparam
+syn keyword ngxDirective ssl_ecdh_curve
 syn keyword ngxDirective ssl_engine
+syn keyword ngxDirective ssl_password_file
 syn keyword ngxDirective ssl_prefer_server_ciphers
 syn keyword ngxDirective ssl_protocols
 syn keyword ngxDirective ssl_session_cache
+syn keyword ngxDirective ssl_session_ticket_key
+syn keyword ngxDirective ssl_session_tickets
 syn keyword ngxDirective ssl_session_timeout
+syn keyword ngxDirective ssl_stapling
+syn keyword ngxDirective ssl_stapling_file
+syn keyword ngxDirective ssl_stapling_responder
+syn keyword ngxDirective ssl_stapling_verify
+syn keyword ngxDirective ssl_trusted_certificate
 syn keyword ngxDirective ssl_verify_client
 syn keyword ngxDirective ssl_verify_depth
 syn keyword ngxDirective starttls
 syn keyword ngxDirective stub_status
 syn keyword ngxDirective sub_filter
+syn keyword ngxDirective sub_filter_last_modified
 syn keyword ngxDirective sub_filter_once
 syn keyword ngxDirective sub_filter_types
 syn keyword ngxDirective tcp_nodelay
@@ -342,9 +462,59 @@ syn keyword ngxDirective userid_name
 syn keyword ngxDirective userid_p3p
 syn keyword ngxDirective userid_path
 syn keyword ngxDirective userid_service
+syn keyword ngxDirective uwsgi_bind
+syn keyword ngxDirective uwsgi_buffer_size
+syn keyword ngxDirective uwsgi_buffering
+syn keyword ngxDirective uwsgi_buffers
+syn keyword ngxDirective uwsgi_busy_buffers_size
+syn keyword ngxDirective uwsgi_cache
+syn keyword ngxDirective uwsgi_cache_bypass
+syn keyword ngxDirective uwsgi_cache_key
+syn keyword ngxDirective uwsgi_cache_lock
+syn keyword ngxDirective uwsgi_cache_lock_timeout
+syn keyword ngxDirective uwsgi_cache_methods
+syn keyword ngxDirective uwsgi_cache_min_uses
+syn keyword ngxDirective uwsgi_cache_path
+syn keyword ngxDirective uwsgi_cache_revalidate
+syn keyword ngxDirective uwsgi_cache_use_stale
+syn keyword ngxDirective uwsgi_cache_valid
+syn keyword ngxDirective uwsgi_connect_timeout
+syn keyword ngxDirective uwsgi_force_ranges
+syn keyword ngxDirective uwsgi_hide_header
+syn keyword ngxDirective uwsgi_ignore_client_abort
+syn keyword ngxDirective uwsgi_ignore_headers
+syn keyword ngxDirective uwsgi_intercept_errors
+syn keyword ngxDirective uwsgi_max_temp_file_size
+syn keyword ngxDirective uwsgi_modifier1
+syn keyword ngxDirective uwsgi_modifier2
+syn keyword ngxDirective uwsgi_next_upstream
+syn keyword ngxDirective uwsgi_next_upstream_timeout
+syn keyword ngxDirective uwsgi_next_upstream_tries
+syn keyword ngxDirective uwsgi_no_cache
+syn keyword ngxDirective uwsgi_param
+syn keyword ngxDirective uwsgi_pass_header
+syn keyword ngxDirective uwsgi_pass_request_body
+syn keyword ngxDirective uwsgi_pass_request_headers
+syn keyword ngxDirective uwsgi_read_timeout
+syn keyword ngxDirective uwsgi_send_timeout
+syn keyword ngxDirective uwsgi_ssl_ciphers
+syn keyword ngxDirective uwsgi_ssl_crl
+syn keyword ngxDirective uwsgi_ssl_name
+syn keyword ngxDirective uwsgi_ssl_protocols
+syn keyword ngxDirective uwsgi_ssl_server_name
+syn keyword ngxDirective uwsgi_ssl_session_reuse
+syn keyword ngxDirective uwsgi_ssl_trusted_certificate
+syn keyword ngxDirective uwsgi_ssl_verify
+syn keyword ngxDirective uwsgi_ssl_verify_depth
+syn keyword ngxDirective uwsgi_store
+syn keyword ngxDirective uwsgi_store_access
+syn keyword ngxDirective uwsgi_string
+syn keyword ngxDirective uwsgi_temp_file_write_size
+syn keyword ngxDirective uwsgi_temp_path
 syn keyword ngxDirective valid_referers
 syn keyword ngxDirective variables_hash_bucket_size
 syn keyword ngxDirective variables_hash_max_size
+syn keyword ngxDirective worker_aio_requests
 syn keyword ngxDirective worker_connections
 syn keyword ngxDirective worker_cpu_affinity
 syn keyword ngxDirective worker_priority
@@ -356,6 +526,9 @@ syn keyword ngxDirective worker_threads
 syn keyword ngxDirective working_directory
 syn keyword ngxDirective xclient
 syn keyword ngxDirective xml_entities
+syn keyword ngxDirective xslt_last_modified
+syn keyword ngxDirective xslt_param
+syn keyword ngxDirective xslt_string_param
 syn keyword ngxDirective xslt_stylesheet
 syn keyword ngxDirective xslt_types
 
@@ -367,7 +540,7 @@ syn keyword ngxDirective xslt_types
 syn keyword ngxDirectiveThirdParty set_from_accept_language
 
 " Access Key Module <http://wiki.nginx.org/NginxHttpAccessKeyModule>
-" Denies access unless the request URL contains an access key. 
+" Denies access unless the request URL contains an access key.
 syn keyword ngxDirectiveThirdParty accesskey
 syn keyword ngxDirectiveThirdParty accesskey_arg
 syn keyword ngxDirectiveThirdParty accesskey_hashmethod
@@ -521,7 +694,7 @@ syn keyword ngxDirectiveThirdParty mogilefs_send_timeout
 syn keyword ngxDirectiveThirdParty mogilefs_tracker
 
 " MP4 Streaming Lite Module <http://wiki.nginx.org/NginxMP4StreamingLite>
-" Will seek to a certain time within H.264/MP4 files when provided with a 'start' parameter in the URL. 
+" Will seek to a certain time within H.264/MP4 files when provided with a 'start' parameter in the URL.
 syn keyword ngxDirectiveThirdParty mp4
 
 " Nginx Notice Module <http://xph.us/software/nginx-notice/>
@@ -642,46 +815,6 @@ syn keyword ngxDirectiveThirdParty xss_get
 syn keyword ngxDirectiveThirdParty xss_input_types
 syn keyword ngxDirectiveThirdParty xss_output_type
 
-" uWSGI Module <http://wiki.nginx.org/HttpUwsgiModule>
-" Allows Nginx to interact with uWSGI processes and control what parameters are passed to the process.
-syn keyword ngxDirectiveThirdParty uwsgi_bind
-syn keyword ngxDirectiveThirdParty uwsgi_buffer_size
-syn keyword ngxDirectiveThirdParty uwsgi_buffering
-syn keyword ngxDirectiveThirdParty uwsgi_buffers
-syn keyword ngxDirectiveThirdParty uwsgi_busy_buffers_size
-syn keyword ngxDirectiveThirdParty uwsgi_cache
-syn keyword ngxDirectiveThirdParty uwsgi_cache_bypass
-syn keyword ngxDirectiveThirdParty uwsgi_cache_key
-syn keyword ngxDirectiveThirdParty uwsgi_cache_lock
-syn keyword ngxDirectiveThirdParty uwsgi_cache_lock_timeout
-syn keyword ngxDirectiveThirdParty uwsgi_cache_methods
-syn keyword ngxDirectiveThirdParty uwsgi_cache_min_uses
-syn keyword ngxDirectiveThirdParty uwsgi_cache_path
-syn keyword ngxDirectiveThirdParty uwsgi_cache_use_stale
-syn keyword ngxDirectiveThirdParty uwsgi_cache_valid
-syn keyword ngxDirectiveThirdParty uwsgi_connect_timeout
-syn keyword ngxDirectiveThirdParty uwsgi_hide_header
-syn keyword ngxDirectiveThirdParty uwsgi_ignore_client_abort
-syn keyword ngxDirectiveThirdParty uwsgi_ignore_headers
-syn keyword ngxDirectiveThirdParty uwsgi_intercept_errors
-syn keyword ngxDirectiveThirdParty uwsgi_max_temp_file_size
-syn keyword ngxDirectiveThirdParty uwsgi_modifier1
-syn keyword ngxDirectiveThirdParty uwsgi_modifier2
-syn keyword ngxDirectiveThirdParty uwsgi_next_upstream
-syn keyword ngxDirectiveThirdParty uwsgi_no_cache
-syn keyword ngxDirectiveThirdParty uwsgi_param
-syn keyword ngxDirectiveThirdParty uwsgi_pass
-syn keyword ngxDirectiveThirdParty uwsgi_pass_header
-syn keyword ngxDirectiveThirdParty uwsgi_pass_request_body
-syn keyword ngxDirectiveThirdParty uwsgi_pass_request_headers
-syn keyword ngxDirectiveThirdParty uwsgi_read_timeout
-syn keyword ngxDirectiveThirdParty uwsgi_send_timeout
-syn keyword ngxDirectiveThirdParty uwsgi_store
-syn keyword ngxDirectiveThirdParty uwsgi_store_access
-syn keyword ngxDirectiveThirdParty uwsgi_string
-syn keyword ngxDirectiveThirdParty uwsgi_temp_file_write_size
-syn keyword ngxDirectiveThirdParty uwsgi_temp_path
-
 " highlight
 
 hi link ngxComment Comment

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/docs/xml/nginx/changes.xml (+284 -14) 98%
===================================================================
--- vendor/nginx-1.7.7/docs/xml/nginx/changes.xml    2015-02-09 04:43:41 +0900 (afabe9a)
+++ vendor/nginx-1.7.9/docs/xml/nginx/changes.xml    2015-02-09 04:48:38 +0900 (e7e846c)
@@ -5,6 +5,276 @@
 <change_log title="nginx">
 
 
+<changes ver="1.7.9" date="23.12.2014">
+
+<change type="feature">
+<para lang="ru">
+директивы proxy_cache, fastcgi_cache, scgi_cache и uwsgi_cache
+поддерживают переменные.
+</para>
+<para lang="en">
+variables support in the "proxy_cache", "fastcgi_cache", "scgi_cache",
+and "uwsgi_cache" directives.
+</para>
+</change>
+
+<change type="feature">
+<para lang="ru">
+директива expires поддерживает переменные.
+</para>
+<para lang="en">
+variables support in the "expires" directive.
+</para>
+</change>
+
+<change type="feature">
+<para lang="ru">
+возможность загрузки секретных ключей с аппаратных устройств
+с помощью OpenSSL engines.<br/>
+Спасибо Дмитрию Пичулину.
+</para>
+<para lang="en">
+loading of secret keys from hardware tokens
+with OpenSSL engines.<br/>
+Thanks to Dmitrii Pichulin.
+</para>
+</change>
+
+<change type="feature">
+<para lang="ru">
+директива autoindex_format.
+</para>
+<para lang="en">
+the "autoindex_format" directive.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+ревалидация элементов кэша теперь используется только для ответов
+с кодами 200 и 206.<br/>
+Спасибо Piotr Sikora.
+</para>
+<para lang="en">
+cache revalidation is now only used for responses
+with 200 and 206 status codes.<br/>
+Thanks to Piotr Sikora.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+строка "TE" заголовка запроса клиента передавалась на бэкенд при проксировании.
+</para>
+<para lang="en">
+the "TE" client request header line was passed to backends while proxying.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+директивы proxy_pass, fastcgi_pass, scgi_pass и uwsgi_pass
+могли неправильно работать внутри блоков if и limit_except.
+</para>
+<para lang="en">
+the "proxy_pass", "fastcgi_pass", "scgi_pass", and "uwsgi_pass" directives
+might not work correctly inside the "if" and "limit_except" blocks.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+директива proxy_store с параметром "on" игнорировалась, 
+если на предыдущем уровне использовалась директива proxy_store
+с явно заданным путём к файлам.
+</para>
+<para lang="en">
+the "proxy_store" directive with the "on" parameter was ignored
+if the "proxy_store" directive with an explicitly specified file path
+was used on a previous level.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+nginx не собирался с BoringSSL.<br/>
+Спасибо Lukas Tribus.
+</para>
+<para lang="en">
+nginx could not be built with BoringSSL.<br/>
+Thanks to Lukas Tribus.
+</para>
+</change>
+
+</changes>
+
+
+<changes ver="1.7.8" date="02.12.2014">
+
+<change type="change">
+<para lang="ru">
+теперь строки "If-Modified-Since", "If-Range" и им подобные
+в заголовке запроса клиента передаются бэкенду при включённом кэшировании,
+если nginx заранее знает, что не будет кэшировать ответ
+(например, при использовании proxy_cache_min_uses).
+</para>
+<para lang="en">
+now the "If-Modified-Since", "If-Range", etc.
+client request header lines are passed to a backend while caching
+if nginx knows in advance that the response will not be cached
+(e.g., when using proxy_cache_min_uses).
+</para>
+</change>
+
+<change type="change">
+<para lang="ru">
+теперь после истечения proxy_cache_lock_timeout
+nginx отправляет запрос на бэкенд без кэширования;
+новые директивы proxy_cache_lock_age, fastcgi_cache_lock_age,
+scgi_cache_lock_age и uwsgi_cache_lock_age позволяют указать,
+через какое время блокировка будет принудительно снята
+и будет сделана ещё одна попытка закэшировать ответ.
+</para>
+<para lang="en">
+now after proxy_cache_lock_timeout
+nginx sends a request to a backend with caching disabled;
+the new directives "proxy_cache_lock_age", "fastcgi_cache_lock_age",
+"scgi_cache_lock_age", and "uwsgi_cache_lock_age" specify a time
+after which the lock will be released
+and another attempt to cache a response will be made.
+</para>
+</change>
+
+<change type="change">
+<para lang="ru">
+директива log_format теперь может использоваться только на уровне http.
+</para>
+<para lang="en">
+the "log_format" directive can now be used only at http level.
+</para>
+</change>
+
+<change type="feature">
+<para lang="ru">
+директивы proxy_ssl_certificate, proxy_ssl_certificate_key,
+proxy_ssl_password_file, uwsgi_ssl_certificate,
+uwsgi_ssl_certificate_key и uwsgi_ssl_password_file.<br/>
+Спасибо Piotr Sikora.
+</para>
+<para lang="en">
+the "proxy_ssl_certificate", "proxy_ssl_certificate_key",
+"proxy_ssl_password_file", "uwsgi_ssl_certificate",
+"uwsgi_ssl_certificate_key", and "uwsgi_ssl_password_file" directives.<br/>
+Thanks to Piotr Sikora.
+</para>
+</change>
+
+<change type="feature">
+<para lang="ru">
+теперь с помощью X-Accel-Redirect
+можно перейти в именованный location.<br/>
+Спасибо Toshikuni Fukaya.
+</para>
+<para lang="en">
+it is now possible to switch to a named location
+using "X-Accel-Redirect".<br/>
+Thanks to Toshikuni Fukaya.
+</para>
+</change>
+
+<change type="feature">
+<para lang="ru">
+теперь директива tcp_nodelay работает для SPDY-соединений.
+</para>
+<para lang="en">
+now the "tcp_nodelay" directive works with SPDY connections.
+</para>
+</change>
+
+<change type="feature">
+<para lang="ru">
+новые директивы в скриптах подсветки синтаксиса для vim.<br/>
+Спасибо Peter Wu.
+</para>
+<para lang="en">
+new directives in vim syntax highliting scripts.<br/>
+Thanks to Peter Wu.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+nginx игнорировал значение "s-maxage"
+в строке "Cache-Control" в заголовке ответа бэкенда.<br/>
+Спасибо Piotr Sikora.
+</para>
+<para lang="en">
+nginx ignored the "s-maxage" value
+in the "Cache-Control" backend response header line.<br/>
+Thanks to Piotr Sikora.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+в модуле ngx_http_spdy_module.<br/>
+Спасибо Piotr Sikora.
+</para>
+<para lang="en">
+in the ngx_http_spdy_module.<br/>
+Thanks to Piotr Sikora.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+в директиве ssl_password_file
+при использовании OpenSSL 0.9.8zc, 1.0.0o, 1.0.1j.
+</para>
+<para lang="en">
+in the "ssl_password_file" directive
+when using OpenSSL 0.9.8zc, 1.0.0o, 1.0.1j.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+при использовании директивы post_action
+в лог писались сообщения "header already sent";
+ошибка появилась в nginx 1.5.4.
+</para>
+<para lang="en">
+alerts "header already sent" appeared in logs
+if the "post_action" directive was used;
+the bug had appeared in 1.5.4.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+при использовании директивы "postpone_output 0" с SSI-подзапросами
+в лог могли писаться сообщения "the http output chain is empty".
+</para>
+<para lang="en">
+alerts "the http output chain is empty" might appear in logs
+if the "postpone_output 0" directive was used with SSI includes.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+в директиве proxy_cache_lock при использовании SSI-подзапросов.<br/>
+Спасибо Yichun Zhang.
+</para>
+<para lang="en">
+in the "proxy_cache_lock" directive with SSI subrequests.<br/>
+Thanks to Yichun Zhang.
+</para>
+</change>
+
+</changes>
+
+
 <changes ver="1.7.7" date="28.10.2014">
 
 <change type="change">
@@ -46,7 +316,7 @@ the "proxy_limit_rate", "fastcgi_limit_rate",
 scgi_ignore_headers и uwsgi_ignore_headers.
 </para>
 <para lang="en">
-the "Vary" parameter of the "proxy_ignore_headers", "fastcgi_ignore_headers", 
+the "Vary" parameter of the "proxy_ignore_headers", "fastcgi_ignore_headers",
 "scgi_ignore_headers", and "uwsgi_ignore_headers" directives.
 </para>
 </change>
@@ -90,7 +360,7 @@ Thanks to Yichun Zhang and Daniil Bondarev.
 
 <change type="bugfix">
 <para lang="ru">
-в директивах 
+в директивах
 proxy_next_upstream_tries и proxy_next_upstream_timeout.<br/>
 Спасибо Feng Gu.
 </para>
@@ -847,7 +1117,7 @@ in the ngx_http_spdy_module.
 Sadosky, Buenos Aires, Argentina.
 </para>
 <para lang="en">
-a heap memory buffer overflow might occur in a worker process 
+a heap memory buffer overflow might occur in a worker process
 while handling a specially crafted request by ngx_http_spdy_module,
 potentially resulting in arbitrary code execution
 (CVE-2014-0133).<br/>
@@ -1145,7 +1415,7 @@ nginx incorrectly handled escaped "?" character in the "include" SSI command.
 
 <change type="bugfix">
 <para lang="ru">
-модуль ngx_http_dav_module не раскодировал целевой URI при 
+модуль ngx_http_dav_module не раскодировал целевой URI при
 обработке методов COPY и MOVE.
 </para>
 <para lang="en">
@@ -1840,7 +2110,7 @@ Thanks to Serguei Ivantsov.
 
 <change type="feature">
 <para lang="ru">
-директивы ssi_last_modified, sub_filter_last_modified и 
+директивы ssi_last_modified, sub_filter_last_modified и
 xslt_last_modified.<br/>
 Спасибо Алексею Колпакову.
 </para>
@@ -2128,7 +2398,7 @@ the mail proxy module now supports IPv6 backends.
 <change type="bugfix">
 <para lang="ru">
 при повторной отправке запроса на бэкенд
-тело запроса могло передаваться неправильно; 
+тело запроса могло передаваться неправильно;
 ошибка появилась в 1.3.9.<br/>
 Спасибо Piotr Sikora.
 </para>
@@ -2280,7 +2550,7 @@ Thanks to Apcera and CloudBees for sponsoring this work.
 Спасибо Louis Opter.
 </para>
 <para lang="en">
-the "auth_basic_user_file" directive supports "{SHA}" 
+the "auth_basic_user_file" directive supports "{SHA}"
 password encryption method.<br/>
 Thanks to Louis Opter.
 </para>
@@ -3486,7 +3756,7 @@ if they were used with IPv6 addresses.
 могли наследоваться некорректно.
 </para>
 <para lang="en">
-the "modern_browser" and "ancient_browser" directives 
+the "modern_browser" and "ancient_browser" directives
 might be inherited incorrectly.
 </para>
 </change>
@@ -4190,8 +4460,8 @@ Thanks to Yichun Zhang.
 
 <change type="bugfix">
 <para lang="ru">
-директива read_ahead могла не работать при использовании совместно с 
-try_files и open_file_cache. 
+директива read_ahead могла не работать при использовании совместно с
+try_files и open_file_cache.
 </para>
 <para lang="en">
 the "read_ahead" directive might not work combined with "try_files"
@@ -4414,7 +4684,7 @@ nginx could not be built on AIX.
 </para>
 <para lang="en">
 the ngx_http_limit_zone_module was renamed to the ngx_http_limit_conn_module.
-</para>          
+</para>
 </change>
 
 <change type="change">
@@ -4521,7 +4791,7 @@ Thanks to Kirill A. Korinskiy.
 ssl_certificate.
 </para>
 <para lang="en">
-a segmentation fault occurred on start or during reconfiguration 
+a segmentation fault occurred on start or during reconfiguration
 if the "ssl" directive was used at http level and there was
 no "ssl_certificate" defined.
 </para>
@@ -4631,7 +4901,7 @@ Thanks to Alexey Kuts.
 
 <change type="bugfix">
 <para lang="ru">
-директивы модуля ngx_http_rewrite_module, заданные на уровне server, 
+директивы модуля ngx_http_rewrite_module, заданные на уровне server,
 применялись повторно, если для запроса не находилось ни одного location'а.
 </para>
 <para lang="en">
@@ -11289,7 +11559,7 @@ the "proxy_ssl_session_reuse" directive.
 </para>
 <para lang="en">
 a "proxy_pass" directive without URI part might use original request
-after the "X-Accel-Redirect" redirection was used;
+after the "X-Accel-Redirect" redirection was used.
 </para>
 </change>
 

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/core/nginx.h (+2 -2) 85%
===================================================================
--- vendor/nginx-1.7.7/src/core/nginx.h    2015-02-09 04:43:41 +0900 (2d923fb)
+++ vendor/nginx-1.7.9/src/core/nginx.h    2015-02-09 04:48:38 +0900 (4c4b8e4)
@@ -9,8 +9,8 @@
 #define _NGINX_H_INCLUDED_
 
 
-#define nginx_version      1007007
-#define NGINX_VERSION      "1.7.7"
+#define nginx_version      1007009
+#define NGINX_VERSION      "1.7.9"
 #define NGINX_VER          "nginx/" NGINX_VERSION
 
 #ifdef NGX_BUILD

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

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

  Renamed: vendor/nginx-1.7.9/src/core/ngx_buf.c (+43 -1) 82%
===================================================================
--- vendor/nginx-1.7.7/src/core/ngx_buf.c    2015-02-09 04:43:41 +0900 (94a3d3f)
+++ vendor/nginx-1.7.9/src/core/ngx_buf.c    2015-02-09 04:48:38 +0900 (00b6644)
@@ -220,8 +220,50 @@ ngx_chain_update_chains(ngx_pool_t *p, ngx_chain_t **free, ngx_chain_t **busy,
 }
 
 
+off_t
+ngx_chain_coalesce_file(ngx_chain_t **in, off_t limit)
+{
+    off_t         total, size, aligned, fprev;
+    ngx_fd_t      fd;
+    ngx_chain_t  *cl;
+
+    total = 0;
+
+    cl = *in;
+    fd = cl->buf->file->fd;
+
+    do {
+        size = cl->buf->file_last - cl->buf->file_pos;
+
+        if (size > limit - total) {
+            size = limit - total;
+
+            aligned = (cl->buf->file_pos + size + ngx_pagesize - 1)
+                       & ~((off_t) ngx_pagesize - 1);
+
+            if (aligned <= cl->buf->file_last) {
+                size = aligned - cl->buf->file_pos;
+            }
+        }
+
+        total += size;
+        fprev = cl->buf->file_pos + size;
+        cl = cl->next;
+
+    } while (cl
+             && cl->buf->in_file
+             && total < limit
+             && fd == cl->buf->file->fd
+             && fprev == cl->buf->file_pos);
+
+    *in = cl;
+
+    return total;
+}
+
+
 ngx_chain_t *
-ngx_handle_sent_chain(ngx_chain_t *in, off_t sent)
+ngx_chain_update_sent(ngx_chain_t *in, off_t sent)
 {
     off_t  size;
 

  Renamed: vendor/nginx-1.7.9/src/core/ngx_buf.h (+3 -1) 97%
===================================================================
--- vendor/nginx-1.7.7/src/core/ngx_buf.h    2015-02-09 04:43:41 +0900 (cc28a3e)
+++ vendor/nginx-1.7.9/src/core/ngx_buf.h    2015-02-09 04:48:38 +0900 (13536a6)
@@ -158,6 +158,8 @@ ngx_chain_t *ngx_chain_get_free_buf(ngx_pool_t *p, ngx_chain_t **free);
 void ngx_chain_update_chains(ngx_pool_t *p, ngx_chain_t **free,
     ngx_chain_t **busy, ngx_chain_t **out, ngx_buf_tag_t tag);
 
-ngx_chain_t *ngx_handle_sent_chain(ngx_chain_t *in, off_t sent);
+off_t ngx_chain_coalesce_file(ngx_chain_t **in, off_t limit);
+
+ngx_chain_t *ngx_chain_update_sent(ngx_chain_t *in, off_t sent);
 
 #endif /* _NGX_BUF_H_INCLUDED_ */

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/core/ngx_crypt.c (+1 -1) 99%
===================================================================
--- vendor/nginx-1.7.7/src/core/ngx_crypt.c    2015-02-09 04:43:41 +0900 (e2376c6)
+++ vendor/nginx-1.7.9/src/core/ngx_crypt.c    2015-02-09 04:48:38 +0900 (d7d068c)
@@ -66,7 +66,7 @@ ngx_crypt_apr1(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted)
     size_t             saltlen, keylen;
     ngx_md5_t          md5, ctx1;
 
-    /* Apache's apr1 crypt is Paul-Henning Kamp's md5 crypt with $apr1$ magic */
+    /* Apache's apr1 crypt is Poul-Henning Kamp's md5 crypt with $apr1$ magic */
 
     keylen = ngx_strlen(key);
 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/core/ngx_rbtree.c (+2 -4) 98%
===================================================================
--- vendor/nginx-1.7.7/src/core/ngx_rbtree.c    2015-02-09 04:43:41 +0900 (914ca7e)
+++ vendor/nginx-1.7.9/src/core/ngx_rbtree.c    2015-02-09 04:48:38 +0900 (6c66f40)
@@ -22,8 +22,7 @@ static ngx_inline void ngx_rbtree_right_rotate(ngx_rbtree_node_t **root,
 
 
 void
-ngx_rbtree_insert(ngx_thread_volatile ngx_rbtree_t *tree,
-    ngx_rbtree_node_t *node)
+ngx_rbtree_insert(ngx_rbtree_t *tree, ngx_rbtree_node_t *node)
 {
     ngx_rbtree_node_t  **root, *temp, *sentinel;
 
@@ -155,8 +154,7 @@ ngx_rbtree_insert_timer_value(ngx_rbtree_node_t *temp, ngx_rbtree_node_t *node,
 
 
 void
-ngx_rbtree_delete(ngx_thread_volatile ngx_rbtree_t *tree,
-    ngx_rbtree_node_t *node)
+ngx_rbtree_delete(ngx_rbtree_t *tree, ngx_rbtree_node_t *node)
 {
     ngx_uint_t           red;
     ngx_rbtree_node_t  **root, *sentinel, *subst, *temp, *w;

  Renamed: vendor/nginx-1.7.9/src/core/ngx_rbtree.h (+2 -4) 91%
===================================================================
--- vendor/nginx-1.7.7/src/core/ngx_rbtree.h    2015-02-09 04:43:41 +0900 (6e47a5b)
+++ vendor/nginx-1.7.9/src/core/ngx_rbtree.h    2015-02-09 04:48:38 +0900 (1d33e3f)
@@ -48,10 +48,8 @@ struct ngx_rbtree_s {
     (tree)->insert = i
 
 
-void ngx_rbtree_insert(ngx_thread_volatile ngx_rbtree_t *tree,
-    ngx_rbtree_node_t *node);
-void ngx_rbtree_delete(ngx_thread_volatile ngx_rbtree_t *tree,
-    ngx_rbtree_node_t *node);
+void ngx_rbtree_insert(ngx_rbtree_t *tree, ngx_rbtree_node_t *node);
+void ngx_rbtree_delete(ngx_rbtree_t *tree, ngx_rbtree_node_t *node);
 void ngx_rbtree_insert_value(ngx_rbtree_node_t *root, ngx_rbtree_node_t *node,
     ngx_rbtree_node_t *sentinel);
 void ngx_rbtree_insert_timer_value(ngx_rbtree_node_t *root,

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

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

  Renamed: vendor/nginx-1.7.9/src/core/ngx_resolver.c (+19 -14) 99%
===================================================================
--- vendor/nginx-1.7.7/src/core/ngx_resolver.c    2015-02-09 04:43:41 +0900 (a17793b)
+++ vendor/nginx-1.7.9/src/core/ngx_resolver.c    2015-02-09 04:48:38 +0900 (4e9c85d)
@@ -48,6 +48,11 @@ typedef struct {
 } ngx_resolver_an_t;
 
 
+#define ngx_resolver_node(n)                                                 \
+    (ngx_resolver_node_t *)                                                  \
+        ((u_char *) (n) - offsetof(ngx_resolver_node_t, node))
+
+
 ngx_int_t ngx_udp_connect(ngx_udp_connection_t *uc);
 
 
@@ -288,7 +293,7 @@ ngx_resolver_cleanup_tree(ngx_resolver_t *r, ngx_rbtree_t *tree)
 
     while (tree->root != tree->sentinel) {
 
-        rn = (ngx_resolver_node_t *) ngx_rbtree_min(tree->root, tree->sentinel);
+        rn = ngx_resolver_node(ngx_rbtree_min(tree->root, tree->sentinel));
 
         ngx_queue_remove(&rn->queue);
 
@@ -666,7 +671,7 @@ ngx_resolve_name_locked(ngx_resolver_t *r, ngx_resolver_ctx_t *ctx)
         ctx->event->handler = ngx_resolver_timeout_handler;
         ctx->event->data = rn;
         ctx->event->log = r->log;
-        ctx->ident = -1;
+        rn->ident = -1;
 
         ngx_add_timer(ctx->event, ctx->timeout);
     }
@@ -859,7 +864,7 @@ ngx_resolve_addr(ngx_resolver_ctx_t *ctx)
     ctx->event->handler = ngx_resolver_timeout_handler;
     ctx->event->data = rn;
     ctx->event->log = r->log;
-    ctx->ident = -1;
+    rn->ident = -1;
 
     ngx_add_timer(ctx->event, ctx->timeout);
 
@@ -1568,8 +1573,6 @@ ngx_resolver_process_a(ngx_resolver_t *r, u_char *buf, size_t last,
 
         ngx_rbtree_delete(&r->name_rbtree, &rn->node);
 
-        ngx_resolver_free_node(r, rn);
-
         /* unlock name mutex */
 
         while (next) {
@@ -1580,6 +1583,8 @@ ngx_resolver_process_a(ngx_resolver_t *r, u_char *buf, size_t last,
             ctx->handler(ctx);
         }
 
+        ngx_resolver_free_node(r, rn);
+
         return;
     }
 
@@ -2143,8 +2148,6 @@ valid:
 
         ngx_rbtree_delete(tree, &rn->node);
 
-        ngx_resolver_free_node(r, rn);
-
         /* unlock addr mutex */
 
         while (next) {
@@ -2155,6 +2158,8 @@ valid:
             ctx->handler(ctx);
         }
 
+        ngx_resolver_free_node(r, rn);
+
         return;
     }
 
@@ -2290,7 +2295,7 @@ ngx_resolver_lookup_name(ngx_resolver_t *r, ngx_str_t *name, uint32_t hash)
 
         /* hash == node->key */
 
-        rn = (ngx_resolver_node_t *) node;
+        rn = ngx_resolver_node(node);
 
         rc = ngx_memn2cmp(name->data, rn->name, name->len, rn->nlen);
 
@@ -2329,7 +2334,7 @@ ngx_resolver_lookup_addr(ngx_resolver_t *r, in_addr_t addr)
 
         /* addr == node->key */
 
-        return (ngx_resolver_node_t *) node;
+        return ngx_resolver_node(node);
     }
 
     /* not found */
@@ -2365,7 +2370,7 @@ ngx_resolver_lookup_addr6(ngx_resolver_t *r, struct in6_addr *addr,
 
         /* hash == node->key */
 
-        rn = (ngx_resolver_node_t *) node;
+        rn = ngx_resolver_node(node);
 
         rc = ngx_memcmp(addr, &rn->addr6, 16);
 
@@ -2403,8 +2408,8 @@ ngx_resolver_rbtree_insert_value(ngx_rbtree_node_t *temp,
 
         } else { /* node->key == temp->key */
 
-            rn = (ngx_resolver_node_t *) node;
-            rn_temp = (ngx_resolver_node_t *) temp;
+            rn = ngx_resolver_node(node);
+            rn_temp = ngx_resolver_node(temp);
 
             p = (ngx_memn2cmp(rn->name, rn_temp->name, rn->nlen, rn_temp->nlen)
                  < 0) ? &temp->left : &temp->right;
@@ -2446,8 +2451,8 @@ ngx_resolver_rbtree_insert_addr6_value(ngx_rbtree_node_t *temp,
 
         } else { /* node->key == temp->key */
 
-            rn = (ngx_resolver_node_t *) node;
-            rn_temp = (ngx_resolver_node_t *) temp;
+            rn = ngx_resolver_node(node);
+            rn_temp = ngx_resolver_node(temp);
 
             p = (ngx_memcmp(&rn->addr6, &rn_temp->addr6, 16)
                  < 0) ? &temp->left : &temp->right;

  Renamed: vendor/nginx-1.7.9/src/core/ngx_resolver.h (+8 -7) 96%
===================================================================
--- vendor/nginx-1.7.7/src/core/ngx_resolver.h    2015-02-09 04:43:41 +0900 (264c8c4)
+++ vendor/nginx-1.7.9/src/core/ngx_resolver.h    2015-02-09 04:48:38 +0900 (d3519fb)
@@ -51,12 +51,16 @@ typedef void (*ngx_resolver_handler_pt)(ngx_resolver_ctx_t *ctx);
 
 
 typedef struct {
-    ngx_rbtree_node_t         node;
-    ngx_queue_t               queue;
-
     /* PTR: resolved name, A: name to resolve */
     u_char                   *name;
 
+    ngx_queue_t               queue;
+
+    /* event ident must be after 3 pointers as in ngx_connection_t */
+    ngx_int_t                 ident;
+
+    ngx_rbtree_node_t         node;
+
 #if (NGX_HAVE_INET6)
     /* PTR: IPv6 address to resolve (IPv4 address is in rbtree node key) */
     struct in6_addr           addr6;
@@ -103,7 +107,7 @@ typedef struct {
     void                     *dummy;
     ngx_log_t                *log;
 
-    /* ident must be after 3 pointers */
+    /* event ident must be after 3 pointers as in ngx_connection_t */
     ngx_int_t                 ident;
 
     /* simple round robin DNS peers balancer */
@@ -143,9 +147,6 @@ struct ngx_resolver_ctx_s {
     ngx_resolver_t           *resolver;
     ngx_udp_connection_t     *udp_connection;
 
-    /* ident must be after 3 pointers */
-    ngx_int_t                 ident;
-
     ngx_int_t                 state;
     ngx_str_t                 name;
 

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/core/ngx_string.c (+52 -0) 97%
===================================================================
--- vendor/nginx-1.7.7/src/core/ngx_string.c    2015-02-09 04:43:41 +0900 (9d854fa)
+++ vendor/nginx-1.7.9/src/core/ngx_string.c    2015-02-09 04:48:38 +0900 (a41c38d)
@@ -1773,6 +1773,58 @@ ngx_escape_html(u_char *dst, u_char *src, size_t size)
 }
 
 
+uintptr_t
+ngx_escape_json(u_char *dst, u_char *src, size_t size)
+{
+    u_char      ch;
+    ngx_uint_t  len;
+
+    if (dst == NULL) {
+        len = 0;
+
+        while (size) {
+            ch = *src++;
+
+            if (ch == '\\' || ch == '"') {
+                len++;
+
+            } else if (ch <= 0x1f) {
+                len += sizeof("\\u001F") - 2;
+            }
+
+            size--;
+        }
+
+        return (uintptr_t) len;
+    }
+
+    while (size) {
+        ch = *src++;
+
+        if (ch > 0x1f) {
+
+            if (ch == '\\' || ch == '"') {
+                *dst++ = '\\';
+            }
+
+            *dst++ = ch;
+
+        } else {
+            *dst++ = '\\'; *dst++ = 'u'; *dst++ = '0'; *dst++ = '0';
+            *dst++ = '0' + (ch >> 4);
+
+            ch &= 0xf;
+
+            *dst++ = (ch < 10) ? ('0' + ch) : ('A' + ch - 10);
+        }
+
+        size--;
+    }
+
+    return (uintptr_t) dst;
+}
+
+
 void
 ngx_str_rbtree_insert_value(ngx_rbtree_node_t *temp,
     ngx_rbtree_node_t *node, ngx_rbtree_node_t *sentinel)

  Renamed: vendor/nginx-1.7.9/src/core/ngx_string.h (+1 -0) 98%
===================================================================
--- vendor/nginx-1.7.7/src/core/ngx_string.h    2015-02-09 04:43:41 +0900 (712e7d0)
+++ vendor/nginx-1.7.9/src/core/ngx_string.h    2015-02-09 04:48:38 +0900 (7363bd2)
@@ -207,6 +207,7 @@ uintptr_t ngx_escape_uri(u_char *dst, u_char *src, size_t size,
     ngx_uint_t type);
 void ngx_unescape_uri(u_char **dst, u_char **src, size_t size, ngx_uint_t type);
 uintptr_t ngx_escape_html(u_char *dst, u_char *src, size_t size);
+uintptr_t ngx_escape_json(u_char *dst, u_char *src, size_t size);
 
 
 typedef struct {

  Renamed: vendor/nginx-1.7.9/src/core/ngx_syslog.c (+3 -2) 97%
===================================================================
--- vendor/nginx-1.7.7/src/core/ngx_syslog.c    2015-02-09 04:43:41 +0900 (616fd71)
+++ vendor/nginx-1.7.9/src/core/ngx_syslog.c    2015-02-09 04:48:38 +0900 (d4e79f6)
@@ -182,10 +182,11 @@ ngx_syslog_parse_args(ngx_conf_t *cf, ngx_syslog_peer_t *peer)
             for (i = 4; i < len; i++) {
                 c = ngx_tolower(p[i]);
 
-                if (c < '0' || (c > '9' && c < 'a') || c > 'z') {
+                if (c < '0' || (c > '9' && c < 'a' && c != '_') || c > 'z') {
                     ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                                        "syslog \"tag\" only allows "
-                                       "alphanumeric characters");
+                                       "alphanumeric characters "
+                                       "and underscore");
                     return NGX_CONF_ERROR;
                 }
             }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/event/ngx_event.h (+2 -0) 99%
===================================================================
--- vendor/nginx-1.7.7/src/event/ngx_event.h    2015-02-09 04:43:41 +0900 (6531ec7)
+++ vendor/nginx-1.7.9/src/event/ngx_event.h    2015-02-09 04:48:38 +0900 (a1643a1)
@@ -136,6 +136,8 @@ struct ngx_event_s {
     unsigned         channel:1;
     unsigned         resolver:1;
 
+    unsigned         cancelable:1;
+
 
 #if 0
 

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/event/ngx_event_openssl.c (+71 -14) 97%
===================================================================
--- vendor/nginx-1.7.7/src/event/ngx_event_openssl.c    2015-02-09 04:43:41 +0900 (f345652)
+++ vendor/nginx-1.7.9/src/event/ngx_event_openssl.c    2015-02-09 04:48:38 +0900 (d5d4a1a)
@@ -376,6 +376,67 @@ ngx_ssl_certificate(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *cert,
 
     BIO_free(bio);
 
+    if (ngx_strncmp(key->data, "engine:", sizeof("engine:") - 1) == 0) {
+
+#ifndef OPENSSL_NO_ENGINE
+
+        u_char      *p, *last;
+        ENGINE      *engine;
+        EVP_PKEY    *pkey;
+
+        p = key->data + sizeof("engine:") - 1;
+        last = (u_char *) ngx_strchr(p, ':');
+
+        if (last == NULL) {
+            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+                               "invalid syntax in \"%V\"", key);
+            return NGX_ERROR;
+        }
+
+        *last = '\0';
+
+        engine = ENGINE_by_id((char *) p);
+
+        if (engine == NULL) {
+            ngx_ssl_error(NGX_LOG_EMERG, ssl->log, 0,
+                          "ENGINE_by_id(\"%s\") failed", p);
+            return NGX_ERROR;
+        }
+
+        *last++ = ':';
+
+        pkey = ENGINE_load_private_key(engine, (char *) last, 0, 0);
+
+        if (pkey == NULL) {
+            ngx_ssl_error(NGX_LOG_EMERG, ssl->log, 0,
+                          "ENGINE_load_private_key(\"%s\") failed", last);
+            ENGINE_free(engine);
+            return NGX_ERROR;
+        }
+
+        ENGINE_free(engine);
+
+        if (SSL_CTX_use_PrivateKey(ssl->ctx, pkey) == 0) {
+            ngx_ssl_error(NGX_LOG_EMERG, ssl->log, 0,
+                          "SSL_CTX_use_PrivateKey(\"%s\") failed", last);
+            EVP_PKEY_free(pkey);
+            return NGX_ERROR;
+        }
+
+        EVP_PKEY_free(pkey);
+
+        return NGX_OK;
+
+#else
+
+        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+                           "loading \"engine:...\" certificate keys "
+                           "is not supported");
+        return NGX_ERROR;
+
+#endif
+    }
+
     if (ngx_conf_full_name(cf->cycle, key, 1) != NGX_OK) {
         return NGX_ERROR;
     }
@@ -404,20 +465,9 @@ ngx_ssl_certificate(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *cert,
         }
 
         if (--tries) {
-            n = ERR_peek_error();
-
-#ifdef OPENSSL_IS_BORINGSSL
-            if (ERR_GET_LIB(n) == ERR_LIB_CIPHER
-                && ERR_GET_REASON(n) == CIPHER_R_BAD_DECRYPT)
-#else
-            if (ERR_GET_LIB(n) == ERR_LIB_EVP
-                && ERR_GET_REASON(n) == EVP_R_BAD_DECRYPT)
-#endif
-            {
-                ERR_clear_error();
-                SSL_CTX_set_default_passwd_cb_userdata(ssl->ctx, ++pwd);
-                continue;
-            }
+            ERR_clear_error();
+            SSL_CTX_set_default_passwd_cb_userdata(ssl->ctx, ++pwd);
+            continue;
         }
 
         ngx_ssl_error(NGX_LOG_EMERG, ssl->log, 0,
@@ -1096,11 +1146,15 @@ ngx_ssl_handshake(ngx_connection_t *c)
         c->recv_chain = ngx_ssl_recv_chain;
         c->send_chain = ngx_ssl_send_chain;
 
+#ifdef SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS
+
         /* initial handshake done, disable renegotiation (CVE-2009-3555) */
         if (c->ssl->connection->s3) {
             c->ssl->connection->s3->flags |= SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS;
         }
 
+#endif
+
         return NGX_OK;
     }
 
@@ -1869,6 +1923,9 @@ ngx_ssl_connection_error(ngx_connection_t *c, int sslerr, ngx_err_t err,
 #ifdef SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING
             || n == SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING           /*  345 */
 #endif
+#ifdef SSL_R_INAPPROPRIATE_FALLBACK
+            || n == SSL_R_INAPPROPRIATE_FALLBACK                     /*  373 */
+#endif
             || n == 1000 /* SSL_R_SSLV3_ALERT_CLOSE_NOTIFY */
             || n == SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE             /* 1010 */
             || n == SSL_R_SSLV3_ALERT_BAD_RECORD_MAC                 /* 1020 */

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

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

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

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

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

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

  Added: vendor/nginx-1.7.9/src/event/ngx_event_timer.c (+138 -0) 100644
===================================================================
--- /dev/null
+++ vendor/nginx-1.7.9/src/event/ngx_event_timer.c    2015-02-09 04:48:38 +0900 (8f547b2)
@@ -0,0 +1,138 @@
+
+/*
+ * Copyright (C) Igor Sysoev
+ * Copyright (C) Nginx, Inc.
+ */
+
+
+#include <ngx_config.h>
+#include <ngx_core.h>
+#include <ngx_event.h>
+
+
+ngx_rbtree_t              ngx_event_timer_rbtree;
+static ngx_rbtree_node_t  ngx_event_timer_sentinel;
+
+/*
+ * the event timer rbtree may contain the duplicate keys, however,
+ * it should not be a problem, because we use the rbtree to find
+ * a minimum timer value only
+ */
+
+ngx_int_t
+ngx_event_timer_init(ngx_log_t *log)
+{
+    ngx_rbtree_init(&ngx_event_timer_rbtree, &ngx_event_timer_sentinel,
+                    ngx_rbtree_insert_timer_value);
+
+    return NGX_OK;
+}
+
+
+ngx_msec_t
+ngx_event_find_timer(void)
+{
+    ngx_msec_int_t      timer;
+    ngx_rbtree_node_t  *node, *root, *sentinel;
+
+    if (ngx_event_timer_rbtree.root == &ngx_event_timer_sentinel) {
+        return NGX_TIMER_INFINITE;
+    }
+
+    root = ngx_event_timer_rbtree.root;
+    sentinel = ngx_event_timer_rbtree.sentinel;
+
+    node = ngx_rbtree_min(root, sentinel);
+
+    timer = (ngx_msec_int_t) (node->key - ngx_current_msec);
+
+    return (ngx_msec_t) (timer > 0 ? timer : 0);
+}
+
+
+void
+ngx_event_expire_timers(void)
+{
+    ngx_event_t        *ev;
+    ngx_rbtree_node_t  *node, *root, *sentinel;
+
+    sentinel = ngx_event_timer_rbtree.sentinel;
+
+    for ( ;; ) {
+        root = ngx_event_timer_rbtree.root;
+
+        if (root == sentinel) {
+            return;
+        }
+
+        node = ngx_rbtree_min(root, sentinel);
+
+        /* node->key > ngx_current_time */
+
+        if ((ngx_msec_int_t) (node->key - ngx_current_msec) > 0) {
+            return;
+        }
+
+        ev = (ngx_event_t *) ((char *) node - offsetof(ngx_event_t, timer));
+
+        ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ev->log, 0,
+                       "event timer del: %d: %M",
+                       ngx_event_ident(ev->data), ev->timer.key);
+
+        ngx_rbtree_delete(&ngx_event_timer_rbtree, &ev->timer);
+
+#if (NGX_DEBUG)
+        ev->timer.left = NULL;
+        ev->timer.right = NULL;
+        ev->timer.parent = NULL;
+#endif
+
+        ev->timer_set = 0;
+
+        ev->timedout = 1;
+
+        ev->handler(ev);
+    }
+}
+
+
+void
+ngx_event_cancel_timers(void)
+{
+    ngx_event_t        *ev;
+    ngx_rbtree_node_t  *node, *root, *sentinel;
+
+    sentinel = ngx_event_timer_rbtree.sentinel;
+
+    for ( ;; ) {
+        root = ngx_event_timer_rbtree.root;
+
+        if (root == sentinel) {
+            return;
+        }
+
+        node = ngx_rbtree_min(root, sentinel);
+
+        ev = (ngx_event_t *) ((char *) node - offsetof(ngx_event_t, timer));
+
+        if (!ev->cancelable) {
+            return;
+        }
+
+        ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ev->log, 0,
+                       "event timer cancel: %d: %M",
+                       ngx_event_ident(ev->data), ev->timer.key);
+
+        ngx_rbtree_delete(&ngx_event_timer_rbtree, &ev->timer);
+
+#if (NGX_DEBUG)
+        ev->timer.left = NULL;
+        ev->timer.right = NULL;
+        ev->timer.parent = NULL;
+#endif
+
+        ev->timer_set = 0;
+
+        ev->handler(ev);
+    }
+}

  Renamed: vendor/nginx-1.7.9/src/event/ngx_event_timer.h (+2 -14) 86%
===================================================================
--- vendor/nginx-1.7.7/src/event/ngx_event_timer.h    2015-02-09 04:43:41 +0900 (ec9b316)
+++ vendor/nginx-1.7.9/src/event/ngx_event_timer.h    2015-02-09 04:48:38 +0900 (99f8a48)
@@ -22,14 +22,10 @@
 ngx_int_t ngx_event_timer_init(ngx_log_t *log);
 ngx_msec_t ngx_event_find_timer(void);
 void ngx_event_expire_timers(void);
+void ngx_event_cancel_timers(void);
 
 
-#if (NGX_THREADS)
-extern ngx_mutex_t  *ngx_event_timer_mutex;
-#endif
-
-
-extern ngx_thread_volatile ngx_rbtree_t  ngx_event_timer_rbtree;
+extern ngx_rbtree_t  ngx_event_timer_rbtree;
 
 
 static ngx_inline void
@@ -39,12 +35,8 @@ ngx_event_del_timer(ngx_event_t *ev)
                    "event timer del: %d: %M",
                     ngx_event_ident(ev->data), ev->timer.key);
 
-    ngx_mutex_lock(ngx_event_timer_mutex);
-
     ngx_rbtree_delete(&ngx_event_timer_rbtree, &ev->timer);
 
-    ngx_mutex_unlock(ngx_event_timer_mutex);
-
 #if (NGX_DEBUG)
     ev->timer.left = NULL;
     ev->timer.right = NULL;
@@ -89,12 +81,8 @@ ngx_event_add_timer(ngx_event_t *ev, ngx_msec_t timer)
                    "event timer add: %d: %M:%M",
                     ngx_event_ident(ev->data), timer, ev->timer.key);
 
-    ngx_mutex_lock(ngx_event_timer_mutex);
-
     ngx_rbtree_insert(&ngx_event_timer_rbtree, &ev->timer);
 
-    ngx_mutex_unlock(ngx_event_timer_mutex);
-
     ev->timer_set = 1;
 }
 

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/http/modules/ngx_http_autoindex_module.c (+416 -71) 63%
===================================================================
--- vendor/nginx-1.7.7/src/http/modules/ngx_http_autoindex_module.c    2015-02-09 04:43:41 +0900 (f694df0)
+++ vendor/nginx-1.7.9/src/http/modules/ngx_http_autoindex_module.c    2015-02-09 04:48:38 +0900 (b3bf652)
@@ -30,6 +30,7 @@ typedef struct {
     size_t         escape_html;
 
     unsigned       dir:1;
+    unsigned       file:1;
 
     time_t         mtime;
     off_t          size;
@@ -38,26 +39,51 @@ typedef struct {
 
 typedef struct {
     ngx_flag_t     enable;
+    ngx_uint_t     format;
     ngx_flag_t     localtime;
     ngx_flag_t     exact_size;
 } ngx_http_autoindex_loc_conf_t;
 
 
+#define NGX_HTTP_AUTOINDEX_HTML         0
+#define NGX_HTTP_AUTOINDEX_JSON         1
+#define NGX_HTTP_AUTOINDEX_JSONP        2
+#define NGX_HTTP_AUTOINDEX_XML          3
+
 #define NGX_HTTP_AUTOINDEX_PREALLOCATE  50
 
 #define NGX_HTTP_AUTOINDEX_NAME_LEN     50
 
 
+static ngx_buf_t *ngx_http_autoindex_html(ngx_http_request_t *r,
+    ngx_array_t *entries);
+static ngx_buf_t *ngx_http_autoindex_json(ngx_http_request_t *r,
+    ngx_array_t *entries, ngx_str_t *callback);
+static ngx_int_t ngx_http_autoindex_jsonp_callback(ngx_http_request_t *r,
+    ngx_str_t *callback);
+static ngx_buf_t *ngx_http_autoindex_xml(ngx_http_request_t *r,
+    ngx_array_t *entries);
+
 static int ngx_libc_cdecl ngx_http_autoindex_cmp_entries(const void *one,
     const void *two);
 static ngx_int_t ngx_http_autoindex_error(ngx_http_request_t *r,
     ngx_dir_t *dir, ngx_str_t *name);
+
 static ngx_int_t ngx_http_autoindex_init(ngx_conf_t *cf);
 static void *ngx_http_autoindex_create_loc_conf(ngx_conf_t *cf);
 static char *ngx_http_autoindex_merge_loc_conf(ngx_conf_t *cf,
     void *parent, void *child);
 
 
+static ngx_conf_enum_t  ngx_http_autoindex_format[] = {
+    { ngx_string("html"), NGX_HTTP_AUTOINDEX_HTML },
+    { ngx_string("json"), NGX_HTTP_AUTOINDEX_JSON },
+    { ngx_string("jsonp"), NGX_HTTP_AUTOINDEX_JSONP },
+    { ngx_string("xml"), NGX_HTTP_AUTOINDEX_XML },
+    { ngx_null_string, 0 }
+};
+
+
 static ngx_command_t  ngx_http_autoindex_commands[] = {
 
     { ngx_string("autoindex"),
@@ -67,6 +93,13 @@ static ngx_command_t  ngx_http_autoindex_commands[] = {
       offsetof(ngx_http_autoindex_loc_conf_t, enable),
       NULL },
 
+    { ngx_string("autoindex_format"),
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+      ngx_conf_set_enum_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(ngx_http_autoindex_loc_conf_t, format),
+      &ngx_http_autoindex_format },
+
     { ngx_string("autoindex_localtime"),
       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
       ngx_conf_set_flag_slot,
@@ -116,47 +149,23 @@ ngx_module_t  ngx_http_autoindex_module = {
 };
 
 
-static u_char title[] =
-"<html>" CRLF
-"<head><title>Index of "
-;
-
-
-static u_char header[] =
-"</title></head>" CRLF
-"<body bgcolor=\"white\">" CRLF
-"<h1>Index of "
-;
-
-static u_char tail[] =
-"</body>" CRLF
-"</html>" CRLF
-;
-
-
 static ngx_int_t
 ngx_http_autoindex_handler(ngx_http_request_t *r)
 {
-    u_char                         *last, *filename, scale;
-    off_t                           length;
-    size_t                          len, char_len, escape_html, allocated, root;
-    ngx_tm_t                        tm;
+    u_char                         *last, *filename;
+    size_t                          len, allocated, root;
     ngx_err_t                       err;
     ngx_buf_t                      *b;
-    ngx_int_t                       rc, size;
-    ngx_str_t                       path;
+    ngx_int_t                       rc;
+    ngx_str_t                       path, callback;
     ngx_dir_t                       dir;
-    ngx_uint_t                      i, level, utf8;
+    ngx_uint_t                      level, format;
     ngx_pool_t                     *pool;
-    ngx_time_t                     *tp;
     ngx_chain_t                     out;
     ngx_array_t                     entries;
     ngx_http_autoindex_entry_t     *entry;
     ngx_http_autoindex_loc_conf_t  *alcf;
 
-    static char  *months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
-                               "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
-
     if (r->uri.data[r->uri.len - 1] != '/') {
         return NGX_DECLINED;
     }
@@ -189,6 +198,18 @@ ngx_http_autoindex_handler(ngx_http_request_t *r)
     ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
                    "http autoindex: \"%s\"", path.data);
 
+    format = alcf->format;
+
+    if (format == NGX_HTTP_AUTOINDEX_JSONP) {
+        if (ngx_http_autoindex_jsonp_callback(r, &callback) != NGX_OK) {
+            return NGX_HTTP_BAD_REQUEST;
+        }
+
+        if (callback.len == 0) {
+            format = NGX_HTTP_AUTOINDEX_JSON;
+        }
+    }
+
     if (ngx_open_dir(&path, &dir) == NGX_ERROR) {
         err = ngx_errno;
 
@@ -231,8 +252,28 @@ ngx_http_autoindex_handler(ngx_http_request_t *r)
     }
 
     r->headers_out.status = NGX_HTTP_OK;
-    r->headers_out.content_type_len = sizeof("text/html") - 1;
-    ngx_str_set(&r->headers_out.content_type, "text/html");
+
+    switch (format) {
+
+    case NGX_HTTP_AUTOINDEX_JSON:
+        ngx_str_set(&r->headers_out.content_type, "application/json");
+        break;
+
+    case NGX_HTTP_AUTOINDEX_JSONP:
+        ngx_str_set(&r->headers_out.content_type, "application/javascript");
+        break;
+
+    case NGX_HTTP_AUTOINDEX_XML:
+        ngx_str_set(&r->headers_out.content_type, "text/xml");
+        ngx_str_set(&r->headers_out.charset, "utf-8");
+        break;
+
+    default: /* NGX_HTTP_AUTOINDEX_HTML */
+        ngx_str_set(&r->headers_out.content_type, "text/html");
+        break;
+    }
+
+    r->headers_out.content_type_len = r->headers_out.content_type.len;
     r->headers_out.content_type_lowcase = NULL;
 
     rc = ngx_http_send_header(r);
@@ -249,16 +290,6 @@ ngx_http_autoindex_handler(ngx_http_request_t *r)
     filename = path.data;
     filename[path.len] = '/';
 
-    if (r->headers_out.charset.len == 5
-        && ngx_strncasecmp(r->headers_out.charset.data, (u_char *) "utf-8", 5)
-           == 0)
-    {
-        utf8 = 1;
-
-    } else {
-        utf8 = 0;
-    }
-
     for ( ;; ) {
         ngx_set_errno(0);
 
@@ -339,19 +370,8 @@ ngx_http_autoindex_handler(ngx_http_request_t *r)
 
         ngx_cpystrn(entry->name.data, ngx_de_name(&dir), len + 1);
 
-        entry->escape = 2 * ngx_escape_uri(NULL, ngx_de_name(&dir), len,
-                                           NGX_ESCAPE_URI_COMPONENT);
-
-        entry->escape_html = ngx_escape_html(NULL, entry->name.data,
-                                             entry->name.len);
-
-        if (utf8) {
-            entry->utf_len = ngx_utf8_length(entry->name.data, entry->name.len);
-        } else {
-            entry->utf_len = len;
-        }
-
         entry->dir = ngx_de_is_dir(&dir);
+        entry->file = ngx_de_is_file(&dir);
         entry->mtime = ngx_de_mtime(&dir);
         entry->size = ngx_de_size(&dir);
     }
@@ -361,6 +381,93 @@ ngx_http_autoindex_handler(ngx_http_request_t *r)
                       ngx_close_dir_n " \"%V\" failed", &path);
     }
 
+    if (entries.nelts > 1) {
+        ngx_qsort(entries.elts, (size_t) entries.nelts,
+                  sizeof(ngx_http_autoindex_entry_t),
+                  ngx_http_autoindex_cmp_entries);
+    }
+
+    switch (format) {
+
+    case NGX_HTTP_AUTOINDEX_JSON:
+        b = ngx_http_autoindex_json(r, &entries, NULL);
+        break;
+
+    case NGX_HTTP_AUTOINDEX_JSONP:
+        b = ngx_http_autoindex_json(r, &entries, &callback);
+        break;
+
+    case NGX_HTTP_AUTOINDEX_XML:
+        b = ngx_http_autoindex_xml(r, &entries);
+        break;
+
+    default: /* NGX_HTTP_AUTOINDEX_HTML */
+        b = ngx_http_autoindex_html(r, &entries);
+        break;
+    }
+
+    if (b == NULL) {
+        return NGX_ERROR;
+    }
+
+    /* TODO: free temporary pool */
+
+    if (r == r->main) {
+        b->last_buf = 1;
+    }
+
+    b->last_in_chain = 1;
+
+    out.buf = b;
+    out.next = NULL;
+
+    return ngx_http_output_filter(r, &out);
+}
+
+
+static ngx_buf_t *
+ngx_http_autoindex_html(ngx_http_request_t *r, ngx_array_t *entries)
+{
+    u_char                         *last, scale;
+    off_t                           length;
+    size_t                          len, char_len, escape_html;
+    ngx_tm_t                        tm;
+    ngx_buf_t                      *b;
+    ngx_int_t                       size;
+    ngx_uint_t                      i, utf8;
+    ngx_time_t                     *tp;
+    ngx_http_autoindex_entry_t     *entry;
+    ngx_http_autoindex_loc_conf_t  *alcf;
+
+    static u_char  title[] =
+        "<html>" CRLF
+        "<head><title>Index of "
+    ;
+
+    static u_char  header[] =
+        "</title></head>" CRLF
+        "<body bgcolor=\"white\">" CRLF
+        "<h1>Index of "
+    ;
+
+    static u_char  tail[] =
+        "</body>" CRLF
+        "</html>" CRLF
+    ;
+
+    static char  *months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+                               "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
+
+    if (r->headers_out.charset.len == 5
+        && ngx_strncasecmp(r->headers_out.charset.data, (u_char *) "utf-8", 5)
+           == 0)
+    {
+        utf8 = 1;
+
+    } else {
+        utf8 = 0;
+    }
+
     escape_html = ngx_escape_html(NULL, r->uri.data, r->uri.len);
 
     len = sizeof(title) - 1
@@ -372,8 +479,22 @@ ngx_http_autoindex_handler(ngx_http_request_t *r)
           + sizeof("</pre><hr>") - 1
           + sizeof(tail) - 1;
 
-    entry = entries.elts;
-    for (i = 0; i < entries.nelts; i++) {
+    entry = entries->elts;
+    for (i = 0; i < entries->nelts; i++) {
+        entry[i].escape = 2 * ngx_escape_uri(NULL, entry[i].name.data,
+                                             entry[i].name.len,
+                                             NGX_ESCAPE_URI_COMPONENT);
+
+        entry[i].escape_html = ngx_escape_html(NULL, entry[i].name.data,
+                                               entry[i].name.len);
+
+        if (utf8) {
+            entry[i].utf_len = ngx_utf8_length(entry[i].name.data,
+                                               entry[i].name.len);
+        } else {
+            entry[i].utf_len = entry[i].name.len;
+        }
+
         len += sizeof("<a href=\"") - 1
             + entry[i].name.len + entry[i].escape
             + 1                                          /* 1 is for "/" */
@@ -389,13 +510,7 @@ ngx_http_autoindex_handler(ngx_http_request_t *r)
 
     b = ngx_create_temp_buf(r->pool, len);
     if (b == NULL) {
-        return NGX_ERROR;
-    }
-
-    if (entries.nelts > 1) {
-        ngx_qsort(entry, (size_t) entries.nelts,
-                  sizeof(ngx_http_autoindex_entry_t),
-                  ngx_http_autoindex_cmp_entries);
+        return NULL;
     }
 
     b->last = ngx_cpymem(b->last, title, sizeof(title) - 1);
@@ -416,9 +531,10 @@ ngx_http_autoindex_handler(ngx_http_request_t *r)
     b->last = ngx_cpymem(b->last, "<hr><pre><a href=\"../\">../</a>" CRLF,
                          sizeof("<hr><pre><a href=\"../\">../</a>" CRLF) - 1);
 
+    alcf = ngx_http_get_module_loc_conf(r, ngx_http_autoindex_module);
     tp = ngx_timeofday();
 
-    for (i = 0; i < entries.nelts; i++) {
+    for (i = 0; i < entries->nelts; i++) {
         b->last = ngx_cpymem(b->last, "<a href=\"", sizeof("<a href=\"") - 1);
 
         if (entry[i].escape) {
@@ -565,22 +681,248 @@ ngx_http_autoindex_handler(ngx_http_request_t *r)
         *b->last++ = LF;
     }
 
-    /* TODO: free temporary pool */
-
     b->last = ngx_cpymem(b->last, "</pre><hr>", sizeof("</pre><hr>") - 1);
 
     b->last = ngx_cpymem(b->last, tail, sizeof(tail) - 1);
 
-    if (r == r->main) {
-        b->last_buf = 1;
+    return b;
+}
+
+
+static ngx_buf_t *
+ngx_http_autoindex_json(ngx_http_request_t *r, ngx_array_t *entries,
+    ngx_str_t *callback)
+{
+    size_t                       len;
+    ngx_buf_t                   *b;
+    ngx_uint_t                   i;
+    ngx_http_autoindex_entry_t  *entry;
+
+    len = sizeof("[" CRLF CRLF "]") - 1;
+
+    if (callback) {
+        len += sizeof("/* callback */" CRLF "();") - 1 + callback->len;
     }
 
-    b->last_in_chain = 1;
+    entry = entries->elts;
 
-    out.buf = b;
-    out.next = NULL;
+    for (i = 0; i < entries->nelts; i++) {
+        entry[i].escape = ngx_escape_json(NULL, entry[i].name.data,
+                                          entry[i].name.len);
 
-    return ngx_http_output_filter(r, &out);
+        len += sizeof("{  }," CRLF) - 1
+            + sizeof("\"name\":\"\"") - 1
+            + entry[i].name.len + entry[i].escape
+            + sizeof(", \"type\":\"directory\"") - 1
+            + sizeof(", \"mtime\":\"Wed, 31 Dec 1986 10:00:00 GMT\"") - 1;
+
+        if (entry[i].file) {
+            len += sizeof(", \"size\":") - 1 + NGX_OFF_T_LEN;
+        }
+    }
+
+    b = ngx_create_temp_buf(r->pool, len);
+    if (b == NULL) {
+        return NULL;
+    }
+
+    if (callback) {
+        b->last = ngx_cpymem(b->last, "/* callback */" CRLF,
+                             sizeof("/* callback */" CRLF) - 1);
+
+        b->last = ngx_cpymem(b->last, callback->data, callback->len);
+
+        *b->last++ = '(';
+    }
+
+    *b->last++ = '[';
+
+    for (i = 0; i < entries->nelts; i++) {
+        b->last = ngx_cpymem(b->last, CRLF "{ \"name\":\"",
+                             sizeof(CRLF "{ \"name\":\"") - 1);
+
+        if (entry[i].escape) {
+            b->last = (u_char *) ngx_escape_json(b->last, entry[i].name.data,
+                                                 entry[i].name.len);
+        } else {
+            b->last = ngx_cpymem(b->last, entry[i].name.data,
+                                 entry[i].name.len);
+        }
+
+        b->last = ngx_cpymem(b->last, "\", \"type\":\"",
+                             sizeof("\", \"type\":\"") - 1);
+
+        if (entry[i].dir) {
+            b->last = ngx_cpymem(b->last, "directory", sizeof("directory") - 1);
+
+        } else if (entry[i].file) {
+            b->last = ngx_cpymem(b->last, "file", sizeof("file") - 1);
+
+        } else {
+            b->last = ngx_cpymem(b->last, "other", sizeof("other") - 1);
+        }
+
+        b->last = ngx_cpymem(b->last, "\", \"mtime\":\"",
+                             sizeof("\", \"mtime\":\"") - 1);
+
+        b->last = ngx_http_time(b->last, entry[i].mtime);
+
+        if (entry[i].file) {
+            b->last = ngx_cpymem(b->last, "\", \"size\":",
+                                 sizeof("\", \"size\":") - 1);
+            b->last = ngx_sprintf(b->last, "%O", entry[i].size);
+
+        } else {
+            *b->last++ = '"';
+        }
+
+        b->last = ngx_cpymem(b->last, " },", sizeof(" },") - 1);
+    }
+
+    if (i > 0) {
+        b->last--;  /* strip last comma */
+    }
+
+    b->last = ngx_cpymem(b->last, CRLF "]", sizeof(CRLF "]") - 1);
+
+    if (callback) {
+        *b->last++ = ')'; *b->last++ = ';';
+    }
+
+    return b;
+}
+
+
+static ngx_int_t
+ngx_http_autoindex_jsonp_callback(ngx_http_request_t *r, ngx_str_t *callback)
+{
+    u_char      *p, c, ch;
+    ngx_uint_t   i;
+
+    if (ngx_http_arg(r, (u_char *) "callback", 8, callback) != NGX_OK) {
+        callback->len = 0;
+        return NGX_OK;
+    }
+
+    if (callback->len > 128) {
+        ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+                      "client sent too long callback name: \"%V\"", callback);
+        return NGX_DECLINED;
+    }
+
+    p = callback->data;
+
+    for (i = 0; i < callback->len; i++) {
+        ch = p[i];
+
+        c = (u_char) (ch | 0x20);
+        if (c >= 'a' && c <= 'z') {
+            continue;
+        }
+
+        if ((ch >= '0' && ch <= '9') || ch == '_' || ch == '.') {
+            continue;
+        }
+
+        ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+                      "client sent invalid callback name: \"%V\"", callback);
+
+        return NGX_DECLINED;
+    }
+
+    return NGX_OK;
+}
+
+
+static ngx_buf_t *
+ngx_http_autoindex_xml(ngx_http_request_t *r, ngx_array_t *entries)
+{
+    size_t                          len;
+    ngx_tm_t                        tm;
+    ngx_buf_t                      *b;
+    ngx_str_t                       type;
+    ngx_uint_t                      i;
+    ngx_http_autoindex_entry_t     *entry;
+
+    static u_char  head[] = "<?xml version=\"1.0\"?>" CRLF "<list>" CRLF;
+    static u_char  tail[] = "</list>" CRLF;
+
+    len = sizeof(head) - 1 + sizeof(tail) - 1;
+
+    entry = entries->elts;
+
+    for (i = 0; i < entries->nelts; i++) {
+        entry[i].escape = ngx_escape_html(NULL, entry[i].name.data,
+                                          entry[i].name.len);
+
+        len += sizeof("<directory></directory>" CRLF) - 1
+            + entry[i].name.len + entry[i].escape
+            + sizeof(" mtime=\"1986-12-31T10:00:00Z\"") - 1;
+
+        if (entry[i].file) {
+            len += sizeof(" size=\"\"") - 1 + NGX_OFF_T_LEN;
+        }
+    }
+
+    b = ngx_create_temp_buf(r->pool, len);
+    if (b == NULL) {
+        return NULL;
+    }
+
+    b->last = ngx_cpymem(b->last, head, sizeof(head) - 1);
+
+    for (i = 0; i < entries->nelts; i++) {
+        *b->last++ = '<';
+
+        if (entry[i].dir) {
+            ngx_str_set(&type, "directory");
+
+        } else if (entry[i].file) {
+            ngx_str_set(&type, "file");
+
+        } else {
+            ngx_str_set(&type, "other");
+        }
+
+        b->last = ngx_cpymem(b->last, type.data, type.len);
+
+        b->last = ngx_cpymem(b->last, " mtime=\"", sizeof(" mtime=\"") - 1);
+
+        ngx_gmtime(entry[i].mtime, &tm);
+
+        b->last = ngx_sprintf(b->last, "%4d-%02d-%02dT%02d:%02d:%02dZ",
+                              tm.ngx_tm_year, tm.ngx_tm_mon,
+                              tm.ngx_tm_mday, tm.ngx_tm_hour,
+                              tm.ngx_tm_min, tm.ngx_tm_sec);
+
+        if (entry[i].file) {
+            b->last = ngx_cpymem(b->last, "\" size=\"",
+                                 sizeof("\" size=\"") - 1);
+            b->last = ngx_sprintf(b->last, "%O", entry[i].size);
+        }
+
+        *b->last++ = '"'; *b->last++ = '>';
+
+        if (entry[i].escape) {
+            b->last = (u_char *) ngx_escape_html(b->last, entry[i].name.data,
+                                                 entry[i].name.len);
+        } else {
+            b->last = ngx_cpymem(b->last, entry[i].name.data,
+                                 entry[i].name.len);
+        }
+
+        *b->last++ = '<'; *b->last++ = '/';
+
+        b->last = ngx_cpymem(b->last, type.data, type.len);
+
+        *b->last++ = '>';
+
+        *b->last++ = CR; *b->last++ = LF;
+    }
+
+    b->last = ngx_cpymem(b->last, tail, sizeof(tail) - 1);
+
+    return b;
 }
 
 
@@ -665,6 +1007,7 @@ ngx_http_autoindex_create_loc_conf(ngx_conf_t *cf)
     }
 
     conf->enable = NGX_CONF_UNSET;
+    conf->format = NGX_CONF_UNSET_UINT;
     conf->localtime = NGX_CONF_UNSET;
     conf->exact_size = NGX_CONF_UNSET;
 
@@ -679,6 +1022,8 @@ ngx_http_autoindex_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
     ngx_http_autoindex_loc_conf_t *conf = child;
 
     ngx_conf_merge_value(conf->enable, prev->enable, 0);
+    ngx_conf_merge_uint_value(conf->format, prev->format,
+                              NGX_HTTP_AUTOINDEX_HTML);
     ngx_conf_merge_value(conf->localtime, prev->localtime, 0);
     ngx_conf_merge_value(conf->exact_size, prev->exact_size, 1);
 

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/http/modules/ngx_http_fastcgi_module.c (+209 -116) 93%
===================================================================
--- vendor/nginx-1.7.7/src/http/modules/ngx_http_fastcgi_module.c    2015-02-09 04:43:41 +0900 (b7f7ea1)
+++ vendor/nginx-1.7.9/src/http/modules/ngx_http_fastcgi_module.c    2015-02-09 04:48:38 +0900 (1bf4ac3)
@@ -11,22 +11,35 @@
 
 
 typedef struct {
+    ngx_array_t                    caches;  /* ngx_http_file_cache_t * */
+} ngx_http_fastcgi_main_conf_t;
+
+
+typedef struct {
+    ngx_array_t                   *flushes;
+    ngx_array_t                   *lengths;
+    ngx_array_t                   *values;
+    ngx_uint_t                     number;
+    ngx_hash_t                     hash;
+} ngx_http_fastcgi_params_t;
+
+
+typedef struct {
     ngx_http_upstream_conf_t       upstream;
 
     ngx_str_t                      index;
 
-    ngx_array_t                   *flushes;
-    ngx_array_t                   *params_len;
-    ngx_array_t                   *params;
+    ngx_http_fastcgi_params_t      params;
+#if (NGX_HTTP_CACHE)
+    ngx_http_fastcgi_params_t      params_cache;
+#endif
+
     ngx_array_t                   *params_source;
     ngx_array_t                   *catch_stderr;
 
     ngx_array_t                   *fastcgi_lengths;
     ngx_array_t                   *fastcgi_values;
 
-    ngx_hash_t                     headers_hash;
-    ngx_uint_t                     header_params;
-
     ngx_flag_t                     keep_conn;
 
 #if (NGX_HTTP_CACHE)
@@ -147,11 +160,13 @@ static void ngx_http_fastcgi_finalize_request(ngx_http_request_t *r,
     ngx_int_t rc);
 
 static ngx_int_t ngx_http_fastcgi_add_variables(ngx_conf_t *cf);
+static void *ngx_http_fastcgi_create_main_conf(ngx_conf_t *cf);
 static void *ngx_http_fastcgi_create_loc_conf(ngx_conf_t *cf);
 static char *ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf,
     void *parent, void *child);
-static ngx_int_t ngx_http_fastcgi_merge_params(ngx_conf_t *cf,
-    ngx_http_fastcgi_loc_conf_t *conf, ngx_http_fastcgi_loc_conf_t *prev);
+static ngx_int_t ngx_http_fastcgi_init_params(ngx_conf_t *cf,
+    ngx_http_fastcgi_loc_conf_t *conf, ngx_http_fastcgi_params_t *params,
+    ngx_keyval_t *default_params);
 
 static ngx_int_t ngx_http_fastcgi_script_name_variable(ngx_http_request_t *r,
     ngx_http_variable_value_t *v, uintptr_t data);
@@ -359,8 +374,8 @@ static ngx_command_t  ngx_http_fastcgi_commands[] = {
     { ngx_string("fastcgi_cache_path"),
       NGX_HTTP_MAIN_CONF|NGX_CONF_2MORE,
       ngx_http_file_cache_set_slot,
-      0,
-      0,
+      NGX_HTTP_MAIN_CONF_OFFSET,
+      offsetof(ngx_http_fastcgi_main_conf_t, caches),
       &ngx_http_fastcgi_module },
 
     { ngx_string("fastcgi_cache_bypass"),
@@ -419,6 +434,13 @@ static ngx_command_t  ngx_http_fastcgi_commands[] = {
       offsetof(ngx_http_fastcgi_loc_conf_t, upstream.cache_lock_timeout),
       NULL },
 
+    { ngx_string("fastcgi_cache_lock_age"),
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+      ngx_conf_set_msec_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(ngx_http_fastcgi_loc_conf_t, upstream.cache_lock_age),
+      NULL },
+
     { ngx_string("fastcgi_cache_revalidate"),
       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
       ngx_conf_set_flag_slot,
@@ -520,7 +542,7 @@ static ngx_http_module_t  ngx_http_fastcgi_module_ctx = {
     ngx_http_fastcgi_add_variables,        /* preconfiguration */
     NULL,                                  /* postconfiguration */
 
-    NULL,                                  /* create main configuration */
+    ngx_http_fastcgi_create_main_conf,     /* create main configuration */
     NULL,                                  /* init main configuration */
 
     NULL,                                  /* create server configuration */
@@ -619,10 +641,13 @@ static ngx_path_init_t  ngx_http_fastcgi_temp_path = {
 static ngx_int_t
 ngx_http_fastcgi_handler(ngx_http_request_t *r)
 {
-    ngx_int_t                     rc;
-    ngx_http_upstream_t          *u;
-    ngx_http_fastcgi_ctx_t       *f;
-    ngx_http_fastcgi_loc_conf_t  *flcf;
+    ngx_int_t                      rc;
+    ngx_http_upstream_t           *u;
+    ngx_http_fastcgi_ctx_t        *f;
+    ngx_http_fastcgi_loc_conf_t   *flcf;
+#if (NGX_HTTP_CACHE)
+    ngx_http_fastcgi_main_conf_t  *fmcf;
+#endif
 
     if (ngx_http_upstream_create(r) != NGX_OK) {
         return NGX_HTTP_INTERNAL_SERVER_ERROR;
@@ -651,8 +676,12 @@ ngx_http_fastcgi_handler(ngx_http_request_t *r)
     u->conf = &flcf->upstream;
 
 #if (NGX_HTTP_CACHE)
+    fmcf = ngx_http_get_module_main_conf(r, ngx_http_fastcgi_module);
+
+    u->caches = &fmcf->caches;
     u->create_key = ngx_http_fastcgi_create_key;
 #endif
+
     u->create_request = ngx_http_fastcgi_create_request;
     u->reinit_request = ngx_http_fastcgi_reinit_request;
     u->process_header = ngx_http_fastcgi_process_header;
@@ -773,6 +802,7 @@ ngx_http_fastcgi_create_request(ngx_http_request_t *r)
     ngx_http_script_code_pt       code;
     ngx_http_script_engine_t      e, le;
     ngx_http_fastcgi_header_t    *h;
+    ngx_http_fastcgi_params_t    *params;
     ngx_http_fastcgi_loc_conf_t  *flcf;
     ngx_http_script_len_code_pt   lcode;
 
@@ -782,13 +812,19 @@ ngx_http_fastcgi_create_request(ngx_http_request_t *r)
 
     flcf = ngx_http_get_module_loc_conf(r, ngx_http_fastcgi_module);
 
-    if (flcf->params_len) {
+#if (NGX_HTTP_CACHE)
+    params = r->upstream->cacheable ? &flcf->params_cache : &flcf->params;
+#else
+    params = &flcf->params;
+#endif
+
+    if (params->lengths) {
         ngx_memzero(&le, sizeof(ngx_http_script_engine_t));
 
-        ngx_http_script_flush_no_cacheable_variables(r, flcf->flushes);
+        ngx_http_script_flush_no_cacheable_variables(r, params->flushes);
         le.flushed = 1;
 
-        le.ip = flcf->params_len->elts;
+        le.ip = params->lengths->elts;
         le.request = r;
 
         while (*(uintptr_t *) le.ip) {
@@ -817,7 +853,7 @@ ngx_http_fastcgi_create_request(ngx_http_request_t *r)
         allocated = 0;
         lowcase_key = NULL;
 
-        if (flcf->header_params) {
+        if (params->number) {
             n = 0;
             part = &r->headers_in.headers.part;
 
@@ -847,7 +883,7 @@ ngx_http_fastcgi_create_request(ngx_http_request_t *r)
                 i = 0;
             }
 
-            if (flcf->header_params) {
+            if (params->number) {
                 if (allocated < header[i].key.len) {
                     allocated = header[i].key.len + 16;
                     lowcase_key = ngx_pnalloc(r->pool, allocated);
@@ -872,7 +908,7 @@ ngx_http_fastcgi_create_request(ngx_http_request_t *r)
                     lowcase_key[n] = ch;
                 }
 
-                if (ngx_hash_find(&flcf->headers_hash, hash, lowcase_key, n)) {
+                if (ngx_hash_find(&params->hash, hash, lowcase_key, n)) {
                     ignored[header_params++] = &header[i];
                     continue;
                 }
@@ -942,15 +978,15 @@ ngx_http_fastcgi_create_request(ngx_http_request_t *r)
                      + sizeof(ngx_http_fastcgi_header_t);
 
 
-    if (flcf->params_len) {
+    if (params->lengths) {
         ngx_memzero(&e, sizeof(ngx_http_script_engine_t));
 
-        e.ip = flcf->params->elts;
+        e.ip = params->values->elts;
         e.pos = b->last;
         e.request = r;
         e.flushed = 1;
 
-        le.ip = flcf->params_len->elts;
+        le.ip = params->lengths->elts;
 
         while (*(uintptr_t *) le.ip) {
 
@@ -2314,6 +2350,29 @@ ngx_http_fastcgi_add_variables(ngx_conf_t *cf)
 
 
 static void *
+ngx_http_fastcgi_create_main_conf(ngx_conf_t *cf)
+{
+    ngx_http_fastcgi_main_conf_t  *conf;
+
+    conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_fastcgi_main_conf_t));
+    if (conf == NULL) {
+        return NULL;
+    }
+
+#if (NGX_HTTP_CACHE)
+    if (ngx_array_init(&conf->caches, cf->pool, 4,
+                       sizeof(ngx_http_file_cache_t *))
+        != NGX_OK)
+    {
+        return NULL;
+    }
+#endif
+
+    return conf;
+}
+
+
+static void *
 ngx_http_fastcgi_create_loc_conf(ngx_conf_t *cf)
 {
     ngx_http_fastcgi_loc_conf_t  *conf;
@@ -2329,6 +2388,7 @@ ngx_http_fastcgi_create_loc_conf(ngx_conf_t *cf)
      *     conf->upstream.bufs.num = 0;
      *     conf->upstream.ignore_headers = 0;
      *     conf->upstream.next_upstream = 0;
+     *     conf->upstream.cache_zone = NULL;
      *     conf->upstream.cache_use_stale = 0;
      *     conf->upstream.cache_methods = 0;
      *     conf->upstream.temp_path = NULL;
@@ -2367,13 +2427,14 @@ ngx_http_fastcgi_create_loc_conf(ngx_conf_t *cf)
     conf->upstream.pass_request_body = NGX_CONF_UNSET;
 
 #if (NGX_HTTP_CACHE)
-    conf->upstream.cache = NGX_CONF_UNSET_PTR;
+    conf->upstream.cache = NGX_CONF_UNSET;
     conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT;
     conf->upstream.cache_bypass = NGX_CONF_UNSET_PTR;
     conf->upstream.no_cache = NGX_CONF_UNSET_PTR;
     conf->upstream.cache_valid = NGX_CONF_UNSET_PTR;
     conf->upstream.cache_lock = NGX_CONF_UNSET;
     conf->upstream.cache_lock_timeout = NGX_CONF_UNSET_MSEC;
+    conf->upstream.cache_lock_age = NGX_CONF_UNSET_MSEC;
     conf->upstream.cache_revalidate = NGX_CONF_UNSET;
 #endif
 
@@ -2404,17 +2465,28 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
     ngx_http_fastcgi_loc_conf_t *conf = child;
 
     size_t                        size;
+    ngx_int_t                     rc;
     ngx_hash_init_t               hash;
     ngx_http_core_loc_conf_t     *clcf;
 
-    if (conf->upstream.store != 0) {
+#if (NGX_HTTP_CACHE)
+
+    if (conf->upstream.store > 0) {
+        conf->upstream.cache = 0;
+    }
+
+    if (conf->upstream.cache > 0) {
+        conf->upstream.store = 0;
+    }
+
+#endif
+
+    if (conf->upstream.store == NGX_CONF_UNSET) {
         ngx_conf_merge_value(conf->upstream.store,
                               prev->upstream.store, 0);
 
-        if (conf->upstream.store_lengths == NULL) {
-            conf->upstream.store_lengths = prev->upstream.store_lengths;
-            conf->upstream.store_values = prev->upstream.store_values;
-        }
+        conf->upstream.store_lengths = prev->upstream.store_lengths;
+        conf->upstream.store_values = prev->upstream.store_values;
     }
 
     ngx_conf_merge_uint_value(conf->upstream.store_access,
@@ -2576,13 +2648,18 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
 
 #if (NGX_HTTP_CACHE)
 
-    ngx_conf_merge_ptr_value(conf->upstream.cache,
-                              prev->upstream.cache, NULL);
+    if (conf->upstream.cache == NGX_CONF_UNSET) {
+        ngx_conf_merge_value(conf->upstream.cache,
+                              prev->upstream.cache, 0);
+
+        conf->upstream.cache_zone = prev->upstream.cache_zone;
+        conf->upstream.cache_value = prev->upstream.cache_value;
+    }
 
-    if (conf->upstream.cache && conf->upstream.cache->data == NULL) {
+    if (conf->upstream.cache_zone && conf->upstream.cache_zone->data == NULL) {
         ngx_shm_zone_t  *shm_zone;
 
-        shm_zone = conf->upstream.cache;
+        shm_zone = conf->upstream.cache_zone;
 
         ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                            "\"fastcgi_cache\" zone \"%V\" is unknown",
@@ -2638,6 +2715,9 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
     ngx_conf_merge_msec_value(conf->upstream.cache_lock_timeout,
                               prev->upstream.cache_lock_timeout, 5000);
 
+    ngx_conf_merge_msec_value(conf->upstream.cache_lock_age,
+                              prev->upstream.cache_lock_age, 5000);
+
     ngx_conf_merge_value(conf->upstream.cache_revalidate,
                               prev->upstream.cache_revalidate, 0);
 
@@ -2669,20 +2749,20 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
         return NGX_CONF_ERROR;
     }
 
-    if (conf->upstream.upstream == NULL) {
-        conf->upstream.upstream = prev->upstream.upstream;
-    }
+    clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
 
-    if (conf->fastcgi_lengths == NULL) {
+    if (clcf->noname
+        && conf->upstream.upstream == NULL && conf->fastcgi_lengths == NULL)
+    {
+        conf->upstream.upstream = prev->upstream.upstream;
         conf->fastcgi_lengths = prev->fastcgi_lengths;
         conf->fastcgi_values = prev->fastcgi_values;
     }
 
-    if (conf->upstream.upstream || conf->fastcgi_lengths) {
-        clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
-        if (clcf->handler == NULL && clcf->lmt_excpt) {
-            clcf->handler = ngx_http_fastcgi_handler;
-        }
+    if (clcf->lmt_excpt && clcf->handler == NULL
+        && (conf->upstream.upstream || conf->fastcgi_lengths))
+    {
+        clcf->handler = ngx_http_fastcgi_handler;
     }
 
 #if (NGX_PCRE)
@@ -2692,69 +2772,67 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
     }
 #endif
 
-    if (ngx_http_fastcgi_merge_params(cf, conf, prev) != NGX_OK) {
+    if (conf->params_source == NULL) {
+        conf->params = prev->params;
+#if (NGX_HTTP_CACHE)
+        conf->params_cache = prev->params_cache;
+#endif
+        conf->params_source = prev->params_source;
+    }
+
+    rc = ngx_http_fastcgi_init_params(cf, conf, &conf->params, NULL);
+    if (rc != NGX_OK) {
         return NGX_CONF_ERROR;
     }
 
+#if (NGX_HTTP_CACHE)
+
+    if (conf->upstream.cache) {
+        rc = ngx_http_fastcgi_init_params(cf, conf, &conf->params_cache,
+                                          ngx_http_fastcgi_cache_headers);
+        if (rc != NGX_OK) {
+            return NGX_CONF_ERROR;
+        }
+    }
+
+#endif
+
     return NGX_CONF_OK;
 }
 
 
 static ngx_int_t
-ngx_http_fastcgi_merge_params(ngx_conf_t *cf,
-    ngx_http_fastcgi_loc_conf_t *conf, ngx_http_fastcgi_loc_conf_t *prev)
+ngx_http_fastcgi_init_params(ngx_conf_t *cf, ngx_http_fastcgi_loc_conf_t *conf,
+    ngx_http_fastcgi_params_t *params, ngx_keyval_t *default_params)
 {
     u_char                       *p;
     size_t                        size;
     uintptr_t                    *code;
     ngx_uint_t                    i, nsrc;
-    ngx_array_t                   headers_names;
-#if (NGX_HTTP_CACHE)
-    ngx_array_t                   params_merged;
-#endif
+    ngx_array_t                   headers_names, params_merged;
+    ngx_keyval_t                 *h;
     ngx_hash_key_t               *hk;
     ngx_hash_init_t               hash;
-    ngx_http_upstream_param_t    *src;
+    ngx_http_upstream_param_t    *src, *s;
     ngx_http_script_compile_t     sc;
     ngx_http_script_copy_code_t  *copy;
 
-    if (conf->params_source == NULL) {
-        conf->params_source = prev->params_source;
-
-        if (prev->headers_hash.buckets
-#if (NGX_HTTP_CACHE)
-            && ((conf->upstream.cache == NULL)
-                == (prev->upstream.cache == NULL))
-#endif
-           )
-        {
-            conf->flushes = prev->flushes;
-            conf->params_len = prev->params_len;
-            conf->params = prev->params;
-            conf->headers_hash = prev->headers_hash;
-            conf->header_params = prev->header_params;
-
-            return NGX_OK;
-        }
+    if (params->hash.buckets) {
+        return NGX_OK;
     }
 
-    if (conf->params_source == NULL
-#if (NGX_HTTP_CACHE)
-        && (conf->upstream.cache == NULL)
-#endif
-       )
-    {
-        conf->headers_hash.buckets = (void *) 1;
+    if (conf->params_source == NULL && default_params == NULL) {
+        params->hash.buckets = (void *) 1;
         return NGX_OK;
     }
 
-    conf->params_len = ngx_array_create(cf->pool, 64, 1);
-    if (conf->params_len == NULL) {
+    params->lengths = ngx_array_create(cf->pool, 64, 1);
+    if (params->lengths == NULL) {
         return NGX_ERROR;
     }
 
-    conf->params = ngx_array_create(cf->pool, 512, 1);
-    if (conf->params == NULL) {
+    params->values = ngx_array_create(cf->pool, 512, 1);
+    if (params->values == NULL) {
         return NGX_ERROR;
     }
 
@@ -2773,12 +2851,7 @@ ngx_http_fastcgi_merge_params(ngx_conf_t *cf,
         nsrc = 0;
     }
 
-#if (NGX_HTTP_CACHE)
-
-    if (conf->upstream.cache) {
-        ngx_keyval_t               *h;
-        ngx_http_upstream_param_t  *s;
-
+    if (default_params) {
         if (ngx_array_init(&params_merged, cf->temp_pool, 4,
                            sizeof(ngx_http_upstream_param_t))
             != NGX_OK)
@@ -2796,7 +2869,7 @@ ngx_http_fastcgi_merge_params(ngx_conf_t *cf,
             *s = src[i];
         }
 
-        h = ngx_http_fastcgi_cache_headers;
+        h = default_params;
 
         while (h->key.len) {
 
@@ -2827,8 +2900,6 @@ ngx_http_fastcgi_merge_params(ngx_conf_t *cf,
         nsrc = params_merged.nelts;
     }
 
-#endif
-
     for (i = 0; i < nsrc; i++) {
 
         if (src[i].key.len > sizeof("HTTP_") - 1
@@ -2849,7 +2920,7 @@ ngx_http_fastcgi_merge_params(ngx_conf_t *cf,
             }
         }
 
-        copy = ngx_array_push_n(conf->params_len,
+        copy = ngx_array_push_n(params->lengths,
                                 sizeof(ngx_http_script_copy_code_t));
         if (copy == NULL) {
             return NGX_ERROR;
@@ -2858,7 +2929,7 @@ ngx_http_fastcgi_merge_params(ngx_conf_t *cf,
         copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code;
         copy->len = src[i].key.len;
 
-        copy = ngx_array_push_n(conf->params_len,
+        copy = ngx_array_push_n(params->lengths,
                                 sizeof(ngx_http_script_copy_code_t));
         if (copy == NULL) {
             return NGX_ERROR;
@@ -2872,7 +2943,7 @@ ngx_http_fastcgi_merge_params(ngx_conf_t *cf,
                 + src[i].key.len + sizeof(uintptr_t) - 1)
                & ~(sizeof(uintptr_t) - 1);
 
-        copy = ngx_array_push_n(conf->params, size);
+        copy = ngx_array_push_n(params->values, size);
         if (copy == NULL) {
             return NGX_ERROR;
         }
@@ -2888,15 +2959,15 @@ ngx_http_fastcgi_merge_params(ngx_conf_t *cf,
 
         sc.cf = cf;
         sc.source = &src[i].value;
-        sc.flushes = &conf->flushes;
-        sc.lengths = &conf->params_len;
-        sc.values = &conf->params;
+        sc.flushes = &params->flushes;
+        sc.lengths = &params->lengths;
+        sc.values = &params->values;
 
         if (ngx_http_script_compile(&sc) != NGX_OK) {
             return NGX_ERROR;
         }
 
-        code = ngx_array_push_n(conf->params_len, sizeof(uintptr_t));
+        code = ngx_array_push_n(params->lengths, sizeof(uintptr_t));
         if (code == NULL) {
             return NGX_ERROR;
         }
@@ -2904,7 +2975,7 @@ ngx_http_fastcgi_merge_params(ngx_conf_t *cf,
         *code = (uintptr_t) NULL;
 
 
-        code = ngx_array_push_n(conf->params, sizeof(uintptr_t));
+        code = ngx_array_push_n(params->values, sizeof(uintptr_t));
         if (code == NULL) {
             return NGX_ERROR;
         }
@@ -2912,16 +2983,16 @@ ngx_http_fastcgi_merge_params(ngx_conf_t *cf,
         *code = (uintptr_t) NULL;
     }
 
-    code = ngx_array_push_n(conf->params_len, sizeof(uintptr_t));
+    code = ngx_array_push_n(params->lengths, sizeof(uintptr_t));
     if (code == NULL) {
         return NGX_ERROR;
     }
 
     *code = (uintptr_t) NULL;
 
-    conf->header_params = headers_names.nelts;
+    params->number = headers_names.nelts;
 
-    hash.hash = &conf->headers_hash;
+    hash.hash = &params->hash;
     hash.key = ngx_hash_key_lc;
     hash.max_size = 512;
     hash.bucket_size = 64;
@@ -3187,9 +3258,7 @@ ngx_http_fastcgi_store(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     ngx_str_t                  *value;
     ngx_http_script_compile_t   sc;
 
-    if (flcf->upstream.store != NGX_CONF_UNSET
-        || flcf->upstream.store_lengths)
-    {
+    if (flcf->upstream.store != NGX_CONF_UNSET) {
         return "is duplicate";
     }
 
@@ -3201,17 +3270,14 @@ ngx_http_fastcgi_store(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     }
 
 #if (NGX_HTTP_CACHE)
-
-    if (flcf->upstream.cache != NGX_CONF_UNSET_PTR
-        && flcf->upstream.cache != NULL)
-    {
+    if (flcf->upstream.cache > 0) {
         return "is incompatible with \"fastcgi_cache\"";
     }
-
 #endif
 
+    flcf->upstream.store = 1;
+
     if (ngx_strcmp(value[1].data, "on") == 0) {
-        flcf->upstream.store = 1;
         return NGX_CONF_OK;
     }
 
@@ -3243,26 +3309,53 @@ ngx_http_fastcgi_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 {
     ngx_http_fastcgi_loc_conf_t *flcf = conf;
 
-    ngx_str_t  *value;
+    ngx_str_t                         *value;
+    ngx_http_complex_value_t           cv;
+    ngx_http_compile_complex_value_t   ccv;
 
     value = cf->args->elts;
 
-    if (flcf->upstream.cache != NGX_CONF_UNSET_PTR) {
+    if (flcf->upstream.cache != NGX_CONF_UNSET) {
         return "is duplicate";
     }
 
     if (ngx_strcmp(value[1].data, "off") == 0) {
-        flcf->upstream.cache = NULL;
+        flcf->upstream.cache = 0;
         return NGX_CONF_OK;
     }
 
-    if (flcf->upstream.store > 0 || flcf->upstream.store_lengths) {
+    if (flcf->upstream.store > 0) {
         return "is incompatible with \"fastcgi_store\"";
     }
 
-    flcf->upstream.cache = ngx_shared_memory_add(cf, &value[1], 0,
-                                                 &ngx_http_fastcgi_module);
-    if (flcf->upstream.cache == NULL) {
+    flcf->upstream.cache = 1;
+
+    ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t));
+
+    ccv.cf = cf;
+    ccv.value = &value[1];
+    ccv.complex_value = &cv;
+
+    if (ngx_http_compile_complex_value(&ccv) != NGX_OK) {
+        return NGX_CONF_ERROR;
+    }
+
+    if (cv.lengths != NULL) {
+
+        flcf->upstream.cache_value = ngx_palloc(cf->pool,
+                                             sizeof(ngx_http_complex_value_t));
+        if (flcf->upstream.cache_value == NULL) {
+            return NGX_CONF_ERROR;
+        }
+
+        *flcf->upstream.cache_value = cv;
+
+        return NGX_CONF_OK;
+    }
+
+    flcf->upstream.cache_zone = ngx_shared_memory_add(cf, &value[1], 0,
+                                                      &ngx_http_fastcgi_module);
+    if (flcf->upstream.cache_zone == NULL) {
         return NGX_CONF_ERROR;
     }
 

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/http/modules/ngx_http_headers_filter_module.c (+156 -78) 75%
===================================================================
--- vendor/nginx-1.7.7/src/http/modules/ngx_http_headers_filter_module.c    2015-02-09 04:43:41 +0900 (f33cfb7)
+++ vendor/nginx-1.7.9/src/http/modules/ngx_http_headers_filter_module.c    2015-02-09 04:48:38 +0900 (a100569)
@@ -44,14 +44,17 @@ typedef enum {
 
 
 typedef struct {
-    ngx_http_expires_t       expires;
-    time_t                   expires_time;
-    ngx_array_t             *headers;
+    ngx_http_expires_t         expires;
+    time_t                     expires_time;
+    ngx_http_complex_value_t  *expires_value;
+    ngx_array_t               *headers;
 } ngx_http_headers_conf_t;
 
 
 static ngx_int_t ngx_http_set_expires(ngx_http_request_t *r,
     ngx_http_headers_conf_t *conf);
+static ngx_int_t ngx_http_parse_expires(ngx_str_t *value,
+    ngx_http_expires_t *expires, time_t *expires_time, char **err);
 static ngx_int_t ngx_http_add_cache_control(ngx_http_request_t *r,
     ngx_http_header_val_t *hv, ngx_str_t *value);
 static ngx_int_t ngx_http_add_header(ngx_http_request_t *r,
@@ -209,28 +212,52 @@ ngx_http_headers_filter(ngx_http_request_t *r)
 static ngx_int_t
 ngx_http_set_expires(ngx_http_request_t *r, ngx_http_headers_conf_t *conf)
 {
-    size_t            len;
-    time_t            now, expires_time, max_age;
-    ngx_uint_t        i;
-    ngx_table_elt_t  *expires, *cc, **ccp;
+    char                *err;
+    size_t               len;
+    time_t               now, expires_time, max_age;
+    ngx_str_t            value;
+    ngx_int_t            rc;
+    ngx_uint_t           i;
+    ngx_table_elt_t     *e, *cc, **ccp;
+    ngx_http_expires_t   expires;
 
-    expires = r->headers_out.expires;
+    expires = conf->expires;
+    expires_time = conf->expires_time;
 
-    if (expires == NULL) {
+    if (conf->expires_value != NULL) {
 
-        expires = ngx_list_push(&r->headers_out.headers);
-        if (expires == NULL) {
+        if (ngx_http_complex_value(r, conf->expires_value, &value) != NGX_OK) {
             return NGX_ERROR;
         }
 
-        r->headers_out.expires = expires;
+        rc = ngx_http_parse_expires(&value, &expires, &expires_time, &err);
 
-        expires->hash = 1;
-        ngx_str_set(&expires->key, "Expires");
+        if (rc != NGX_OK) {
+            return NGX_OK;
+        }
+
+        if (expires == NGX_HTTP_EXPIRES_OFF) {
+            return NGX_OK;
+        }
+    }
+
+    e = r->headers_out.expires;
+
+    if (e == NULL) {
+
+        e = ngx_list_push(&r->headers_out.headers);
+        if (e == NULL) {
+            return NGX_ERROR;
+        }
+
+        r->headers_out.expires = e;
+
+        e->hash = 1;
+        ngx_str_set(&e->key, "Expires");
     }
 
     len = sizeof("Mon, 28 Sep 1970 06:00:00 GMT");
-    expires->value.len = len - 1;
+    e->value.len = len - 1;
 
     ccp = r->headers_out.cache_control.elts;
 
@@ -265,26 +292,26 @@ ngx_http_set_expires(ngx_http_request_t *r, ngx_http_headers_conf_t *conf)
         cc = ccp[0];
     }
 
-    if (conf->expires == NGX_HTTP_EXPIRES_EPOCH) {
-        expires->value.data = (u_char *) "Thu, 01 Jan 1970 00:00:01 GMT";
+    if (expires == NGX_HTTP_EXPIRES_EPOCH) {
+        e->value.data = (u_char *) "Thu, 01 Jan 1970 00:00:01 GMT";
         ngx_str_set(&cc->value, "no-cache");
         return NGX_OK;
     }
 
-    if (conf->expires == NGX_HTTP_EXPIRES_MAX) {
-        expires->value.data = (u_char *) "Thu, 31 Dec 2037 23:55:55 GMT";
+    if (expires == NGX_HTTP_EXPIRES_MAX) {
+        e->value.data = (u_char *) "Thu, 31 Dec 2037 23:55:55 GMT";
         /* 10 years */
         ngx_str_set(&cc->value, "max-age=315360000");
         return NGX_OK;
     }
 
-    expires->value.data = ngx_pnalloc(r->pool, len);
-    if (expires->value.data == NULL) {
+    e->value.data = ngx_pnalloc(r->pool, len);
+    if (e->value.data == NULL) {
         return NGX_ERROR;
     }
 
-    if (conf->expires_time == 0 && conf->expires != NGX_HTTP_EXPIRES_DAILY) {
-        ngx_memcpy(expires->value.data, ngx_cached_http_time.data,
+    if (expires_time == 0 && expires != NGX_HTTP_EXPIRES_DAILY) {
+        ngx_memcpy(e->value.data, ngx_cached_http_time.data,
                    ngx_cached_http_time.len + 1);
         ngx_str_set(&cc->value, "max-age=0");
         return NGX_OK;
@@ -292,22 +319,22 @@ ngx_http_set_expires(ngx_http_request_t *r, ngx_http_headers_conf_t *conf)
 
     now = ngx_time();
 
-    if (conf->expires == NGX_HTTP_EXPIRES_DAILY) {
-        expires_time = ngx_next_time(conf->expires_time);
+    if (expires == NGX_HTTP_EXPIRES_DAILY) {
+        expires_time = ngx_next_time(expires_time);
         max_age = expires_time - now;
 
-    } else if (conf->expires == NGX_HTTP_EXPIRES_ACCESS
+    } else if (expires == NGX_HTTP_EXPIRES_ACCESS
                || r->headers_out.last_modified_time == -1)
     {
-        expires_time = now + conf->expires_time;
-        max_age = conf->expires_time;
+        max_age = expires_time;
+        expires_time += now;
 
     } else {
-        expires_time = r->headers_out.last_modified_time + conf->expires_time;
+        expires_time += r->headers_out.last_modified_time;
         max_age = expires_time - now;
     }
 
-    ngx_http_time(expires->value.data, expires_time);
+    ngx_http_time(e->value.data, expires_time);
 
     if (conf->expires_time < 0 || max_age < 0) {
         ngx_str_set(&cc->value, "no-cache");
@@ -328,6 +355,78 @@ ngx_http_set_expires(ngx_http_request_t *r, ngx_http_headers_conf_t *conf)
 
 
 static ngx_int_t
+ngx_http_parse_expires(ngx_str_t *value, ngx_http_expires_t *expires,
+    time_t *expires_time, char **err)
+{
+    ngx_uint_t  minus;
+
+    if (*expires != NGX_HTTP_EXPIRES_MODIFIED) {
+
+        if (value->len == 5 && ngx_strncmp(value->data, "epoch", 5) == 0) {
+            *expires = NGX_HTTP_EXPIRES_EPOCH;
+            return NGX_OK;
+        }
+
+        if (value->len == 3 && ngx_strncmp(value->data, "max", 3) == 0) {
+            *expires = NGX_HTTP_EXPIRES_MAX;
+            return NGX_OK;
+        }
+
+        if (value->len == 3 && ngx_strncmp(value->data, "off", 3) == 0) {
+            *expires = NGX_HTTP_EXPIRES_OFF;
+            return NGX_OK;
+        }
+    }
+
+    if (value->data[0] == '@') {
+        value->data++;
+        value->len--;
+        minus = 0;
+
+        if (*expires == NGX_HTTP_EXPIRES_MODIFIED) {
+            *err = "daily time cannot be used with \"modified\" parameter";
+            return NGX_ERROR;
+        }
+
+        *expires = NGX_HTTP_EXPIRES_DAILY;
+
+    } else if (value->data[0] == '+') {
+        value->data++;
+        value->len--;
+        minus = 0;
+
+    } else if (value->data[0] == '-') {
+        value->data++;
+        value->len--;
+        minus = 1;
+
+    } else {
+        minus = 0;
+    }
+
+    *expires_time = ngx_parse_time(value, 1);
+
+    if (*expires_time == (time_t) NGX_ERROR) {
+        *err = "invalid value";
+        return NGX_ERROR;
+    }
+
+    if (*expires == NGX_HTTP_EXPIRES_DAILY
+        && *expires_time > 24 * 60 * 60)
+    {
+        *err = "daily time value must be less than 24 hours";
+        return NGX_ERROR;
+    }
+
+    if (minus) {
+        *expires_time = - *expires_time;
+    }
+
+    return NGX_OK;
+}
+
+
+static ngx_int_t
 ngx_http_add_header(ngx_http_request_t *r, ngx_http_header_val_t *hv,
     ngx_str_t *value)
 {
@@ -457,6 +556,7 @@ ngx_http_headers_create_conf(ngx_conf_t *cf)
      *
      *     conf->headers = NULL;
      *     conf->expires_time = 0;
+     *     conf->expires_value = NULL;
      */
 
     conf->expires = NGX_HTTP_EXPIRES_UNSET;
@@ -474,6 +574,7 @@ ngx_http_headers_merge_conf(ngx_conf_t *cf, void *parent, void *child)
     if (conf->expires == NGX_HTTP_EXPIRES_UNSET) {
         conf->expires = prev->expires;
         conf->expires_time = prev->expires_time;
+        conf->expires_value = prev->expires_value;
 
         if (conf->expires == NGX_HTTP_EXPIRES_UNSET) {
             conf->expires = NGX_HTTP_EXPIRES_OFF;
@@ -503,8 +604,12 @@ ngx_http_headers_expires(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 {
     ngx_http_headers_conf_t *hcf = conf;
 
-    ngx_uint_t   minus, n;
-    ngx_str_t   *value;
+    char                              *err;
+    ngx_str_t                         *value;
+    ngx_int_t                          rc;
+    ngx_uint_t                         n;
+    ngx_http_complex_value_t           cv;
+    ngx_http_compile_complex_value_t   ccv;
 
     if (hcf->expires != NGX_HTTP_EXPIRES_UNSET) {
         return "is duplicate";
@@ -514,21 +619,6 @@ ngx_http_headers_expires(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
     if (cf->args->nelts == 2) {
 
-        if (ngx_strcmp(value[1].data, "epoch") == 0) {
-            hcf->expires = NGX_HTTP_EXPIRES_EPOCH;
-            return NGX_CONF_OK;
-        }
-
-        if (ngx_strcmp(value[1].data, "max") == 0) {
-            hcf->expires = NGX_HTTP_EXPIRES_MAX;
-            return NGX_CONF_OK;
-        }
-
-        if (ngx_strcmp(value[1].data, "off") == 0) {
-            hcf->expires = NGX_HTTP_EXPIRES_OFF;
-            return NGX_CONF_OK;
-        }
-
         hcf->expires = NGX_HTTP_EXPIRES_ACCESS;
 
         n = 1;
@@ -544,45 +634,33 @@ ngx_http_headers_expires(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         n = 2;
     }
 
-    if (value[n].data[0] == '@') {
-        value[n].data++;
-        value[n].len--;
-        minus = 0;
-
-        if (hcf->expires == NGX_HTTP_EXPIRES_MODIFIED) {
-            return "daily time cannot be used with \"modified\" parameter";
-        }
-
-        hcf->expires = NGX_HTTP_EXPIRES_DAILY;
-
-    } else if (value[n].data[0] == '+') {
-        value[n].data++;
-        value[n].len--;
-        minus = 0;
+    ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t));
 
-    } else if (value[n].data[0] == '-') {
-        value[n].data++;
-        value[n].len--;
-        minus = 1;
+    ccv.cf = cf;
+    ccv.value = &value[n];
+    ccv.complex_value = &cv;
 
-    } else {
-        minus = 0;
+    if (ngx_http_compile_complex_value(&ccv) != NGX_OK) {
+        return NGX_CONF_ERROR;
     }
 
-    hcf->expires_time = ngx_parse_time(&value[n], 1);
+    if (cv.lengths != NULL) {
 
-    if (hcf->expires_time == (time_t) NGX_ERROR) {
-        return "invalid value";
-    }
+        hcf->expires_value = ngx_palloc(cf->pool,
+                                        sizeof(ngx_http_complex_value_t));
+        if (hcf->expires_value == NULL) {
+            return NGX_CONF_ERROR;
+        }
 
-    if (hcf->expires == NGX_HTTP_EXPIRES_DAILY
-        && hcf->expires_time > 24 * 60 * 60)
-    {
-        return "daily time value must be less than 24 hours";
+        *hcf->expires_value = cv;
+
+        return NGX_CONF_OK;
     }
 
-    if (minus) {
-        hcf->expires_time = - hcf->expires_time;
+    rc = ngx_http_parse_expires(&value[n], &hcf->expires, &hcf->expires_time,
+                                &err);
+    if (rc != NGX_OK) {
+        return err;
     }
 
     return NGX_CONF_OK;

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/http/modules/ngx_http_log_module.c (+16 -8) 99%
===================================================================
--- vendor/nginx-1.7.7/src/http/modules/ngx_http_log_module.c    2015-02-09 04:43:41 +0900 (cec77e7)
+++ vendor/nginx-1.7.9/src/http/modules/ngx_http_log_module.c    2015-02-09 04:48:38 +0900 (df9424f)
@@ -152,7 +152,7 @@ static ngx_int_t ngx_http_log_init(ngx_conf_t *cf);
 static ngx_command_t  ngx_http_log_commands[] = {
 
     { ngx_string("log_format"),
-      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_2MORE,
+      NGX_HTTP_MAIN_CONF|NGX_CONF_2MORE,
       ngx_http_log_set_format,
       NGX_HTTP_MAIN_CONF_OFFSET,
       0,
@@ -744,10 +744,23 @@ 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_open_file_t     *file;
+    ngx_http_log_buf_t  *buffer;
+
     ngx_log_debug0(NGX_LOG_DEBUG_EVENT, ev->log, 0,
                    "http log buffer flush handler");
 
-    ngx_http_log_flush(ev->data, ev->log);
+    if (ev->timedout) {
+        ngx_http_log_flush(ev->data, ev->log);
+        return;
+    }
+
+    /* cancel the flush timer for graceful shutdown */
+
+    file = ev->data;
+    buffer = file->data;
+
+    buffer->event = NULL;
 }
 
 
@@ -1411,6 +1424,7 @@ process_formats:
             buffer->event->data = log->file;
             buffer->event->handler = ngx_http_log_flush_handler;
             buffer->event->log = &cf->cycle->new_log;
+            buffer->event->cancelable = 1;
 
             buffer->flush = flush;
         }
@@ -1434,12 +1448,6 @@ ngx_http_log_set_format(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     ngx_uint_t           i;
     ngx_http_log_fmt_t  *fmt;
 
-    if (cf->cmd_type != NGX_HTTP_MAIN_CONF) {
-        ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
-                           "the \"log_format\" directive may be used "
-                           "only on \"http\" level");
-    }
-
     value = cf->args->elts;
 
     fmt = lmcf->formats.elts;

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/http/modules/ngx_http_proxy_module.c (+314 -126) 91%
===================================================================
--- vendor/nginx-1.7.7/src/http/modules/ngx_http_proxy_module.c    2015-02-09 04:43:41 +0900 (ea4109c)
+++ vendor/nginx-1.7.9/src/http/modules/ngx_http_proxy_module.c    2015-02-09 04:48:38 +0900 (d7675d4)
@@ -10,6 +10,11 @@
 #include <ngx_http.h>
 
 
+typedef struct {
+    ngx_array_t                    caches;  /* ngx_http_file_cache_t * */
+} ngx_http_proxy_main_conf_t;
+
+
 typedef struct ngx_http_proxy_rewrite_s  ngx_http_proxy_rewrite_t;
 
 typedef ngx_int_t (*ngx_http_proxy_rewrite_pt)(ngx_http_request_t *r,
@@ -40,15 +45,25 @@ typedef struct {
 
 
 typedef struct {
+    ngx_array_t                   *flushes;
+    ngx_array_t                   *lengths;
+    ngx_array_t                   *values;
+    ngx_hash_t                     hash;
+} ngx_http_proxy_headers_t;
+
+
+typedef struct {
     ngx_http_upstream_conf_t       upstream;
 
-    ngx_array_t                   *flushes;
-    ngx_array_t                   *body_set_len;
-    ngx_array_t                   *body_set;
-    ngx_array_t                   *headers_set_len;
-    ngx_array_t                   *headers_set;
-    ngx_hash_t                     headers_set_hash;
+    ngx_array_t                   *body_flushes;
+    ngx_array_t                   *body_lengths;
+    ngx_array_t                   *body_values;
+    ngx_str_t                      body_source;
 
+    ngx_http_proxy_headers_t       headers;
+#if (NGX_HTTP_CACHE)
+    ngx_http_proxy_headers_t       headers_cache;
+#endif
     ngx_array_t                   *headers_source;
 
     ngx_array_t                   *proxy_lengths;
@@ -58,8 +73,6 @@ typedef struct {
     ngx_array_t                   *cookie_domains;
     ngx_array_t                   *cookie_paths;
 
-    ngx_str_t                      body_source;
-
     ngx_str_t                      method;
     ngx_str_t                      location;
     ngx_str_t                      url;
@@ -84,6 +97,9 @@ typedef struct {
     ngx_uint_t                     ssl_verify_depth;
     ngx_str_t                      ssl_trusted_certificate;
     ngx_str_t                      ssl_crl;
+    ngx_str_t                      ssl_certificate;
+    ngx_str_t                      ssl_certificate_key;
+    ngx_array_t                   *ssl_passwords;
 #endif
 } ngx_http_proxy_loc_conf_t;
 
@@ -140,11 +156,13 @@ static ngx_int_t ngx_http_proxy_rewrite(ngx_http_request_t *r,
     ngx_table_elt_t *h, size_t prefix, size_t len, ngx_str_t *replacement);
 
 static ngx_int_t ngx_http_proxy_add_variables(ngx_conf_t *cf);
+static void *ngx_http_proxy_create_main_conf(ngx_conf_t *cf);
 static void *ngx_http_proxy_create_loc_conf(ngx_conf_t *cf);
 static char *ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf,
     void *parent, void *child);
-static ngx_int_t ngx_http_proxy_merge_headers(ngx_conf_t *cf,
-    ngx_http_proxy_loc_conf_t *conf, ngx_http_proxy_loc_conf_t *prev);
+static ngx_int_t ngx_http_proxy_init_headers(ngx_conf_t *cf,
+    ngx_http_proxy_loc_conf_t *conf, ngx_http_proxy_headers_t *headers,
+    ngx_keyval_t *default_headers);
 
 static char *ngx_http_proxy_pass(ngx_conf_t *cf, ngx_command_t *cmd,
     void *conf);
@@ -162,6 +180,10 @@ static char *ngx_http_proxy_cache(ngx_conf_t *cf, ngx_command_t *cmd,
 static char *ngx_http_proxy_cache_key(ngx_conf_t *cf, ngx_command_t *cmd,
     void *conf);
 #endif
+#if (NGX_HTTP_SSL)
+static char *ngx_http_proxy_ssl_password_file(ngx_conf_t *cf,
+    ngx_command_t *cmd, void *conf);
+#endif
 
 static char *ngx_http_proxy_lowat_check(ngx_conf_t *cf, void *post, void *data);
 
@@ -422,8 +444,8 @@ static ngx_command_t  ngx_http_proxy_commands[] = {
     { ngx_string("proxy_cache_path"),
       NGX_HTTP_MAIN_CONF|NGX_CONF_2MORE,
       ngx_http_file_cache_set_slot,
-      0,
-      0,
+      NGX_HTTP_MAIN_CONF_OFFSET,
+      offsetof(ngx_http_proxy_main_conf_t, caches),
       &ngx_http_proxy_module },
 
     { ngx_string("proxy_cache_bypass"),
@@ -482,6 +504,13 @@ static ngx_command_t  ngx_http_proxy_commands[] = {
       offsetof(ngx_http_proxy_loc_conf_t, upstream.cache_lock_timeout),
       NULL },
 
+    { ngx_string("proxy_cache_lock_age"),
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+      ngx_conf_set_msec_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(ngx_http_proxy_loc_conf_t, upstream.cache_lock_age),
+      NULL },
+
     { ngx_string("proxy_cache_revalidate"),
       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
       ngx_conf_set_flag_slot,
@@ -626,6 +655,27 @@ static ngx_command_t  ngx_http_proxy_commands[] = {
       offsetof(ngx_http_proxy_loc_conf_t, ssl_crl),
       NULL },
 
+    { ngx_string("proxy_ssl_certificate"),
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+      ngx_conf_set_str_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(ngx_http_proxy_loc_conf_t, ssl_certificate),
+      NULL },
+
+    { ngx_string("proxy_ssl_certificate_key"),
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+      ngx_conf_set_str_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(ngx_http_proxy_loc_conf_t, ssl_certificate_key),
+      NULL },
+
+    { ngx_string("proxy_ssl_password_file"),
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+      ngx_http_proxy_ssl_password_file,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      0,
+      NULL },
+
 #endif
 
       ngx_null_command
@@ -636,7 +686,7 @@ static ngx_http_module_t  ngx_http_proxy_module_ctx = {
     ngx_http_proxy_add_variables,          /* preconfiguration */
     NULL,                                  /* postconfiguration */
 
-    NULL,                                  /* create main configuration */
+    ngx_http_proxy_create_main_conf,       /* create main configuration */
     NULL,                                  /* init main configuration */
 
     NULL,                                  /* create server configuration */
@@ -671,6 +721,7 @@ static ngx_keyval_t  ngx_http_proxy_headers[] = {
     { ngx_string("Host"), ngx_string("$proxy_host") },
     { ngx_string("Connection"), ngx_string("close") },
     { ngx_string("Content-Length"), ngx_string("$proxy_internal_body_length") },
+    { ngx_string("TE"), ngx_string("") },
     { ngx_string("Transfer-Encoding"), ngx_string("") },
     { ngx_string("Keep-Alive"), ngx_string("") },
     { ngx_string("Expect"), ngx_string("") },
@@ -698,6 +749,7 @@ static ngx_keyval_t  ngx_http_proxy_cache_headers[] = {
     { ngx_string("Host"), ngx_string("$proxy_host") },
     { ngx_string("Connection"), ngx_string("close") },
     { ngx_string("Content-Length"), ngx_string("$proxy_internal_body_length") },
+    { ngx_string("TE"), ngx_string("") },
     { ngx_string("Transfer-Encoding"), ngx_string("") },
     { ngx_string("Keep-Alive"), ngx_string("") },
     { ngx_string("Expect"), ngx_string("") },
@@ -746,10 +798,13 @@ static ngx_path_init_t  ngx_http_proxy_temp_path = {
 static ngx_int_t
 ngx_http_proxy_handler(ngx_http_request_t *r)
 {
-    ngx_int_t                   rc;
-    ngx_http_upstream_t        *u;
-    ngx_http_proxy_ctx_t       *ctx;
-    ngx_http_proxy_loc_conf_t  *plcf;
+    ngx_int_t                    rc;
+    ngx_http_upstream_t         *u;
+    ngx_http_proxy_ctx_t        *ctx;
+    ngx_http_proxy_loc_conf_t   *plcf;
+#if (NGX_HTTP_CACHE)
+    ngx_http_proxy_main_conf_t  *pmcf;
+#endif
 
     if (ngx_http_upstream_create(r) != NGX_OK) {
         return NGX_HTTP_INTERNAL_SERVER_ERROR;
@@ -784,8 +839,12 @@ ngx_http_proxy_handler(ngx_http_request_t *r)
     u->conf = &plcf->upstream;
 
 #if (NGX_HTTP_CACHE)
+    pmcf = ngx_http_get_module_main_conf(r, ngx_http_proxy_module);
+
+    u->caches = &pmcf->caches;
     u->create_key = ngx_http_proxy_create_key;
 #endif
+
     u->create_request = ngx_http_proxy_create_request;
     u->reinit_request = ngx_http_proxy_reinit_request;
     u->process_header = ngx_http_proxy_process_status_line;
@@ -1045,6 +1104,7 @@ ngx_http_proxy_create_request(ngx_http_request_t *r)
     ngx_http_upstream_t          *u;
     ngx_http_proxy_ctx_t         *ctx;
     ngx_http_script_code_pt       code;
+    ngx_http_proxy_headers_t     *headers;
     ngx_http_script_engine_t      e, le;
     ngx_http_proxy_loc_conf_t    *plcf;
     ngx_http_script_len_code_pt   lcode;
@@ -1053,6 +1113,12 @@ ngx_http_proxy_create_request(ngx_http_request_t *r)
 
     plcf = ngx_http_get_module_loc_conf(r, ngx_http_proxy_module);
 
+#if (NGX_HTTP_CACHE)
+    headers = u->cacheable ? &plcf->headers_cache : &plcf->headers;
+#else
+    headers = &plcf->headers;
+#endif
+
     if (u->method.len) {
         /* HEAD was changed to GET to cache response */
         method = u->method;
@@ -1111,10 +1177,11 @@ ngx_http_proxy_create_request(ngx_http_request_t *r)
 
     ngx_memzero(&le, sizeof(ngx_http_script_engine_t));
 
-    ngx_http_script_flush_no_cacheable_variables(r, plcf->flushes);
+    ngx_http_script_flush_no_cacheable_variables(r, plcf->body_flushes);
+    ngx_http_script_flush_no_cacheable_variables(r, headers->flushes);
 
-    if (plcf->body_set_len) {
-        le.ip = plcf->body_set_len->elts;
+    if (plcf->body_lengths) {
+        le.ip = plcf->body_lengths->elts;
         le.request = r;
         le.flushed = 1;
         body_len = 0;
@@ -1131,7 +1198,7 @@ ngx_http_proxy_create_request(ngx_http_request_t *r)
         ctx->internal_body_length = r->headers_in.content_length_n;
     }
 
-    le.ip = plcf->headers_set_len->elts;
+    le.ip = headers->lengths->elts;
     le.request = r;
     le.flushed = 1;
 
@@ -1160,7 +1227,7 @@ ngx_http_proxy_create_request(ngx_http_request_t *r)
                 i = 0;
             }
 
-            if (ngx_hash_find(&plcf->headers_set_hash, header[i].hash,
+            if (ngx_hash_find(&headers->hash, header[i].hash,
                               header[i].lowcase_key, header[i].key.len))
             {
                 continue;
@@ -1231,12 +1298,12 @@ ngx_http_proxy_create_request(ngx_http_request_t *r)
 
     ngx_memzero(&e, sizeof(ngx_http_script_engine_t));
 
-    e.ip = plcf->headers_set->elts;
+    e.ip = headers->values->elts;
     e.pos = b->last;
     e.request = r;
     e.flushed = 1;
 
-    le.ip = plcf->headers_set_len->elts;
+    le.ip = headers->lengths->elts;
 
     while (*(uintptr_t *) le.ip) {
         lcode = *(ngx_http_script_len_code_pt *) le.ip;
@@ -1284,7 +1351,7 @@ ngx_http_proxy_create_request(ngx_http_request_t *r)
                 i = 0;
             }
 
-            if (ngx_hash_find(&plcf->headers_set_hash, header[i].hash,
+            if (ngx_hash_find(&headers->hash, header[i].hash,
                               header[i].lowcase_key, header[i].key.len))
             {
                 continue;
@@ -1309,8 +1376,8 @@ ngx_http_proxy_create_request(ngx_http_request_t *r)
     /* add "\r\n" at the header end */
     *b->last++ = CR; *b->last++ = LF;
 
-    if (plcf->body_set) {
-        e.ip = plcf->body_set->elts;
+    if (plcf->body_values) {
+        e.ip = plcf->body_values->elts;
         e.pos = b->last;
 
         while (*(uintptr_t *) e.ip) {
@@ -1325,7 +1392,7 @@ ngx_http_proxy_create_request(ngx_http_request_t *r)
                    "http proxy header:%N\"%*s\"",
                    (size_t) (b->last - b->pos), b->pos);
 
-    if (plcf->body_set == NULL && plcf->upstream.pass_request_body) {
+    if (plcf->body_values == NULL && plcf->upstream.pass_request_body) {
 
         body = u->request_bufs;
         u->request_bufs = cl;
@@ -2440,6 +2507,29 @@ ngx_http_proxy_add_variables(ngx_conf_t *cf)
 
 
 static void *
+ngx_http_proxy_create_main_conf(ngx_conf_t *cf)
+{
+    ngx_http_proxy_main_conf_t  *conf;
+
+    conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_proxy_main_conf_t));
+    if (conf == NULL) {
+        return NULL;
+    }
+
+#if (NGX_HTTP_CACHE)
+    if (ngx_array_init(&conf->caches, cf->pool, 4,
+                       sizeof(ngx_http_file_cache_t *))
+        != NGX_OK)
+    {
+        return NULL;
+    }
+#endif
+
+    return conf;
+}
+
+
+static void *
 ngx_http_proxy_create_loc_conf(ngx_conf_t *cf)
 {
     ngx_http_proxy_loc_conf_t  *conf;
@@ -2455,6 +2545,7 @@ ngx_http_proxy_create_loc_conf(ngx_conf_t *cf)
      *     conf->upstream.bufs.num = 0;
      *     conf->upstream.ignore_headers = 0;
      *     conf->upstream.next_upstream = 0;
+     *     conf->upstream.cache_zone = NULL;
      *     conf->upstream.cache_use_stale = 0;
      *     conf->upstream.cache_methods = 0;
      *     conf->upstream.temp_path = NULL;
@@ -2467,11 +2558,14 @@ ngx_http_proxy_create_loc_conf(ngx_conf_t *cf)
      *
      *     conf->method = { 0, NULL };
      *     conf->headers_source = NULL;
-     *     conf->headers_set_len = NULL;
-     *     conf->headers_set = NULL;
-     *     conf->headers_set_hash = NULL;
-     *     conf->body_set_len = NULL;
-     *     conf->body_set = NULL;
+     *     conf->headers.lengths = NULL;
+     *     conf->headers.values = NULL;
+     *     conf->headers.hash = { NULL, 0 };
+     *     conf->headers_cache.lengths = NULL;
+     *     conf->headers_cache.values = NULL;
+     *     conf->headers_cache.hash = { NULL, 0 };
+     *     conf->body_lengths = NULL;
+     *     conf->body_values = NULL;
      *     conf->body_source = { 0, NULL };
      *     conf->redirects = NULL;
      *     conf->ssl = 0;
@@ -2479,6 +2573,8 @@ ngx_http_proxy_create_loc_conf(ngx_conf_t *cf)
      *     conf->ssl_ciphers = { 0, NULL };
      *     conf->ssl_trusted_certificate = { 0, NULL };
      *     conf->ssl_crl = { 0, NULL };
+     *     conf->ssl_certificate = { 0, NULL };
+     *     conf->ssl_certificate_key = { 0, NULL };
      */
 
     conf->upstream.store = NGX_CONF_UNSET;
@@ -2507,13 +2603,14 @@ ngx_http_proxy_create_loc_conf(ngx_conf_t *cf)
     conf->upstream.pass_request_body = NGX_CONF_UNSET;
 
 #if (NGX_HTTP_CACHE)
-    conf->upstream.cache = NGX_CONF_UNSET_PTR;
+    conf->upstream.cache = NGX_CONF_UNSET;
     conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT;
     conf->upstream.cache_bypass = NGX_CONF_UNSET_PTR;
     conf->upstream.no_cache = NGX_CONF_UNSET_PTR;
     conf->upstream.cache_valid = NGX_CONF_UNSET_PTR;
     conf->upstream.cache_lock = NGX_CONF_UNSET;
     conf->upstream.cache_lock_timeout = NGX_CONF_UNSET_MSEC;
+    conf->upstream.cache_lock_age = NGX_CONF_UNSET_MSEC;
     conf->upstream.cache_revalidate = NGX_CONF_UNSET;
 #endif
 
@@ -2527,6 +2624,7 @@ ngx_http_proxy_create_loc_conf(ngx_conf_t *cf)
     conf->upstream.ssl_server_name = NGX_CONF_UNSET;
     conf->upstream.ssl_verify = NGX_CONF_UNSET;
     conf->ssl_verify_depth = NGX_CONF_UNSET_UINT;
+    conf->ssl_passwords = NGX_CONF_UNSET_PTR;
 #endif
 
     /* "proxy_cyclic_temp_file" is disabled */
@@ -2557,19 +2655,30 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
 
     u_char                     *p;
     size_t                      size;
+    ngx_int_t                   rc;
     ngx_hash_init_t             hash;
     ngx_http_core_loc_conf_t   *clcf;
     ngx_http_proxy_rewrite_t   *pr;
     ngx_http_script_compile_t   sc;
 
-    if (conf->upstream.store != 0) {
+#if (NGX_HTTP_CACHE)
+
+    if (conf->upstream.store > 0) {
+        conf->upstream.cache = 0;
+    }
+
+    if (conf->upstream.cache > 0) {
+        conf->upstream.store = 0;
+    }
+
+#endif
+
+    if (conf->upstream.store == NGX_CONF_UNSET) {
         ngx_conf_merge_value(conf->upstream.store,
                               prev->upstream.store, 0);
 
-        if (conf->upstream.store_lengths == NULL) {
-            conf->upstream.store_lengths = prev->upstream.store_lengths;
-            conf->upstream.store_values = prev->upstream.store_values;
-        }
+        conf->upstream.store_lengths = prev->upstream.store_lengths;
+        conf->upstream.store_values = prev->upstream.store_values;
     }
 
     ngx_conf_merge_uint_value(conf->upstream.store_access,
@@ -2730,13 +2839,18 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
 
 #if (NGX_HTTP_CACHE)
 
-    ngx_conf_merge_ptr_value(conf->upstream.cache,
-                              prev->upstream.cache, NULL);
+    if (conf->upstream.cache == NGX_CONF_UNSET) {
+        ngx_conf_merge_value(conf->upstream.cache,
+                              prev->upstream.cache, 0);
 
-    if (conf->upstream.cache && conf->upstream.cache->data == NULL) {
+        conf->upstream.cache_zone = prev->upstream.cache_zone;
+        conf->upstream.cache_value = prev->upstream.cache_value;
+    }
+
+    if (conf->upstream.cache_zone && conf->upstream.cache_zone->data == NULL) {
         ngx_shm_zone_t  *shm_zone;
 
-        shm_zone = conf->upstream.cache;
+        shm_zone = conf->upstream.cache_zone;
 
         ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                            "\"proxy_cache\" zone \"%V\" is unknown",
@@ -2787,6 +2901,9 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
     ngx_conf_merge_msec_value(conf->upstream.cache_lock_timeout,
                               prev->upstream.cache_lock_timeout, 5000);
 
+    ngx_conf_merge_msec_value(conf->upstream.cache_lock_age,
+                              prev->upstream.cache_lock_age, 5000);
+
     ngx_conf_merge_value(conf->upstream.cache_revalidate,
                               prev->upstream.cache_revalidate, 0);
 
@@ -2836,6 +2953,12 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
                               prev->ssl_trusted_certificate, "");
     ngx_conf_merge_str_value(conf->ssl_crl, prev->ssl_crl, "");
 
+    ngx_conf_merge_str_value(conf->ssl_certificate,
+                              prev->ssl_certificate, "");
+    ngx_conf_merge_str_value(conf->ssl_certificate_key,
+                              prev->ssl_certificate_key, "");
+    ngx_conf_merge_ptr_value(conf->ssl_passwords, prev->ssl_passwords, NULL);
+
     if (conf->ssl && ngx_http_proxy_set_ssl(cf, conf) != NGX_OK) {
         return NGX_CONF_ERROR;
     }
@@ -2897,12 +3020,6 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
 
     ngx_conf_merge_ptr_value(conf->cookie_paths, prev->cookie_paths, NULL);
 
-#if (NGX_HTTP_SSL)
-    if (conf->upstream.ssl == NULL) {
-        conf->upstream.ssl = prev->upstream.ssl;
-    }
-#endif
-
     ngx_conf_merge_uint_value(conf->http_version, prev->http_version,
                               NGX_HTTP_VERSION_10);
 
@@ -2926,39 +3043,45 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
         return NGX_CONF_ERROR;
     }
 
-    if (conf->upstream.upstream == NULL) {
+    clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
+
+    if (clcf->noname
+        && conf->upstream.upstream == NULL && conf->proxy_lengths == NULL)
+    {
         conf->upstream.upstream = prev->upstream.upstream;
+        conf->location = prev->location;
         conf->vars = prev->vars;
-    }
 
-    if (conf->proxy_lengths == NULL) {
         conf->proxy_lengths = prev->proxy_lengths;
         conf->proxy_values = prev->proxy_values;
+
+#if (NGX_HTTP_SSL)
+        conf->upstream.ssl = prev->upstream.ssl;
+#endif
     }
 
-    if (conf->upstream.upstream || conf->proxy_lengths) {
-        clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
-        if (clcf->handler == NULL && clcf->lmt_excpt) {
-            clcf->handler = ngx_http_proxy_handler;
-            conf->location = prev->location;
-        }
+    if (clcf->lmt_excpt && clcf->handler == NULL
+        && (conf->upstream.upstream || conf->proxy_lengths))
+    {
+        clcf->handler = ngx_http_proxy_handler;
     }
 
     if (conf->body_source.data == NULL) {
+        conf->body_flushes = prev->body_flushes;
         conf->body_source = prev->body_source;
-        conf->body_set_len = prev->body_set_len;
-        conf->body_set = prev->body_set;
+        conf->body_lengths = prev->body_lengths;
+        conf->body_values = prev->body_values;
     }
 
-    if (conf->body_source.data && conf->body_set_len == NULL) {
+    if (conf->body_source.data && conf->body_lengths == NULL) {
 
         ngx_memzero(&sc, sizeof(ngx_http_script_compile_t));
 
         sc.cf = cf;
         sc.source = &conf->body_source;
-        sc.flushes = &conf->flushes;
-        sc.lengths = &conf->body_set_len;
-        sc.values = &conf->body_set;
+        sc.flushes = &conf->body_flushes;
+        sc.lengths = &conf->body_lengths;
+        sc.values = &conf->body_values;
         sc.complete_lengths = 1;
         sc.complete_values = 1;
 
@@ -2967,17 +3090,39 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
         }
     }
 
-    if (ngx_http_proxy_merge_headers(cf, conf, prev) != NGX_OK) {
+    if (conf->headers_source == NULL) {
+        conf->headers = prev->headers;
+#if (NGX_HTTP_CACHE)
+        conf->headers_cache = prev->headers_cache;
+#endif
+        conf->headers_source = prev->headers_source;
+    }
+
+    rc = ngx_http_proxy_init_headers(cf, conf, &conf->headers,
+                                     ngx_http_proxy_headers);
+    if (rc != NGX_OK) {
         return NGX_CONF_ERROR;
     }
 
+#if (NGX_HTTP_CACHE)
+
+    if (conf->upstream.cache) {
+        rc = ngx_http_proxy_init_headers(cf, conf, &conf->headers_cache,
+                                         ngx_http_proxy_cache_headers);
+        if (rc != NGX_OK) {
+            return NGX_CONF_ERROR;
+        }
+    }
+
+#endif
+
     return NGX_CONF_OK;
 }
 
 
 static ngx_int_t
-ngx_http_proxy_merge_headers(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *conf,
-    ngx_http_proxy_loc_conf_t *prev)
+ngx_http_proxy_init_headers(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *conf,
+    ngx_http_proxy_headers_t *headers, ngx_keyval_t *default_headers)
 {
     u_char                       *p;
     size_t                        size;
@@ -2990,24 +3135,10 @@ ngx_http_proxy_merge_headers(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *conf,
     ngx_http_script_compile_t     sc;
     ngx_http_script_copy_code_t  *copy;
 
-    if (conf->headers_source == NULL) {
-        conf->flushes = prev->flushes;
-        conf->headers_set_len = prev->headers_set_len;
-        conf->headers_set = prev->headers_set;
-        conf->headers_set_hash = prev->headers_set_hash;
-        conf->headers_source = prev->headers_source;
-    }
-
-    if (conf->headers_set_hash.buckets
-#if (NGX_HTTP_CACHE)
-        && ((conf->upstream.cache == NULL) == (prev->upstream.cache == NULL))
-#endif
-       )
-    {
+    if (headers->hash.buckets) {
         return NGX_OK;
     }
 
-
     if (ngx_array_init(&headers_names, cf->temp_pool, 4, sizeof(ngx_hash_key_t))
         != NGX_OK)
     {
@@ -3028,27 +3159,16 @@ ngx_http_proxy_merge_headers(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *conf,
         }
     }
 
-    conf->headers_set_len = ngx_array_create(cf->pool, 64, 1);
-    if (conf->headers_set_len == NULL) {
+    headers->lengths = ngx_array_create(cf->pool, 64, 1);
+    if (headers->lengths == NULL) {
         return NGX_ERROR;
     }
 
-    conf->headers_set = ngx_array_create(cf->pool, 512, 1);
-    if (conf->headers_set == NULL) {
+    headers->values = ngx_array_create(cf->pool, 512, 1);
+    if (headers->values == NULL) {
         return NGX_ERROR;
     }
 
-
-#if (NGX_HTTP_CACHE)
-
-    h = conf->upstream.cache ? ngx_http_proxy_cache_headers:
-                               ngx_http_proxy_headers;
-#else
-
-    h = ngx_http_proxy_headers;
-
-#endif
-
     src = conf->headers_source->elts;
     for (i = 0; i < conf->headers_source->nelts; i++) {
 
@@ -3060,6 +3180,8 @@ ngx_http_proxy_merge_headers(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *conf,
         *s = src[i];
     }
 
+    h = default_headers;
+
     while (h->key.len) {
 
         src = headers_merged.elts;
@@ -3099,7 +3221,7 @@ ngx_http_proxy_merge_headers(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *conf,
         }
 
         if (ngx_http_script_variables_count(&src[i].value) == 0) {
-            copy = ngx_array_push_n(conf->headers_set_len,
+            copy = ngx_array_push_n(headers->lengths,
                                     sizeof(ngx_http_script_copy_code_t));
             if (copy == NULL) {
                 return NGX_ERROR;
@@ -3117,7 +3239,7 @@ ngx_http_proxy_merge_headers(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *conf,
                        + sizeof(uintptr_t) - 1)
                     & ~(sizeof(uintptr_t) - 1);
 
-            copy = ngx_array_push_n(conf->headers_set, size);
+            copy = ngx_array_push_n(headers->values, size);
             if (copy == NULL) {
                 return NGX_ERROR;
             }
@@ -3134,7 +3256,7 @@ ngx_http_proxy_merge_headers(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *conf,
             *p++ = CR; *p = LF;
 
         } else {
-            copy = ngx_array_push_n(conf->headers_set_len,
+            copy = ngx_array_push_n(headers->lengths,
                                     sizeof(ngx_http_script_copy_code_t));
             if (copy == NULL) {
                 return NGX_ERROR;
@@ -3149,7 +3271,7 @@ ngx_http_proxy_merge_headers(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *conf,
                     + src[i].key.len + sizeof(": ") - 1 + sizeof(uintptr_t) - 1)
                     & ~(sizeof(uintptr_t) - 1);
 
-            copy = ngx_array_push_n(conf->headers_set, size);
+            copy = ngx_array_push_n(headers->values, size);
             if (copy == NULL) {
                 return NGX_ERROR;
             }
@@ -3166,16 +3288,16 @@ ngx_http_proxy_merge_headers(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *conf,
 
             sc.cf = cf;
             sc.source = &src[i].value;
-            sc.flushes = &conf->flushes;
-            sc.lengths = &conf->headers_set_len;
-            sc.values = &conf->headers_set;
+            sc.flushes = &headers->flushes;
+            sc.lengths = &headers->lengths;
+            sc.values = &headers->values;
 
             if (ngx_http_script_compile(&sc) != NGX_OK) {
                 return NGX_ERROR;
             }
 
 
-            copy = ngx_array_push_n(conf->headers_set_len,
+            copy = ngx_array_push_n(headers->lengths,
                                     sizeof(ngx_http_script_copy_code_t));
             if (copy == NULL) {
                 return NGX_ERROR;
@@ -3190,7 +3312,7 @@ ngx_http_proxy_merge_headers(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *conf,
                     + sizeof(CRLF) - 1 + sizeof(uintptr_t) - 1)
                     & ~(sizeof(uintptr_t) - 1);
 
-            copy = ngx_array_push_n(conf->headers_set, size);
+            copy = ngx_array_push_n(headers->values, size);
             if (copy == NULL) {
                 return NGX_ERROR;
             }
@@ -3202,14 +3324,14 @@ ngx_http_proxy_merge_headers(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *conf,
             *p++ = CR; *p = LF;
         }
 
-        code = ngx_array_push_n(conf->headers_set_len, sizeof(uintptr_t));
+        code = ngx_array_push_n(headers->lengths, sizeof(uintptr_t));
         if (code == NULL) {
             return NGX_ERROR;
         }
 
         *code = (uintptr_t) NULL;
 
-        code = ngx_array_push_n(conf->headers_set, sizeof(uintptr_t));
+        code = ngx_array_push_n(headers->values, sizeof(uintptr_t));
         if (code == NULL) {
             return NGX_ERROR;
         }
@@ -3217,7 +3339,7 @@ ngx_http_proxy_merge_headers(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *conf,
         *code = (uintptr_t) NULL;
     }
 
-    code = ngx_array_push_n(conf->headers_set_len, sizeof(uintptr_t));
+    code = ngx_array_push_n(headers->lengths, sizeof(uintptr_t));
     if (code == NULL) {
         return NGX_ERROR;
     }
@@ -3225,7 +3347,7 @@ ngx_http_proxy_merge_headers(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *conf,
     *code = (uintptr_t) NULL;
 
 
-    hash.hash = &conf->headers_set_hash;
+    hash.hash = &headers->hash;
     hash.key = ngx_hash_key_lc;
     hash.max_size = conf->headers_hash_max_size;
     hash.bucket_size = conf->headers_hash_bucket_size;
@@ -3724,9 +3846,7 @@ ngx_http_proxy_store(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     ngx_str_t                  *value;
     ngx_http_script_compile_t   sc;
 
-    if (plcf->upstream.store != NGX_CONF_UNSET
-        || plcf->upstream.store_lengths)
-    {
+    if (plcf->upstream.store != NGX_CONF_UNSET) {
         return "is duplicate";
     }
 
@@ -3738,17 +3858,14 @@ ngx_http_proxy_store(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     }
 
 #if (NGX_HTTP_CACHE)
-
-    if (plcf->upstream.cache != NGX_CONF_UNSET_PTR
-        && plcf->upstream.cache != NULL)
-    {
+    if (plcf->upstream.cache > 0) {
         return "is incompatible with \"proxy_cache\"";
     }
-
 #endif
 
+    plcf->upstream.store = 1;
+
     if (ngx_strcmp(value[1].data, "on") == 0) {
-        plcf->upstream.store = 1;
         return NGX_CONF_OK;
     }
 
@@ -3780,26 +3897,53 @@ ngx_http_proxy_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 {
     ngx_http_proxy_loc_conf_t *plcf = conf;
 
-    ngx_str_t  *value;
+    ngx_str_t                         *value;
+    ngx_http_complex_value_t           cv;
+    ngx_http_compile_complex_value_t   ccv;
 
     value = cf->args->elts;
 
-    if (plcf->upstream.cache != NGX_CONF_UNSET_PTR) {
+    if (plcf->upstream.cache != NGX_CONF_UNSET) {
         return "is duplicate";
     }
 
     if (ngx_strcmp(value[1].data, "off") == 0) {
-        plcf->upstream.cache = NULL;
+        plcf->upstream.cache = 0;
         return NGX_CONF_OK;
     }
 
-    if (plcf->upstream.store > 0 || plcf->upstream.store_lengths) {
+    if (plcf->upstream.store > 0) {
         return "is incompatible with \"proxy_store\"";
     }
 
-    plcf->upstream.cache = ngx_shared_memory_add(cf, &value[1], 0,
-                                                 &ngx_http_proxy_module);
-    if (plcf->upstream.cache == NULL) {
+    plcf->upstream.cache = 1;
+
+    ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t));
+
+    ccv.cf = cf;
+    ccv.value = &value[1];
+    ccv.complex_value = &cv;
+
+    if (ngx_http_compile_complex_value(&ccv) != NGX_OK) {
+        return NGX_CONF_ERROR;
+    }
+
+    if (cv.lengths != NULL) {
+
+        plcf->upstream.cache_value = ngx_palloc(cf->pool,
+                                             sizeof(ngx_http_complex_value_t));
+        if (plcf->upstream.cache_value == NULL) {
+            return NGX_CONF_ERROR;
+        }
+
+        *plcf->upstream.cache_value = cv;
+
+        return NGX_CONF_OK;
+    }
+
+    plcf->upstream.cache_zone = ngx_shared_memory_add(cf, &value[1], 0,
+                                                      &ngx_http_proxy_module);
+    if (plcf->upstream.cache_zone == NULL) {
         return NGX_CONF_ERROR;
     }
 
@@ -3837,6 +3981,33 @@ ngx_http_proxy_cache_key(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 #endif
 
 
+#if (NGX_HTTP_SSL)
+
+static char *
+ngx_http_proxy_ssl_password_file(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
+{
+    ngx_http_proxy_loc_conf_t *plcf = conf;
+
+    ngx_str_t  *value;
+
+    if (plcf->ssl_passwords != NGX_CONF_UNSET_PTR) {
+        return "is duplicate";
+    }
+
+    value = cf->args->elts;
+
+    plcf->ssl_passwords = ngx_ssl_read_password_file(cf, &value[1]);
+
+    if (plcf->ssl_passwords == NULL) {
+        return NGX_CONF_ERROR;
+    }
+
+    return NGX_CONF_OK;
+}
+
+#endif
+
+
 static char *
 ngx_http_proxy_lowat_check(ngx_conf_t *cf, void *post, void *data)
 {
@@ -3894,6 +4065,23 @@ ngx_http_proxy_set_ssl(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *plcf)
     cln->handler = ngx_ssl_cleanup_ctx;
     cln->data = plcf->upstream.ssl;
 
+    if (plcf->ssl_certificate.len) {
+
+        if (plcf->ssl_certificate_key.len == 0) {
+            ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
+                          "no \"proxy_ssl_certificate_key\" is defined "
+                          "for certificate \"%V\"", &plcf->ssl_certificate);
+            return NGX_ERROR;
+        }
+
+        if (ngx_ssl_certificate(cf, plcf->upstream.ssl, &plcf->ssl_certificate,
+                                &plcf->ssl_certificate_key, plcf->ssl_passwords)
+            != NGX_OK)
+        {
+            return NGX_ERROR;
+        }
+    }
+
     if (SSL_CTX_set_cipher_list(plcf->upstream.ssl->ctx,
                                 (const char *) plcf->ssl_ciphers.data)
         == 0)

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/http/modules/ngx_http_scgi_module.c (+207 -121) 88%
===================================================================
--- vendor/nginx-1.7.7/src/http/modules/ngx_http_scgi_module.c    2015-02-09 04:43:41 +0900 (71dcd34)
+++ vendor/nginx-1.7.9/src/http/modules/ngx_http_scgi_module.c    2015-02-09 04:48:38 +0900 (33c23a5)
@@ -12,15 +12,27 @@
 
 
 typedef struct {
-    ngx_http_upstream_conf_t   upstream;
+    ngx_array_t                caches;  /* ngx_http_file_cache_t * */
+} ngx_http_scgi_main_conf_t;
+
 
+typedef struct {
     ngx_array_t               *flushes;
-    ngx_array_t               *params_len;
-    ngx_array_t               *params;
-    ngx_array_t               *params_source;
+    ngx_array_t               *lengths;
+    ngx_array_t               *values;
+    ngx_uint_t                 number;
+    ngx_hash_t                 hash;
+} ngx_http_scgi_params_t;
 
-    ngx_hash_t                 headers_hash;
-    ngx_uint_t                 header_params;
+
+typedef struct {
+    ngx_http_upstream_conf_t   upstream;
+
+    ngx_http_scgi_params_t     params;
+#if (NGX_HTTP_CACHE)
+    ngx_http_scgi_params_t     params_cache;
+#endif
+    ngx_array_t               *params_source;
 
     ngx_array_t               *scgi_lengths;
     ngx_array_t               *scgi_values;
@@ -40,11 +52,13 @@ static ngx_int_t ngx_http_scgi_process_header(ngx_http_request_t *r);
 static void ngx_http_scgi_abort_request(ngx_http_request_t *r);
 static void ngx_http_scgi_finalize_request(ngx_http_request_t *r, ngx_int_t rc);
 
+static void *ngx_http_scgi_create_main_conf(ngx_conf_t *cf);
 static void *ngx_http_scgi_create_loc_conf(ngx_conf_t *cf);
 static char *ngx_http_scgi_merge_loc_conf(ngx_conf_t *cf, void *parent,
     void *child);
-static ngx_int_t ngx_http_scgi_merge_params(ngx_conf_t *cf,
-    ngx_http_scgi_loc_conf_t *conf, ngx_http_scgi_loc_conf_t *prev);
+static ngx_int_t ngx_http_scgi_init_params(ngx_conf_t *cf,
+    ngx_http_scgi_loc_conf_t *conf, ngx_http_scgi_params_t *params,
+    ngx_keyval_t *default_params);
 
 static char *ngx_http_scgi_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
 static char *ngx_http_scgi_store(ngx_conf_t *cf, ngx_command_t *cmd,
@@ -216,8 +230,8 @@ static ngx_command_t ngx_http_scgi_commands[] = {
     { ngx_string("scgi_cache_path"),
       NGX_HTTP_MAIN_CONF|NGX_CONF_2MORE,
       ngx_http_file_cache_set_slot,
-      0,
-      0,
+      NGX_HTTP_MAIN_CONF_OFFSET,
+      offsetof(ngx_http_scgi_main_conf_t, caches),
       &ngx_http_scgi_module },
 
     { ngx_string("scgi_cache_bypass"),
@@ -276,6 +290,13 @@ static ngx_command_t ngx_http_scgi_commands[] = {
       offsetof(ngx_http_scgi_loc_conf_t, upstream.cache_lock_timeout),
       NULL },
 
+    { ngx_string("scgi_cache_lock_age"),
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+      ngx_conf_set_msec_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(ngx_http_scgi_loc_conf_t, upstream.cache_lock_age),
+      NULL },
+
     { ngx_string("scgi_cache_revalidate"),
       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
       ngx_conf_set_flag_slot,
@@ -363,7 +384,7 @@ static ngx_http_module_t ngx_http_scgi_module_ctx = {
     NULL,                                  /* preconfiguration */
     NULL,                                  /* postconfiguration */
 
-    NULL,                                  /* create main configuration */
+    ngx_http_scgi_create_main_conf,        /* create main configuration */
     NULL,                                  /* init main configuration */
 
     NULL,                                  /* create server configuration */
@@ -425,10 +446,13 @@ static ngx_path_init_t ngx_http_scgi_temp_path = {
 static ngx_int_t
 ngx_http_scgi_handler(ngx_http_request_t *r)
 {
-    ngx_int_t                  rc;
-    ngx_http_status_t         *status;
-    ngx_http_upstream_t       *u;
-    ngx_http_scgi_loc_conf_t  *scf;
+    ngx_int_t                   rc;
+    ngx_http_status_t          *status;
+    ngx_http_upstream_t        *u;
+    ngx_http_scgi_loc_conf_t   *scf;
+#if (NGX_HTTP_CACHE)
+    ngx_http_scgi_main_conf_t  *smcf;
+#endif
 
     if (ngx_http_upstream_create(r) != NGX_OK) {
         return NGX_HTTP_INTERNAL_SERVER_ERROR;
@@ -457,8 +481,12 @@ ngx_http_scgi_handler(ngx_http_request_t *r)
     u->conf = &scf->upstream;
 
 #if (NGX_HTTP_CACHE)
+    smcf = ngx_http_get_module_main_conf(r, ngx_http_scgi_module);
+
+    u->caches = &smcf->caches;
     u->create_key = ngx_http_scgi_create_key;
 #endif
+
     u->create_request = ngx_http_scgi_create_request;
     u->reinit_request = ngx_http_scgi_reinit_request;
     u->process_header = ngx_http_scgi_process_status_line;
@@ -572,6 +600,7 @@ ngx_http_scgi_create_request(ngx_http_request_t *r)
     ngx_chain_t                  *cl, *body;
     ngx_list_part_t              *part;
     ngx_table_elt_t              *header, **ignored;
+    ngx_http_scgi_params_t       *params;
     ngx_http_script_code_pt       code;
     ngx_http_script_engine_t      e, le;
     ngx_http_scgi_loc_conf_t     *scf;
@@ -596,13 +625,19 @@ ngx_http_scgi_create_request(ngx_http_request_t *r)
 
     scf = ngx_http_get_module_loc_conf(r, ngx_http_scgi_module);
 
-    if (scf->params_len) {
+#if (NGX_HTTP_CACHE)
+    params = r->upstream->cacheable ? &scf->params_cache : &scf->params;
+#else
+    params = &scf->params;
+#endif
+
+    if (params->lengths) {
         ngx_memzero(&le, sizeof(ngx_http_script_engine_t));
 
-        ngx_http_script_flush_no_cacheable_variables(r, scf->flushes);
+        ngx_http_script_flush_no_cacheable_variables(r, params->flushes);
         le.flushed = 1;
 
-        le.ip = scf->params_len->elts;
+        le.ip = params->lengths->elts;
         le.request = r;
 
         while (*(uintptr_t *) le.ip) {
@@ -631,7 +666,7 @@ ngx_http_scgi_create_request(ngx_http_request_t *r)
         allocated = 0;
         lowcase_key = NULL;
 
-        if (scf->header_params) {
+        if (params->number) {
             n = 0;
             part = &r->headers_in.headers.part;
 
@@ -661,7 +696,7 @@ ngx_http_scgi_create_request(ngx_http_request_t *r)
                 i = 0;
             }
 
-            if (scf->header_params) {
+            if (params->number) {
                 if (allocated < header[i].key.len) {
                     allocated = header[i].key.len + 16;
                     lowcase_key = ngx_pnalloc(r->pool, allocated);
@@ -686,7 +721,7 @@ ngx_http_scgi_create_request(ngx_http_request_t *r)
                     lowcase_key[n] = ch;
                 }
 
-                if (ngx_hash_find(&scf->headers_hash, hash, lowcase_key, n)) {
+                if (ngx_hash_find(&params->hash, hash, lowcase_key, n)) {
                     ignored[header_params++] = &header[i];
                     continue;
                 }
@@ -714,15 +749,15 @@ ngx_http_scgi_create_request(ngx_http_request_t *r)
     b->last = ngx_sprintf(b->last, "%ui:CONTENT_LENGTH%Z%V%Z",
                           len, &content_length);
 
-    if (scf->params_len) {
+    if (params->lengths) {
         ngx_memzero(&e, sizeof(ngx_http_script_engine_t));
 
-        e.ip = scf->params->elts;
+        e.ip = params->values->elts;
         e.pos = b->last;
         e.request = r;
         e.flushed = 1;
 
-        le.ip = scf->params_len->elts;
+        le.ip = params->lengths->elts;
 
         while (*(uintptr_t *) le.ip) {
 
@@ -1091,6 +1126,29 @@ ngx_http_scgi_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
 
 
 static void *
+ngx_http_scgi_create_main_conf(ngx_conf_t *cf)
+{
+    ngx_http_scgi_main_conf_t  *conf;
+
+    conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_scgi_main_conf_t));
+    if (conf == NULL) {
+        return NULL;
+    }
+
+#if (NGX_HTTP_CACHE)
+    if (ngx_array_init(&conf->caches, cf->pool, 4,
+                       sizeof(ngx_http_file_cache_t *))
+        != NGX_OK)
+    {
+        return NULL;
+    }
+#endif
+
+    return conf;
+}
+
+
+static void *
 ngx_http_scgi_create_loc_conf(ngx_conf_t *cf)
 {
     ngx_http_scgi_loc_conf_t  *conf;
@@ -1126,13 +1184,14 @@ ngx_http_scgi_create_loc_conf(ngx_conf_t *cf)
     conf->upstream.pass_request_body = NGX_CONF_UNSET;
 
 #if (NGX_HTTP_CACHE)
-    conf->upstream.cache = NGX_CONF_UNSET_PTR;
+    conf->upstream.cache = NGX_CONF_UNSET;
     conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT;
     conf->upstream.cache_bypass = NGX_CONF_UNSET_PTR;
     conf->upstream.no_cache = NGX_CONF_UNSET_PTR;
     conf->upstream.cache_valid = NGX_CONF_UNSET_PTR;
     conf->upstream.cache_lock = NGX_CONF_UNSET;
     conf->upstream.cache_lock_timeout = NGX_CONF_UNSET_MSEC;
+    conf->upstream.cache_lock_age = NGX_CONF_UNSET_MSEC;
     conf->upstream.cache_revalidate = NGX_CONF_UNSET;
 #endif
 
@@ -1159,16 +1218,27 @@ ngx_http_scgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
     ngx_http_scgi_loc_conf_t *conf = child;
 
     size_t                        size;
+    ngx_int_t                     rc;
     ngx_hash_init_t               hash;
     ngx_http_core_loc_conf_t     *clcf;
 
-    if (conf->upstream.store != 0) {
+#if (NGX_HTTP_CACHE)
+
+    if (conf->upstream.store > 0) {
+        conf->upstream.cache = 0;
+    }
+
+    if (conf->upstream.cache > 0) {
+        conf->upstream.store = 0;
+    }
+
+#endif
+
+    if (conf->upstream.store == NGX_CONF_UNSET) {
         ngx_conf_merge_value(conf->upstream.store, prev->upstream.store, 0);
 
-        if (conf->upstream.store_lengths == NULL) {
-            conf->upstream.store_lengths = prev->upstream.store_lengths;
-            conf->upstream.store_values = prev->upstream.store_values;
-        }
+        conf->upstream.store_lengths = prev->upstream.store_lengths;
+        conf->upstream.store_values = prev->upstream.store_values;
     }
 
     ngx_conf_merge_uint_value(conf->upstream.store_access,
@@ -1330,13 +1400,18 @@ ngx_http_scgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
 
 #if (NGX_HTTP_CACHE)
 
-    ngx_conf_merge_ptr_value(conf->upstream.cache,
-                              prev->upstream.cache, NULL);
+    if (conf->upstream.cache == NGX_CONF_UNSET) {
+        ngx_conf_merge_value(conf->upstream.cache,
+                              prev->upstream.cache, 0);
 
-    if (conf->upstream.cache && conf->upstream.cache->data == NULL) {
+        conf->upstream.cache_zone = prev->upstream.cache_zone;
+        conf->upstream.cache_value = prev->upstream.cache_value;
+    }
+
+    if (conf->upstream.cache_zone && conf->upstream.cache_zone->data == NULL) {
         ngx_shm_zone_t  *shm_zone;
 
-        shm_zone = conf->upstream.cache;
+        shm_zone = conf->upstream.cache_zone;
 
         ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                            "\"scgi_cache\" zone \"%V\" is unknown",
@@ -1392,6 +1467,9 @@ ngx_http_scgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
     ngx_conf_merge_msec_value(conf->upstream.cache_lock_timeout,
                               prev->upstream.cache_lock_timeout, 5000);
 
+    ngx_conf_merge_msec_value(conf->upstream.cache_lock_age,
+                              prev->upstream.cache_lock_age, 5000);
+
     ngx_conf_merge_value(conf->upstream.cache_revalidate,
                               prev->upstream.cache_revalidate, 0);
 
@@ -1416,85 +1494,83 @@ ngx_http_scgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
         return NGX_CONF_ERROR;
     }
 
-    if (conf->upstream.upstream == NULL) {
-        conf->upstream.upstream = prev->upstream.upstream;
-    }
+    clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
 
-    if (conf->scgi_lengths == NULL) {
+    if (clcf->noname
+        && conf->upstream.upstream == NULL && conf->scgi_lengths == NULL)
+    {
+        conf->upstream.upstream = prev->upstream.upstream;
         conf->scgi_lengths = prev->scgi_lengths;
         conf->scgi_values = prev->scgi_values;
     }
 
-    if (conf->upstream.upstream || conf->scgi_lengths) {
-        clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
-        if (clcf->handler == NULL && clcf->lmt_excpt) {
-            clcf->handler = ngx_http_scgi_handler;
-        }
+    if (clcf->lmt_excpt && clcf->handler == NULL
+        && (conf->upstream.upstream || conf->scgi_lengths))
+    {
+        clcf->handler = ngx_http_scgi_handler;
     }
 
-    if (ngx_http_scgi_merge_params(cf, conf, prev) != NGX_OK) {
+    if (conf->params_source == NULL) {
+        conf->params = prev->params;
+#if (NGX_HTTP_CACHE)
+        conf->params_cache = prev->params_cache;
+#endif
+        conf->params_source = prev->params_source;
+    }
+
+    rc = ngx_http_scgi_init_params(cf, conf, &conf->params, NULL);
+    if (rc != NGX_OK) {
         return NGX_CONF_ERROR;
     }
 
+#if (NGX_HTTP_CACHE)
+
+    if (conf->upstream.cache) {
+        rc = ngx_http_scgi_init_params(cf, conf, &conf->params_cache,
+                                       ngx_http_scgi_cache_headers);
+        if (rc != NGX_OK) {
+            return NGX_CONF_ERROR;
+        }
+    }
+
+#endif
+
     return NGX_CONF_OK;
 }
 
 
 static ngx_int_t
-ngx_http_scgi_merge_params(ngx_conf_t *cf, ngx_http_scgi_loc_conf_t *conf,
-    ngx_http_scgi_loc_conf_t *prev)
+ngx_http_scgi_init_params(ngx_conf_t *cf, ngx_http_scgi_loc_conf_t *conf,
+    ngx_http_scgi_params_t *params, ngx_keyval_t *default_params)
 {
     u_char                       *p;
     size_t                        size;
     uintptr_t                    *code;
     ngx_uint_t                    i, nsrc;
-    ngx_array_t                   headers_names;
-#if (NGX_HTTP_CACHE)
-    ngx_array_t                   params_merged;
-#endif
+    ngx_array_t                   headers_names, params_merged;
+    ngx_keyval_t                 *h;
     ngx_hash_key_t               *hk;
     ngx_hash_init_t               hash;
-    ngx_http_upstream_param_t    *src;
+    ngx_http_upstream_param_t    *src, *s;
     ngx_http_script_compile_t     sc;
     ngx_http_script_copy_code_t  *copy;
 
-    if (conf->params_source == NULL) {
-        conf->params_source = prev->params_source;
-
-        if (prev->headers_hash.buckets
-#if (NGX_HTTP_CACHE)
-            && ((conf->upstream.cache == NULL)
-                == (prev->upstream.cache == NULL))
-#endif
-           )
-        {
-            conf->flushes = prev->flushes;
-            conf->params_len = prev->params_len;
-            conf->params = prev->params;
-            conf->headers_hash = prev->headers_hash;
-            conf->header_params = prev->header_params;
-
-            return NGX_OK;
-        }
+    if (params->hash.buckets) {
+        return NGX_OK;
     }
 
-    if (conf->params_source == NULL
-#if (NGX_HTTP_CACHE)
-        && (conf->upstream.cache == NULL)
-#endif
-       )
-    {
-        conf->headers_hash.buckets = (void *) 1;
+    if (conf->params_source == NULL && default_params == NULL) {
+        params->hash.buckets = (void *) 1;
         return NGX_OK;
     }
 
-    conf->params_len = ngx_array_create(cf->pool, 64, 1);
-    if (conf->params_len == NULL) {
+    params->lengths = ngx_array_create(cf->pool, 64, 1);
+    if (params->lengths == NULL) {
         return NGX_ERROR;
     }
 
-    conf->params = ngx_array_create(cf->pool, 512, 1);
-    if (conf->params == NULL) {
+    params->values = ngx_array_create(cf->pool, 512, 1);
+    if (params->values == NULL) {
         return NGX_ERROR;
     }
 
@@ -1513,12 +1589,7 @@ ngx_http_scgi_merge_params(ngx_conf_t *cf, ngx_http_scgi_loc_conf_t *conf,
         nsrc = 0;
     }
 
-#if (NGX_HTTP_CACHE)
-
-    if (conf->upstream.cache) {
-        ngx_keyval_t               *h;
-        ngx_http_upstream_param_t  *s;
-
+    if (default_params) {
         if (ngx_array_init(&params_merged, cf->temp_pool, 4,
                            sizeof(ngx_http_upstream_param_t))
             != NGX_OK)
@@ -1536,7 +1607,7 @@ ngx_http_scgi_merge_params(ngx_conf_t *cf, ngx_http_scgi_loc_conf_t *conf,
             *s = src[i];
         }
 
-        h = ngx_http_scgi_cache_headers;
+        h = default_params;
 
         while (h->key.len) {
 
@@ -1567,8 +1638,6 @@ ngx_http_scgi_merge_params(ngx_conf_t *cf, ngx_http_scgi_loc_conf_t *conf,
         nsrc = params_merged.nelts;
     }
 
-#endif
-
     for (i = 0; i < nsrc; i++) {
 
         if (src[i].key.len > sizeof("HTTP_") - 1
@@ -1589,7 +1658,7 @@ ngx_http_scgi_merge_params(ngx_conf_t *cf, ngx_http_scgi_loc_conf_t *conf,
             }
         }
 
-        copy = ngx_array_push_n(conf->params_len,
+        copy = ngx_array_push_n(params->lengths,
                                 sizeof(ngx_http_script_copy_code_t));
         if (copy == NULL) {
             return NGX_ERROR;
@@ -1598,7 +1667,7 @@ ngx_http_scgi_merge_params(ngx_conf_t *cf, ngx_http_scgi_loc_conf_t *conf,
         copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code;
         copy->len = src[i].key.len + 1;
 
-        copy = ngx_array_push_n(conf->params_len,
+        copy = ngx_array_push_n(params->lengths,
                                 sizeof(ngx_http_script_copy_code_t));
         if (copy == NULL) {
             return NGX_ERROR;
@@ -1612,7 +1681,7 @@ ngx_http_scgi_merge_params(ngx_conf_t *cf, ngx_http_scgi_loc_conf_t *conf,
                 + src[i].key.len + 1 + sizeof(uintptr_t) - 1)
                & ~(sizeof(uintptr_t) - 1);
 
-        copy = ngx_array_push_n(conf->params, size);
+        copy = ngx_array_push_n(params->values, size);
         if (copy == NULL) {
             return NGX_ERROR;
         }
@@ -1628,15 +1697,15 @@ ngx_http_scgi_merge_params(ngx_conf_t *cf, ngx_http_scgi_loc_conf_t *conf,
 
         sc.cf = cf;
         sc.source = &src[i].value;
-        sc.flushes = &conf->flushes;
-        sc.lengths = &conf->params_len;
-        sc.values = &conf->params;
+        sc.flushes = &params->flushes;
+        sc.lengths = &params->lengths;
+        sc.values = &params->values;
 
         if (ngx_http_script_compile(&sc) != NGX_OK) {
             return NGX_ERROR;
         }
 
-        code = ngx_array_push_n(conf->params_len, sizeof(uintptr_t));
+        code = ngx_array_push_n(params->lengths, sizeof(uintptr_t));
         if (code == NULL) {
             return NGX_ERROR;
         }
@@ -1644,7 +1713,7 @@ ngx_http_scgi_merge_params(ngx_conf_t *cf, ngx_http_scgi_loc_conf_t *conf,
         *code = (uintptr_t) NULL;
 
 
-        code = ngx_array_push_n(conf->params, sizeof(uintptr_t));
+        code = ngx_array_push_n(params->values, sizeof(uintptr_t));
         if (code == NULL) {
             return NGX_ERROR;
         }
@@ -1652,23 +1721,16 @@ ngx_http_scgi_merge_params(ngx_conf_t *cf, ngx_http_scgi_loc_conf_t *conf,
         *code = (uintptr_t) NULL;
     }
 
-    code = ngx_array_push_n(conf->params_len, sizeof(uintptr_t));
-    if (code == NULL) {
-        return NGX_ERROR;
-    }
-
-    *code = (uintptr_t) NULL;
-
-    code = ngx_array_push_n(conf->params, sizeof(uintptr_t));
+    code = ngx_array_push_n(params->lengths, sizeof(uintptr_t));
     if (code == NULL) {
         return NGX_ERROR;
     }
 
     *code = (uintptr_t) NULL;
 
-    conf->header_params = headers_names.nelts;
+    params->number = headers_names.nelts;
 
-    hash.hash = &conf->headers_hash;
+    hash.hash = &params->hash;
     hash.key = ngx_hash_key_lc;
     hash.max_size = 512;
     hash.bucket_size = 64;
@@ -1749,7 +1811,7 @@ ngx_http_scgi_store(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     ngx_str_t                  *value;
     ngx_http_script_compile_t   sc;
 
-    if (scf->upstream.store != NGX_CONF_UNSET || scf->upstream.store_lengths) {
+    if (scf->upstream.store != NGX_CONF_UNSET) {
         return "is duplicate";
     }
 
@@ -1761,17 +1823,14 @@ ngx_http_scgi_store(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     }
 
 #if (NGX_HTTP_CACHE)
-
-    if (scf->upstream.cache != NGX_CONF_UNSET_PTR
-        && scf->upstream.cache != NULL)
-    {
+    if (scf->upstream.cache > 0) {
         return "is incompatible with \"scgi_cache\"";
     }
-
 #endif
 
+    scf->upstream.store = 1;
+
     if (ngx_strcmp(value[1].data, "on") == 0) {
-        scf->upstream.store = 1;
         return NGX_CONF_OK;
     }
 
@@ -1803,26 +1862,53 @@ ngx_http_scgi_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 {
     ngx_http_scgi_loc_conf_t *scf = conf;
 
-    ngx_str_t  *value;
+    ngx_str_t                         *value;
+    ngx_http_complex_value_t           cv;
+    ngx_http_compile_complex_value_t   ccv;
 
     value = cf->args->elts;
 
-    if (scf->upstream.cache != NGX_CONF_UNSET_PTR) {
+    if (scf->upstream.cache != NGX_CONF_UNSET) {
         return "is duplicate";
     }
 
     if (ngx_strcmp(value[1].data, "off") == 0) {
-        scf->upstream.cache = NULL;
+        scf->upstream.cache = 0;
         return NGX_CONF_OK;
     }
 
-    if (scf->upstream.store > 0 || scf->upstream.store_lengths) {
+    if (scf->upstream.store > 0) {
         return "is incompatible with \"scgi_store\"";
     }
 
-    scf->upstream.cache = ngx_shared_memory_add(cf, &value[1], 0,
-                                                &ngx_http_scgi_module);
-    if (scf->upstream.cache == NULL) {
+    scf->upstream.cache = 1;
+
+    ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t));
+
+    ccv.cf = cf;
+    ccv.value = &value[1];
+    ccv.complex_value = &cv;
+
+    if (ngx_http_compile_complex_value(&ccv) != NGX_OK) {
+        return NGX_CONF_ERROR;
+    }
+
+    if (cv.lengths != NULL) {
+
+        scf->upstream.cache_value = ngx_palloc(cf->pool,
+                                             sizeof(ngx_http_complex_value_t));
+        if (scf->upstream.cache_value == NULL) {
+            return NGX_CONF_ERROR;
+        }
+
+        *scf->upstream.cache_value = cv;
+
+        return NGX_CONF_OK;
+    }
+
+    scf->upstream.cache_zone = ngx_shared_memory_add(cf, &value[1], 0,
+                                                     &ngx_http_scgi_module);
+    if (scf->upstream.cache_zone == NULL) {
         return NGX_CONF_ERROR;
     }
 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/http/modules/ngx_http_uwsgi_module.c (+284 -116) 87%
===================================================================
--- vendor/nginx-1.7.7/src/http/modules/ngx_http_uwsgi_module.c    2015-02-09 04:43:41 +0900 (5114782)
+++ vendor/nginx-1.7.9/src/http/modules/ngx_http_uwsgi_module.c    2015-02-09 04:48:38 +0900 (f833d67)
@@ -13,15 +13,27 @@
 
 
 typedef struct {
-    ngx_http_upstream_conf_t   upstream;
+    ngx_array_t                caches;  /* ngx_http_file_cache_t * */
+} ngx_http_uwsgi_main_conf_t;
+
 
+typedef struct {
     ngx_array_t               *flushes;
-    ngx_array_t               *params_len;
-    ngx_array_t               *params;
-    ngx_array_t               *params_source;
+    ngx_array_t               *lengths;
+    ngx_array_t               *values;
+    ngx_uint_t                 number;
+    ngx_hash_t                 hash;
+} ngx_http_uwsgi_params_t;
+
 
-    ngx_hash_t                 headers_hash;
-    ngx_uint_t                 header_params;
+typedef struct {
+    ngx_http_upstream_conf_t   upstream;
+
+    ngx_http_uwsgi_params_t    params;
+#if (NGX_HTTP_CACHE)
+    ngx_http_uwsgi_params_t    params_cache;
+#endif
+    ngx_array_t               *params_source;
 
     ngx_array_t               *uwsgi_lengths;
     ngx_array_t               *uwsgi_values;
@@ -42,6 +54,9 @@ typedef struct {
     ngx_uint_t                 ssl_verify_depth;
     ngx_str_t                  ssl_trusted_certificate;
     ngx_str_t                  ssl_crl;
+    ngx_str_t                  ssl_certificate;
+    ngx_str_t                  ssl_certificate_key;
+    ngx_array_t               *ssl_passwords;
 #endif
 } ngx_http_uwsgi_loc_conf_t;
 
@@ -56,11 +71,13 @@ static void ngx_http_uwsgi_abort_request(ngx_http_request_t *r);
 static void ngx_http_uwsgi_finalize_request(ngx_http_request_t *r,
     ngx_int_t rc);
 
+static void *ngx_http_uwsgi_create_main_conf(ngx_conf_t *cf);
 static void *ngx_http_uwsgi_create_loc_conf(ngx_conf_t *cf);
 static char *ngx_http_uwsgi_merge_loc_conf(ngx_conf_t *cf, void *parent,
     void *child);
-static ngx_int_t ngx_http_uwsgi_merge_params(ngx_conf_t *cf,
-    ngx_http_uwsgi_loc_conf_t *conf, ngx_http_uwsgi_loc_conf_t *prev);
+static ngx_int_t ngx_http_uwsgi_init_params(ngx_conf_t *cf,
+    ngx_http_uwsgi_loc_conf_t *conf, ngx_http_uwsgi_params_t *params,
+    ngx_keyval_t *default_params);
 
 static char *ngx_http_uwsgi_pass(ngx_conf_t *cf, ngx_command_t *cmd,
     void *conf);
@@ -76,6 +93,8 @@ static char *ngx_http_uwsgi_cache_key(ngx_conf_t *cf, ngx_command_t *cmd,
 #endif
 
 #if (NGX_HTTP_SSL)
+static char *ngx_http_uwsgi_ssl_password_file(ngx_conf_t *cf,
+    ngx_command_t *cmd, void *conf);
 static ngx_int_t ngx_http_uwsgi_set_ssl(ngx_conf_t *cf,
     ngx_http_uwsgi_loc_conf_t *uwcf);
 #endif
@@ -271,8 +290,8 @@ static ngx_command_t ngx_http_uwsgi_commands[] = {
     { ngx_string("uwsgi_cache_path"),
       NGX_HTTP_MAIN_CONF|NGX_CONF_2MORE,
       ngx_http_file_cache_set_slot,
-      0,
-      0,
+      NGX_HTTP_MAIN_CONF_OFFSET,
+      offsetof(ngx_http_uwsgi_main_conf_t, caches),
       &ngx_http_uwsgi_module },
 
     { ngx_string("uwsgi_cache_bypass"),
@@ -331,6 +350,13 @@ static ngx_command_t ngx_http_uwsgi_commands[] = {
       offsetof(ngx_http_uwsgi_loc_conf_t, upstream.cache_lock_timeout),
       NULL },
 
+    { ngx_string("uwsgi_cache_lock_age"),
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+      ngx_conf_set_msec_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(ngx_http_uwsgi_loc_conf_t, upstream.cache_lock_age),
+      NULL },
+
     { ngx_string("uwsgi_cache_revalidate"),
       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
       ngx_conf_set_flag_slot,
@@ -482,6 +508,27 @@ static ngx_command_t ngx_http_uwsgi_commands[] = {
       offsetof(ngx_http_uwsgi_loc_conf_t, ssl_crl),
       NULL },
 
+    { ngx_string("uwsgi_ssl_certificate"),
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+      ngx_conf_set_str_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(ngx_http_uwsgi_loc_conf_t, ssl_certificate),
+      NULL },
+
+    { ngx_string("uwsgi_ssl_certificate_key"),
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+      ngx_conf_set_str_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(ngx_http_uwsgi_loc_conf_t, ssl_certificate_key),
+      NULL },
+
+    { ngx_string("uwsgi_ssl_password_file"),
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+      ngx_http_uwsgi_ssl_password_file,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      0,
+      NULL },
+
 #endif
 
       ngx_null_command
@@ -492,7 +539,7 @@ static ngx_http_module_t ngx_http_uwsgi_module_ctx = {
     NULL,                                  /* preconfiguration */
     NULL,                                  /* postconfiguration */
 
-    NULL,                                  /* create main configuration */
+    ngx_http_uwsgi_create_main_conf,       /* create main configuration */
     NULL,                                  /* init main configuration */
 
     NULL,                                  /* create server configuration */
@@ -553,10 +600,13 @@ static ngx_path_init_t ngx_http_uwsgi_temp_path = {
 static ngx_int_t
 ngx_http_uwsgi_handler(ngx_http_request_t *r)
 {
-    ngx_int_t                   rc;
-    ngx_http_status_t          *status;
-    ngx_http_upstream_t        *u;
-    ngx_http_uwsgi_loc_conf_t  *uwcf;
+    ngx_int_t                    rc;
+    ngx_http_status_t           *status;
+    ngx_http_upstream_t         *u;
+    ngx_http_uwsgi_loc_conf_t   *uwcf;
+#if (NGX_HTTP_CACHE)
+    ngx_http_uwsgi_main_conf_t  *uwmcf;
+#endif
 
     if (ngx_http_upstream_create(r) != NGX_OK) {
         return NGX_HTTP_INTERNAL_SERVER_ERROR;
@@ -599,8 +649,12 @@ ngx_http_uwsgi_handler(ngx_http_request_t *r)
     u->conf = &uwcf->upstream;
 
 #if (NGX_HTTP_CACHE)
+    uwmcf = ngx_http_get_module_main_conf(r, ngx_http_uwsgi_module);
+
+    u->caches = &uwmcf->caches;
     u->create_key = ngx_http_uwsgi_create_key;
 #endif
+
     u->create_request = ngx_http_uwsgi_create_request;
     u->reinit_request = ngx_http_uwsgi_reinit_request;
     u->process_header = ngx_http_uwsgi_process_status_line;
@@ -746,6 +800,7 @@ ngx_http_uwsgi_create_request(ngx_http_request_t *r)
     ngx_chain_t                  *cl, *body;
     ngx_list_part_t              *part;
     ngx_table_elt_t              *header, **ignored;
+    ngx_http_uwsgi_params_t      *params;
     ngx_http_script_code_pt       code;
     ngx_http_script_engine_t      e, le;
     ngx_http_uwsgi_loc_conf_t    *uwcf;
@@ -757,13 +812,19 @@ ngx_http_uwsgi_create_request(ngx_http_request_t *r)
 
     uwcf = ngx_http_get_module_loc_conf(r, ngx_http_uwsgi_module);
 
-    if (uwcf->params_len) {
+#if (NGX_HTTP_CACHE)
+    params = r->upstream->cacheable ? &uwcf->params_cache : &uwcf->params;
+#else
+    params = &uwcf->params;
+#endif
+
+    if (params->lengths) {
         ngx_memzero(&le, sizeof(ngx_http_script_engine_t));
 
-        ngx_http_script_flush_no_cacheable_variables(r, uwcf->flushes);
+        ngx_http_script_flush_no_cacheable_variables(r, params->flushes);
         le.flushed = 1;
 
-        le.ip = uwcf->params_len->elts;
+        le.ip = params->lengths->elts;
         le.request = r;
 
         while (*(uintptr_t *) le.ip) {
@@ -792,7 +853,7 @@ ngx_http_uwsgi_create_request(ngx_http_request_t *r)
         allocated = 0;
         lowcase_key = NULL;
 
-        if (uwcf->header_params) {
+        if (params->number) {
             n = 0;
             part = &r->headers_in.headers.part;
 
@@ -822,7 +883,7 @@ ngx_http_uwsgi_create_request(ngx_http_request_t *r)
                 i = 0;
             }
 
-            if (uwcf->header_params) {
+            if (params->number) {
                 if (allocated < header[i].key.len) {
                     allocated = header[i].key.len + 16;
                     lowcase_key = ngx_pnalloc(r->pool, allocated);
@@ -847,7 +908,7 @@ ngx_http_uwsgi_create_request(ngx_http_request_t *r)
                     lowcase_key[n] = ch;
                 }
 
-                if (ngx_hash_find(&uwcf->headers_hash, hash, lowcase_key, n)) {
+                if (ngx_hash_find(&params->hash, hash, lowcase_key, n)) {
                     ignored[header_params++] = &header[i];
                     continue;
                 }
@@ -886,15 +947,15 @@ ngx_http_uwsgi_create_request(ngx_http_request_t *r)
     *b->last++ = (u_char) ((len >> 8) & 0xff);
     *b->last++ = (u_char) uwcf->modifier2;
 
-    if (uwcf->params_len) {
+    if (params->lengths) {
         ngx_memzero(&e, sizeof(ngx_http_script_engine_t));
 
-        e.ip = uwcf->params->elts;
+        e.ip = params->values->elts;
         e.pos = b->last;
         e.request = r;
         e.flushed = 1;
 
-        le.ip = uwcf->params_len->elts;
+        le.ip = params->lengths->elts;
 
         while (*(uintptr_t *) le.ip) {
 
@@ -1268,6 +1329,29 @@ ngx_http_uwsgi_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
 
 
 static void *
+ngx_http_uwsgi_create_main_conf(ngx_conf_t *cf)
+{
+    ngx_http_uwsgi_main_conf_t  *conf;
+
+    conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_uwsgi_main_conf_t));
+    if (conf == NULL) {
+        return NULL;
+    }
+
+#if (NGX_HTTP_CACHE)
+    if (ngx_array_init(&conf->caches, cf->pool, 4,
+                       sizeof(ngx_http_file_cache_t *))
+        != NGX_OK)
+    {
+        return NULL;
+    }
+#endif
+
+    return conf;
+}
+
+
+static void *
 ngx_http_uwsgi_create_loc_conf(ngx_conf_t *cf)
 {
     ngx_http_uwsgi_loc_conf_t  *conf;
@@ -1306,13 +1390,14 @@ ngx_http_uwsgi_create_loc_conf(ngx_conf_t *cf)
     conf->upstream.pass_request_body = NGX_CONF_UNSET;
 
 #if (NGX_HTTP_CACHE)
-    conf->upstream.cache = NGX_CONF_UNSET_PTR;
+    conf->upstream.cache = NGX_CONF_UNSET;
     conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT;
     conf->upstream.cache_bypass = NGX_CONF_UNSET_PTR;
     conf->upstream.no_cache = NGX_CONF_UNSET_PTR;
     conf->upstream.cache_valid = NGX_CONF_UNSET_PTR;
     conf->upstream.cache_lock = NGX_CONF_UNSET;
     conf->upstream.cache_lock_timeout = NGX_CONF_UNSET_MSEC;
+    conf->upstream.cache_lock_age = NGX_CONF_UNSET_MSEC;
     conf->upstream.cache_revalidate = NGX_CONF_UNSET;
 #endif
 
@@ -1326,6 +1411,7 @@ ngx_http_uwsgi_create_loc_conf(ngx_conf_t *cf)
     conf->upstream.ssl_server_name = NGX_CONF_UNSET;
     conf->upstream.ssl_verify = NGX_CONF_UNSET;
     conf->ssl_verify_depth = NGX_CONF_UNSET_UINT;
+    conf->ssl_passwords = NGX_CONF_UNSET_PTR;
 #endif
 
     /* "uwsgi_cyclic_temp_file" is disabled */
@@ -1346,16 +1432,27 @@ ngx_http_uwsgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
     ngx_http_uwsgi_loc_conf_t *conf = child;
 
     size_t                        size;
+    ngx_int_t                     rc;
     ngx_hash_init_t               hash;
     ngx_http_core_loc_conf_t     *clcf;
 
-    if (conf->upstream.store != 0) {
+#if (NGX_HTTP_CACHE)
+
+    if (conf->upstream.store > 0) {
+        conf->upstream.cache = 0;
+    }
+
+    if (conf->upstream.cache > 0) {
+        conf->upstream.store = 0;
+    }
+
+#endif
+
+    if (conf->upstream.store == NGX_CONF_UNSET) {
         ngx_conf_merge_value(conf->upstream.store, prev->upstream.store, 0);
 
-        if (conf->upstream.store_lengths == NULL) {
-            conf->upstream.store_lengths = prev->upstream.store_lengths;
-            conf->upstream.store_values = prev->upstream.store_values;
-        }
+        conf->upstream.store_lengths = prev->upstream.store_lengths;
+        conf->upstream.store_values = prev->upstream.store_values;
     }
 
     ngx_conf_merge_uint_value(conf->upstream.store_access,
@@ -1517,13 +1614,18 @@ ngx_http_uwsgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
 
 #if (NGX_HTTP_CACHE)
 
-    ngx_conf_merge_ptr_value(conf->upstream.cache,
-                              prev->upstream.cache, NULL);
+    if (conf->upstream.cache == NGX_CONF_UNSET) {
+        ngx_conf_merge_value(conf->upstream.cache,
+                              prev->upstream.cache, 0);
 
-    if (conf->upstream.cache && conf->upstream.cache->data == NULL) {
+        conf->upstream.cache_zone = prev->upstream.cache_zone;
+        conf->upstream.cache_value = prev->upstream.cache_value;
+    }
+
+    if (conf->upstream.cache_zone && conf->upstream.cache_zone->data == NULL) {
         ngx_shm_zone_t  *shm_zone;
 
-        shm_zone = conf->upstream.cache;
+        shm_zone = conf->upstream.cache_zone;
 
         ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                            "\"uwsgi_cache\" zone \"%V\" is unknown",
@@ -1579,6 +1681,9 @@ ngx_http_uwsgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
     ngx_conf_merge_msec_value(conf->upstream.cache_lock_timeout,
                               prev->upstream.cache_lock_timeout, 5000);
 
+    ngx_conf_merge_msec_value(conf->upstream.cache_lock_age,
+                              prev->upstream.cache_lock_age, 5000);
+
     ngx_conf_merge_value(conf->upstream.cache_revalidate,
                               prev->upstream.cache_revalidate, 0);
 
@@ -1619,14 +1724,16 @@ ngx_http_uwsgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
                               prev->ssl_trusted_certificate, "");
     ngx_conf_merge_str_value(conf->ssl_crl, prev->ssl_crl, "");
 
+    ngx_conf_merge_str_value(conf->ssl_certificate,
+                              prev->ssl_certificate, "");
+    ngx_conf_merge_str_value(conf->ssl_certificate_key,
+                              prev->ssl_certificate_key, "");
+    ngx_conf_merge_ptr_value(conf->ssl_passwords, prev->ssl_passwords, NULL);
+
     if (conf->ssl && ngx_http_uwsgi_set_ssl(cf, conf) != NGX_OK) {
         return NGX_CONF_ERROR;
     }
 
-    if (conf->upstream.ssl == NULL) {
-        conf->upstream.ssl = prev->upstream.ssl;
-    }
-
 #endif
 
     ngx_conf_merge_str_value(conf->uwsgi_string, prev->uwsgi_string, "");
@@ -1642,88 +1749,91 @@ ngx_http_uwsgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
         return NGX_CONF_ERROR;
     }
 
-    if (conf->upstream.upstream == NULL) {
+    clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
+
+    if (clcf->noname
+        && conf->upstream.upstream == NULL && conf->uwsgi_lengths == NULL)
+    {
         conf->upstream.upstream = prev->upstream.upstream;
-    }
 
-    if (conf->uwsgi_lengths == NULL) {
         conf->uwsgi_lengths = prev->uwsgi_lengths;
         conf->uwsgi_values = prev->uwsgi_values;
+
+#if (NGX_HTTP_SSL)
+        conf->upstream.ssl = prev->upstream.ssl;
+#endif
     }
 
-    if (conf->upstream.upstream || conf->uwsgi_lengths) {
-        clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
-        if (clcf->handler == NULL && clcf->lmt_excpt) {
-            clcf->handler = ngx_http_uwsgi_handler;
-        }
+    if (clcf->lmt_excpt && clcf->handler == NULL
+        && (conf->upstream.upstream || conf->uwsgi_lengths))
+    {
+        clcf->handler = ngx_http_uwsgi_handler;
     }
 
     ngx_conf_merge_uint_value(conf->modifier1, prev->modifier1, 0);
     ngx_conf_merge_uint_value(conf->modifier2, prev->modifier2, 0);
 
-    if (ngx_http_uwsgi_merge_params(cf, conf, prev) != NGX_OK) {
+    if (conf->params_source == NULL) {
+        conf->params = prev->params;
+#if (NGX_HTTP_CACHE)
+        conf->params_cache = prev->params_cache;
+#endif
+        conf->params_source = prev->params_source;
+    }
+
+    rc = ngx_http_uwsgi_init_params(cf, conf, &conf->params, NULL);
+    if (rc != NGX_OK) {
         return NGX_CONF_ERROR;
     }
 
+#if (NGX_HTTP_CACHE)
+
+    if (conf->upstream.cache) {
+        rc = ngx_http_uwsgi_init_params(cf, conf, &conf->params_cache,
+                                        ngx_http_uwsgi_cache_headers);
+        if (rc != NGX_OK) {
+            return NGX_CONF_ERROR;
+        }
+    }
+
+#endif
+
     return NGX_CONF_OK;
 }
 
 
 static ngx_int_t
-ngx_http_uwsgi_merge_params(ngx_conf_t *cf, ngx_http_uwsgi_loc_conf_t *conf,
-    ngx_http_uwsgi_loc_conf_t *prev)
+ngx_http_uwsgi_init_params(ngx_conf_t *cf, ngx_http_uwsgi_loc_conf_t *conf,
+    ngx_http_uwsgi_params_t *params, ngx_keyval_t *default_params)
 {
     u_char                       *p;
     size_t                        size;
     uintptr_t                    *code;
     ngx_uint_t                    i, nsrc;
-    ngx_array_t                   headers_names;
-#if (NGX_HTTP_CACHE)
-    ngx_array_t                   params_merged;
-#endif
+    ngx_array_t                   headers_names, params_merged;
+    ngx_keyval_t                 *h;
     ngx_hash_key_t               *hk;
     ngx_hash_init_t               hash;
-    ngx_http_upstream_param_t    *src;
+    ngx_http_upstream_param_t    *src, *s;
     ngx_http_script_compile_t     sc;
     ngx_http_script_copy_code_t  *copy;
 
-    if (conf->params_source == NULL) {
-        conf->params_source = prev->params_source;
-
-        if (prev->headers_hash.buckets
-#if (NGX_HTTP_CACHE)
-            && ((conf->upstream.cache == NULL)
-                == (prev->upstream.cache == NULL))
-#endif
-           )
-        {
-            conf->flushes = prev->flushes;
-            conf->params_len = prev->params_len;
-            conf->params = prev->params;
-            conf->headers_hash = prev->headers_hash;
-            conf->header_params = prev->header_params;
-
-            return NGX_OK;
-        }
+    if (params->hash.buckets) {
+        return NGX_OK;
     }
 
-    if (conf->params_source == NULL
-#if (NGX_HTTP_CACHE)
-        && (conf->upstream.cache == NULL)
-#endif
-       )
-    {
-        conf->headers_hash.buckets = (void *) 1;
+    if (conf->params_source == NULL && default_params == NULL) {
+        params->hash.buckets = (void *) 1;
         return NGX_OK;
     }
 
-    conf->params_len = ngx_array_create(cf->pool, 64, 1);
-    if (conf->params_len == NULL) {
+    params->lengths = ngx_array_create(cf->pool, 64, 1);
+    if (params->lengths == NULL) {
         return NGX_ERROR;
     }
 
-    conf->params = ngx_array_create(cf->pool, 512, 1);
-    if (conf->params == NULL) {
+    params->values = ngx_array_create(cf->pool, 512, 1);
+    if (params->values == NULL) {
         return NGX_ERROR;
     }
 
@@ -1742,12 +1852,7 @@ ngx_http_uwsgi_merge_params(ngx_conf_t *cf, ngx_http_uwsgi_loc_conf_t *conf,
         nsrc = 0;
     }
 
-#if (NGX_HTTP_CACHE)
-
-    if (conf->upstream.cache) {
-        ngx_keyval_t               *h;
-        ngx_http_upstream_param_t  *s;
-
+    if (default_params) {
         if (ngx_array_init(&params_merged, cf->temp_pool, 4,
                            sizeof(ngx_http_upstream_param_t))
             != NGX_OK)
@@ -1765,7 +1870,7 @@ ngx_http_uwsgi_merge_params(ngx_conf_t *cf, ngx_http_uwsgi_loc_conf_t *conf,
             *s = src[i];
         }
 
-        h = ngx_http_uwsgi_cache_headers;
+        h = default_params;
 
         while (h->key.len) {
 
@@ -1796,8 +1901,6 @@ ngx_http_uwsgi_merge_params(ngx_conf_t *cf, ngx_http_uwsgi_loc_conf_t *conf,
         nsrc = params_merged.nelts;
     }
 
-#endif
-
     for (i = 0; i < nsrc; i++) {
 
         if (src[i].key.len > sizeof("HTTP_") - 1
@@ -1818,7 +1921,7 @@ ngx_http_uwsgi_merge_params(ngx_conf_t *cf, ngx_http_uwsgi_loc_conf_t *conf,
             }
         }
 
-        copy = ngx_array_push_n(conf->params_len,
+        copy = ngx_array_push_n(params->lengths,
                                 sizeof(ngx_http_script_copy_code_t));
         if (copy == NULL) {
             return NGX_ERROR;
@@ -1827,7 +1930,7 @@ ngx_http_uwsgi_merge_params(ngx_conf_t *cf, ngx_http_uwsgi_loc_conf_t *conf,
         copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code;
         copy->len = src[i].key.len;
 
-        copy = ngx_array_push_n(conf->params_len,
+        copy = ngx_array_push_n(params->lengths,
                                 sizeof(ngx_http_script_copy_code_t));
         if (copy == NULL) {
             return NGX_ERROR;
@@ -1841,7 +1944,7 @@ ngx_http_uwsgi_merge_params(ngx_conf_t *cf, ngx_http_uwsgi_loc_conf_t *conf,
                 + src[i].key.len + sizeof(uintptr_t) - 1)
                & ~(sizeof(uintptr_t) - 1);
 
-        copy = ngx_array_push_n(conf->params, size);
+        copy = ngx_array_push_n(params->values, size);
         if (copy == NULL) {
             return NGX_ERROR;
         }
@@ -1857,15 +1960,15 @@ ngx_http_uwsgi_merge_params(ngx_conf_t *cf, ngx_http_uwsgi_loc_conf_t *conf,
 
         sc.cf = cf;
         sc.source = &src[i].value;
-        sc.flushes = &conf->flushes;
-        sc.lengths = &conf->params_len;
-        sc.values = &conf->params;
+        sc.flushes = &params->flushes;
+        sc.lengths = &params->lengths;
+        sc.values = &params->values;
 
         if (ngx_http_script_compile(&sc) != NGX_OK) {
             return NGX_ERROR;
         }
 
-        code = ngx_array_push_n(conf->params_len, sizeof(uintptr_t));
+        code = ngx_array_push_n(params->lengths, sizeof(uintptr_t));
         if (code == NULL) {
             return NGX_ERROR;
         }
@@ -1873,7 +1976,7 @@ ngx_http_uwsgi_merge_params(ngx_conf_t *cf, ngx_http_uwsgi_loc_conf_t *conf,
         *code = (uintptr_t) NULL;
 
 
-        code = ngx_array_push_n(conf->params, sizeof(uintptr_t));
+        code = ngx_array_push_n(params->values, sizeof(uintptr_t));
         if (code == NULL) {
             return NGX_ERROR;
         }
@@ -1881,16 +1984,16 @@ ngx_http_uwsgi_merge_params(ngx_conf_t *cf, ngx_http_uwsgi_loc_conf_t *conf,
         *code = (uintptr_t) NULL;
     }
 
-    code = ngx_array_push_n(conf->params_len, sizeof(uintptr_t));
+    code = ngx_array_push_n(params->lengths, sizeof(uintptr_t));
     if (code == NULL) {
         return NGX_ERROR;
     }
 
     *code = (uintptr_t) NULL;
 
-    conf->header_params = headers_names.nelts;
+    params->number = headers_names.nelts;
 
-    hash.hash = &conf->headers_hash;
+    hash.hash = &params->hash;
     hash.key = ngx_hash_key_lc;
     hash.max_size = 512;
     hash.bucket_size = 64;
@@ -1995,8 +2098,7 @@ ngx_http_uwsgi_store(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     ngx_str_t                  *value;
     ngx_http_script_compile_t   sc;
 
-    if (uwcf->upstream.store != NGX_CONF_UNSET || uwcf->upstream.store_lengths)
-    {
+    if (uwcf->upstream.store != NGX_CONF_UNSET) {
         return "is duplicate";
     }
 
@@ -2009,16 +2111,15 @@ ngx_http_uwsgi_store(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
 #if (NGX_HTTP_CACHE)
 
-    if (uwcf->upstream.cache != NGX_CONF_UNSET_PTR
-        && uwcf->upstream.cache != NULL)
-    {
+    if (uwcf->upstream.cache > 0) {
         return "is incompatible with \"uwsgi_cache\"";
     }
 
 #endif
 
+    uwcf->upstream.store = 1;
+
     if (ngx_strcmp(value[1].data, "on") == 0) {
-        uwcf->upstream.store = 1;
         return NGX_CONF_OK;
     }
 
@@ -2050,26 +2151,53 @@ ngx_http_uwsgi_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 {
     ngx_http_uwsgi_loc_conf_t *uwcf = conf;
 
-    ngx_str_t  *value;
+    ngx_str_t                         *value;
+    ngx_http_complex_value_t           cv;
+    ngx_http_compile_complex_value_t   ccv;
 
     value = cf->args->elts;
 
-    if (uwcf->upstream.cache != NGX_CONF_UNSET_PTR) {
+    if (uwcf->upstream.cache != NGX_CONF_UNSET) {
         return "is duplicate";
     }
 
     if (ngx_strcmp(value[1].data, "off") == 0) {
-        uwcf->upstream.cache = NULL;
+        uwcf->upstream.cache = 0;
         return NGX_CONF_OK;
     }
 
-    if (uwcf->upstream.store > 0 || uwcf->upstream.store_lengths) {
+    if (uwcf->upstream.store > 0) {
         return "is incompatible with \"uwsgi_store\"";
     }
 
-    uwcf->upstream.cache = ngx_shared_memory_add(cf, &value[1], 0,
-                                                 &ngx_http_uwsgi_module);
-    if (uwcf->upstream.cache == NULL) {
+    uwcf->upstream.cache = 1;
+
+    ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t));
+
+    ccv.cf = cf;
+    ccv.value = &value[1];
+    ccv.complex_value = &cv;
+
+    if (ngx_http_compile_complex_value(&ccv) != NGX_OK) {
+        return NGX_CONF_ERROR;
+    }
+
+    if (cv.lengths != NULL) {
+
+        uwcf->upstream.cache_value = ngx_palloc(cf->pool,
+                                             sizeof(ngx_http_complex_value_t));
+        if (uwcf->upstream.cache_value == NULL) {
+            return NGX_CONF_ERROR;
+        }
+
+        *uwcf->upstream.cache_value = cv;
+
+        return NGX_CONF_OK;
+    }
+
+    uwcf->upstream.cache_zone = ngx_shared_memory_add(cf, &value[1], 0,
+                                                      &ngx_http_uwsgi_module);
+    if (uwcf->upstream.cache_zone == NULL) {
         return NGX_CONF_ERROR;
     }
 
@@ -2109,6 +2237,29 @@ ngx_http_uwsgi_cache_key(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
 #if (NGX_HTTP_SSL)
 
+static char *
+ngx_http_uwsgi_ssl_password_file(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
+{
+    ngx_http_uwsgi_loc_conf_t *uwcf = conf;
+
+    ngx_str_t  *value;
+
+    if (uwcf->ssl_passwords != NGX_CONF_UNSET_PTR) {
+        return "is duplicate";
+    }
+
+    value = cf->args->elts;
+
+    uwcf->ssl_passwords = ngx_ssl_read_password_file(cf, &value[1]);
+
+    if (uwcf->ssl_passwords == NULL) {
+        return NGX_CONF_ERROR;
+    }
+
+    return NGX_CONF_OK;
+}
+
+
 static ngx_int_t
 ngx_http_uwsgi_set_ssl(ngx_conf_t *cf, ngx_http_uwsgi_loc_conf_t *uwcf)
 {
@@ -2135,6 +2286,23 @@ ngx_http_uwsgi_set_ssl(ngx_conf_t *cf, ngx_http_uwsgi_loc_conf_t *uwcf)
     cln->handler = ngx_ssl_cleanup_ctx;
     cln->data = uwcf->upstream.ssl;
 
+    if (uwcf->ssl_certificate.len) {
+
+        if (uwcf->ssl_certificate_key.len == 0) {
+            ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
+                          "no \"uwsgi_ssl_certificate_key\" is defined "
+                          "for certificate \"%V\"", &uwcf->ssl_certificate);
+            return NGX_ERROR;
+        }
+
+        if (ngx_ssl_certificate(cf, uwcf->upstream.ssl, &uwcf->ssl_certificate,
+                                &uwcf->ssl_certificate_key, uwcf->ssl_passwords)
+            != NGX_OK)
+        {
+            return NGX_ERROR;
+        }
+    }
+
     if (SSL_CTX_set_cipher_list(uwcf->upstream.ssl->ctx,
                                 (const char *) uwcf->ssl_ciphers.data)
         == 0)

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/http/ngx_http_cache.h (+3 -0) 97%
===================================================================
--- vendor/nginx-1.7.7/src/http/ngx_http_cache.h    2015-02-09 04:43:41 +0900 (f89766d)
+++ vendor/nginx-1.7.9/src/http/ngx_http_cache.h    2015-02-09 04:48:38 +0900 (033882e)
@@ -57,6 +57,7 @@ typedef struct {
     time_t                           valid_sec;
     size_t                           body_start;
     off_t                            fs_size;
+    ngx_msec_t                       lock_time;
 } ngx_http_file_cache_node_t;
 
 
@@ -91,6 +92,8 @@ struct ngx_http_cache_s {
     ngx_http_file_cache_node_t      *node;
 
     ngx_msec_t                       lock_timeout;
+    ngx_msec_t                       lock_age;
+    ngx_msec_t                       lock_time;
     ngx_msec_t                       wait_time;
 
     ngx_event_t                      wait_event;

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

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

  Renamed: vendor/nginx-1.7.9/src/http/ngx_http_core_module.c (+4 -0) 99%
===================================================================
--- vendor/nginx-1.7.7/src/http/ngx_http_core_module.c    2015-02-09 04:43:41 +0900 (3b36f4a)
+++ vendor/nginx-1.7.9/src/http/ngx_http_core_module.c    2015-02-09 04:48:38 +0900 (d8ff53b)
@@ -1973,6 +1973,10 @@ ngx_http_send_response(ngx_http_request_t *r, ngx_uint_t status,
 ngx_int_t
 ngx_http_send_header(ngx_http_request_t *r)
 {
+    if (r->post_action) {
+        return NGX_OK;
+    }
+
     if (r->header_sent) {
         ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
                       "header already sent");

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

  Renamed: vendor/nginx-1.7.9/src/http/ngx_http_file_cache.c (+71 -22) 96%
===================================================================
--- vendor/nginx-1.7.7/src/http/ngx_http_file_cache.c    2015-02-09 04:43:41 +0900 (bc4c806)
+++ vendor/nginx-1.7.9/src/http/ngx_http_file_cache.c    2015-02-09 04:48:38 +0900 (681c913)
@@ -14,6 +14,8 @@
 static ngx_int_t ngx_http_file_cache_lock(ngx_http_request_t *r,
     ngx_http_cache_t *c);
 static void ngx_http_file_cache_lock_wait_handler(ngx_event_t *ev);
+static void ngx_http_file_cache_lock_wait(ngx_http_request_t *r,
+    ngx_http_cache_t *c);
 static ngx_int_t ngx_http_file_cache_read(ngx_http_request_t *r,
     ngx_http_cache_t *c);
 static ssize_t ngx_http_file_cache_aio_read(ngx_http_request_t *r,
@@ -175,6 +177,8 @@ ngx_http_file_cache_new(ngx_http_request_t *r)
     c->file.log = r->connection->log;
     c->file.fd = NGX_INVALID_FILE;
 
+    c->last_modified = -1;
+
     return NGX_OK;
 }
 
@@ -396,13 +400,19 @@ ngx_http_file_cache_lock(ngx_http_request_t *r, ngx_http_cache_t *c)
         return NGX_DECLINED;
     }
 
+    now = ngx_current_msec;
+
     cache = c->file_cache;
 
     ngx_shmtx_lock(&cache->shpool->mutex);
 
-    if (!c->node->updating) {
+    timer = c->node->lock_time - now;
+
+    if (!c->node->updating || (ngx_msec_int_t) timer <= 0) {
         c->node->updating = 1;
+        c->node->lock_time = now + c->lock_age;
         c->updating = 1;
+        c->lock_time = c->node->lock_time;
     }
 
     ngx_shmtx_unlock(&cache->shpool->mutex);
@@ -415,9 +425,11 @@ ngx_http_file_cache_lock(ngx_http_request_t *r, ngx_http_cache_t *c)
         return NGX_DECLINED;
     }
 
-    c->waiting = 1;
+    if (c->lock_timeout == 0) {
+        return NGX_HTTP_CACHE_SCARCE;
+    }
 
-    now = ngx_current_msec;
+    c->waiting = 1;
 
     if (c->wait_time == 0) {
         c->wait_time = now + c->lock_timeout;
@@ -440,24 +452,38 @@ ngx_http_file_cache_lock(ngx_http_request_t *r, ngx_http_cache_t *c)
 static void
 ngx_http_file_cache_lock_wait_handler(ngx_event_t *ev)
 {
-    ngx_uint_t                 wait;
-    ngx_msec_t                 timer;
-    ngx_http_cache_t          *c;
-    ngx_http_request_t        *r;
-    ngx_http_file_cache_t     *cache;
+    ngx_connection_t    *c;
+    ngx_http_request_t  *r;
 
     r = ev->data;
-    c = r->cache;
+    c = r->connection;
+
+    ngx_http_set_log_request(c->log, r);
 
-    ngx_log_debug2(NGX_LOG_DEBUG_HTTP, ev->log, 0,
-                   "http file cache wait handler wt:%M cur:%M",
-                   c->wait_time, ngx_current_msec);
+    ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,
+                   "http file cache wait: \"%V?%V\"", &r->uri, &r->args);
 
-    timer = c->wait_time - ngx_current_msec;
+    ngx_http_file_cache_lock_wait(r, r->cache);
+
+    ngx_http_run_posted_requests(c);
+}
+
+
+static void
+ngx_http_file_cache_lock_wait(ngx_http_request_t *r, ngx_http_cache_t *c)
+{
+    ngx_uint_t              wait;
+    ngx_msec_t              now, timer;
+    ngx_http_file_cache_t  *cache;
+
+    now = ngx_current_msec;
+
+    timer = c->wait_time - now;
 
     if ((ngx_msec_int_t) timer <= 0) {
-        ngx_log_error(NGX_LOG_INFO, ev->log, 0, "cache lock timeout");
-        c->lock = 0;
+        ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+                      "cache lock timeout");
+        c->lock_timeout = 0;
         goto wakeup;
     }
 
@@ -466,14 +492,16 @@ ngx_http_file_cache_lock_wait_handler(ngx_event_t *ev)
 
     ngx_shmtx_lock(&cache->shpool->mutex);
 
-    if (c->node->updating) {
+    timer = c->node->lock_time - now;
+
+    if (c->node->updating && (ngx_msec_int_t) timer > 0) {
         wait = 1;
     }
 
     ngx_shmtx_unlock(&cache->shpool->mutex);
 
     if (wait) {
-        ngx_add_timer(ev, (timer > 500) ? 500 : timer);
+        ngx_add_timer(&c->wait_event, (timer > 500) ? 500 : timer);
         return;
     }
 
@@ -481,7 +509,7 @@ wakeup:
 
     c->waiting = 0;
     r->main->blocked--;
-    r->connection->write->handler(r->connection->write);
+    r->write_event_handler(r);
 }
 
 
@@ -588,6 +616,7 @@ ngx_http_file_cache_read(ngx_http_request_t *r, ngx_http_cache_t *c)
         } else {
             c->node->updating = 1;
             c->updating = 1;
+            c->lock_time = c->node->lock_time;
             rc = NGX_HTTP_CACHE_STALE;
         }
 
@@ -652,15 +681,24 @@ static void
 ngx_http_cache_aio_event_handler(ngx_event_t *ev)
 {
     ngx_event_aio_t     *aio;
+    ngx_connection_t    *c;
     ngx_http_request_t  *r;
 
     aio = ev->data;
     r = aio->data;
+    c = r->connection;
+
+    ngx_http_set_log_request(c->log, r);
+
+    ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,
+                   "http file cache aio: \"%V?%V\"", &r->uri, &r->args);
 
     r->main->blocked--;
     r->aio = 0;
 
-    r->connection->write->handler(r->connection->write);
+    r->write_event_handler(r);
+
+    ngx_http_run_posted_requests(c);
 }
 
 #endif
@@ -1022,7 +1060,6 @@ ngx_http_file_cache_vary_header(ngx_http_request_t *r, ngx_md5_t *md5,
         /* normalize spaces */
 
         p = header[i].value.data;
-        start = p;
         last = p + header[i].value.len;
 
         while (p < last) {
@@ -1454,7 +1491,7 @@ ngx_http_file_cache_free(ngx_http_cache_t *c, ngx_temp_file_t *tf)
     fcn = c->node;
     fcn->count--;
 
-    if (c->updating) {
+    if (c->updating && fcn->lock_time == c->lock_time) {
         fcn->updating = 0;
     }
 
@@ -1995,6 +2032,8 @@ ngx_http_file_cache_valid(ngx_array_t *cache_valid, ngx_uint_t status)
 char *
 ngx_http_file_cache_set_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 {
+    char  *confp = conf;
+
     off_t                   max_size;
     u_char                 *last, *p;
     time_t                  inactive;
@@ -2003,7 +2042,8 @@ ngx_http_file_cache_set_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     ngx_int_t               loader_files;
     ngx_msec_t              loader_sleep, loader_threshold;
     ngx_uint_t              i, n;
-    ngx_http_file_cache_t  *cache;
+    ngx_array_t            *caches;
+    ngx_http_file_cache_t  *cache, **ce;
 
     cache = ngx_pcalloc(cf->pool, sizeof(ngx_http_file_cache_t));
     if (cache == NULL) {
@@ -2215,6 +2255,15 @@ ngx_http_file_cache_set_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     cache->inactive = inactive;
     cache->max_size = max_size;
 
+    caches = (ngx_array_t *) (confp + cmd->offset);
+
+    ce = ngx_array_push(caches);
+    if (ce == NULL) {
+        return NGX_CONF_ERROR;
+    }
+
+    *ce = cache;
+
     return NGX_CONF_OK;
 }
 

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/http/ngx_http_request.c (+2 -6) 99%
===================================================================
--- vendor/nginx-1.7.7/src/http/ngx_http_request.c    2015-02-09 04:43:41 +0900 (18c3b04)
+++ vendor/nginx-1.7.9/src/http/ngx_http_request.c    2015-02-09 04:48:38 +0900 (a07d5e4)
@@ -2169,13 +2169,11 @@ ngx_http_request_handler(ngx_event_t *ev)
 {
     ngx_connection_t    *c;
     ngx_http_request_t  *r;
-    ngx_http_log_ctx_t  *ctx;
 
     c = ev->data;
     r = c->data;
 
-    ctx = c->log->data;
-    ctx->current_request = r;
+    ngx_http_set_log_request(c->log, r);
 
     ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,
                    "http run request: \"%V?%V\"", &r->uri, &r->args);
@@ -2195,7 +2193,6 @@ void
 ngx_http_run_posted_requests(ngx_connection_t *c)
 {
     ngx_http_request_t         *r;
-    ngx_http_log_ctx_t         *ctx;
     ngx_http_posted_request_t  *pr;
 
     for ( ;; ) {
@@ -2215,8 +2212,7 @@ ngx_http_run_posted_requests(ngx_connection_t *c)
 
         r = pr->request;
 
-        ctx = c->log->data;
-        ctx->current_request = r;
+        ngx_http_set_log_request(c->log, r);
 
         ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,
                        "http posted request: \"%V?%V\"", &r->uri, &r->args);

  Renamed: vendor/nginx-1.7.9/src/http/ngx_http_request.h (+4 -0) 99%
===================================================================
--- vendor/nginx-1.7.7/src/http/ngx_http_request.h    2015-02-09 04:43:41 +0900 (f6ea6fb)
+++ vendor/nginx-1.7.9/src/http/ngx_http_request.h    2015-02-09 04:48:38 +0900 (cffab9a)
@@ -595,4 +595,8 @@ extern ngx_http_header_out_t   ngx_http_headers_out[];
     }
 
 
+#define ngx_http_set_log_request(log, r)                                      \
+    ((ngx_http_log_ctx_t *) log->data)->current_request = r
+
+
 #endif /* _NGX_HTTP_REQUEST_H_INCLUDED_ */

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

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

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

  Renamed: vendor/nginx-1.7.9/src/http/ngx_http_spdy.c (+71 -10) 97%
===================================================================
--- vendor/nginx-1.7.7/src/http/ngx_http_spdy.c    2015-02-09 04:43:41 +0900 (3c57882)
+++ vendor/nginx-1.7.9/src/http/ngx_http_spdy.c    2015-02-09 04:48:38 +0900 (6eac932)
@@ -1065,16 +1065,16 @@ ngx_http_spdy_state_headers(ngx_http_spdy_connection_t *sc, u_char *pos,
                                     : Z_OK;
     }
 
-    if (z != Z_OK) {
-        return ngx_http_spdy_state_inflate_error(sc, z);
-    }
-
     ngx_log_debug5(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
                    "spdy inflate out: ni:%p no:%p ai:%ud ao:%ud rc:%d",
                    sc->zstream_in.next_in, sc->zstream_in.next_out,
                    sc->zstream_in.avail_in, sc->zstream_in.avail_out,
                    z);
 
+    if (z != Z_OK) {
+        return ngx_http_spdy_state_inflate_error(sc, z);
+    }
+
     sc->length -= sc->zstream_in.next_in - pos;
     pos = sc->zstream_in.next_in;
 
@@ -1164,6 +1164,12 @@ ngx_http_spdy_state_headers(ngx_http_spdy_connection_t *sc, u_char *pos,
 
                 z = inflate(&sc->zstream_in, Z_NO_FLUSH);
 
+                ngx_log_debug5(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+                           "spdy inflate out: ni:%p no:%p ai:%ud ao:%ud rc:%d",
+                           sc->zstream_in.next_in, sc->zstream_in.next_out,
+                           sc->zstream_in.avail_in, sc->zstream_in.avail_out,
+                           z);
+
                 if (z != Z_OK) {
                     return ngx_http_spdy_state_inflate_error(sc, z);
                 }
@@ -1265,6 +1271,12 @@ ngx_http_spdy_state_headers_skip(ngx_http_spdy_connection_t *sc, u_char *pos,
 
         n = inflate(&sc->zstream_in, Z_NO_FLUSH);
 
+        ngx_log_debug5(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
+                       "spdy inflate out: ni:%p no:%p ai:%ud ao:%ud rc:%d",
+                       sc->zstream_in.next_in, sc->zstream_in.next_out,
+                       sc->zstream_in.avail_in, sc->zstream_in.avail_out,
+                       n);
+
         if (n != Z_OK) {
             return ngx_http_spdy_state_inflate_error(sc, n);
         }
@@ -2648,19 +2660,18 @@ ngx_http_spdy_alloc_large_header_buffer(ngx_http_request_t *r)
     rest = r->header_in->last - r->header_in->pos;
 
     /*
-     * equality is prohibited since one more byte is needed
-     * for null-termination
+     * One more byte is needed for null-termination
+     * and another one for further progress.
      */
-    if (rest >= cscf->large_client_header_buffers.size) {
+    if (rest > cscf->large_client_header_buffers.size - 2) {
         p = r->header_in->pos;
 
         if (rest > NGX_MAX_ERROR_STR - 300) {
             rest = NGX_MAX_ERROR_STR - 300;
-            p[rest++] = '.'; p[rest++] = '.'; p[rest++] = '.';
         }
 
         ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
-                      "client sent too long header name or value: \"%*s\"",
+                      "client sent too long header name or value: \"%*s...\"",
                       rest, p);
 
         return NGX_DECLINED;
@@ -3306,8 +3317,10 @@ ngx_http_spdy_close_stream_handler(ngx_event_t *ev)
 void
 ngx_http_spdy_close_stream(ngx_http_spdy_stream_t *stream, ngx_int_t rc)
 {
+    int                           tcp_nodelay;
     ngx_event_t                  *ev;
-    ngx_connection_t             *fc;
+    ngx_connection_t             *c, *fc;
+    ngx_http_core_loc_conf_t     *clcf;
     ngx_http_spdy_stream_t      **index, *s;
     ngx_http_spdy_srv_conf_t     *sscf;
     ngx_http_spdy_connection_t   *sc;
@@ -3333,6 +3346,54 @@ ngx_http_spdy_close_stream(ngx_http_spdy_stream_t *stream, ngx_int_t rc)
         {
             sc->connection->error = 1;
         }
+
+    } else {
+        c = sc->connection;
+
+        if (c->tcp_nopush == NGX_TCP_NOPUSH_SET) {
+            if (ngx_tcp_push(c->fd) == -1) {
+                ngx_connection_error(c, ngx_socket_errno,
+                                     ngx_tcp_push_n " failed");
+                c->error = 1;
+                tcp_nodelay = 0;
+
+            } else {
+                c->tcp_nopush = NGX_TCP_NOPUSH_UNSET;
+                tcp_nodelay = ngx_tcp_nodelay_and_tcp_nopush ? 1 : 0;
+            }
+
+        } else {
+            tcp_nodelay = 1;
+        }
+
+        clcf = ngx_http_get_module_loc_conf(stream->request,
+                                            ngx_http_core_module);
+
+        if (tcp_nodelay
+            && clcf->tcp_nodelay
+            && c->tcp_nodelay == NGX_TCP_NODELAY_UNSET)
+        {
+            ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "tcp_nodelay");
+
+            if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY,
+                           (const void *) &tcp_nodelay, sizeof(int))
+                == -1)
+            {
+#if (NGX_SOLARIS)
+                /* Solaris returns EINVAL if a socket has been shut down */
+                c->log_error = NGX_ERROR_IGNORE_EINVAL;
+#endif
+
+                ngx_connection_error(c, ngx_socket_errno,
+                                     "setsockopt(TCP_NODELAY) failed");
+
+                c->log_error = NGX_ERROR_INFO;
+                c->error = 1;
+
+            } else {
+                c->tcp_nodelay = NGX_TCP_NODELAY_SET;
+            }
+        }
     }
 
     if (sc->stream == stream) {

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

  Renamed: vendor/nginx-1.7.9/src/http/ngx_http_spdy_filter_module.c (+6 -2) 99%
===================================================================
--- vendor/nginx-1.7.7/src/http/ngx_http_spdy_filter_module.c    2015-02-09 04:43:41 +0900 (d1406a6)
+++ vendor/nginx-1.7.9/src/http/ngx_http_spdy_filter_module.c    2015-02-09 04:48:38 +0900 (377e935)
@@ -493,9 +493,13 @@ ngx_http_spdy_header_filter(ngx_http_request_t *r)
                 continue;
             }
 
-            *last++ = '\0';
+            if (h[j].value.len) {
+                if (last != p) {
+                    *last++ = '\0';
+                }
 
-            last = ngx_cpymem(last, h[j].value.data, h[j].value.len);
+                last = ngx_cpymem(last, h[j].value.data, h[j].value.len);
+            }
 
             h[j].hash = 2;
         }

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

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

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

  Renamed: vendor/nginx-1.7.9/src/http/ngx_http_upstream.c (+110 -36) 97%
===================================================================
--- vendor/nginx-1.7.7/src/http/ngx_http_upstream.c    2015-02-09 04:43:41 +0900 (3e8ce09)
+++ vendor/nginx-1.7.9/src/http/ngx_http_upstream.c    2015-02-09 04:48:38 +0900 (c9a9980)
@@ -13,6 +13,8 @@
 #if (NGX_HTTP_CACHE)
 static ngx_int_t ngx_http_upstream_cache(ngx_http_request_t *r,
     ngx_http_upstream_t *u);
+static ngx_int_t ngx_http_upstream_cache_get(ngx_http_request_t *r,
+    ngx_http_upstream_t *u, ngx_http_file_cache_t **cache);
 static ngx_int_t ngx_http_upstream_cache_send(ngx_http_request_t *r,
     ngx_http_upstream_t *u);
 static ngx_int_t ngx_http_upstream_cache_status(ngx_http_request_t *r,
@@ -540,7 +542,7 @@ ngx_http_upstream_init_request(ngx_http_request_t *r)
 
 #endif
 
-    u->store = (u->conf->store || u->conf->store_lengths);
+    u->store = u->conf->store;
 
     if (!u->store && !r->post_action && !u->conf->ignore_client_abort) {
         r->read_event_handler = ngx_http_upstream_rd_check_broken_connection;
@@ -723,8 +725,9 @@ found:
 static ngx_int_t
 ngx_http_upstream_cache(ngx_http_request_t *r, ngx_http_upstream_t *u)
 {
-    ngx_int_t          rc;
-    ngx_http_cache_t  *c;
+    ngx_int_t               rc;
+    ngx_http_cache_t       *c;
+    ngx_http_file_cache_t  *cache;
 
     c = r->cache;
 
@@ -734,6 +737,12 @@ ngx_http_upstream_cache(ngx_http_request_t *r, ngx_http_upstream_t *u)
             return NGX_DECLINED;
         }
 
+        rc = ngx_http_upstream_cache_get(r, u, &cache);
+
+        if (rc != NGX_OK) {
+            return rc;
+        }
+
         if (r->method & NGX_HTTP_HEAD) {
             u->method = ngx_http_core_get_method;
         }
@@ -763,6 +772,12 @@ ngx_http_upstream_cache(ngx_http_request_t *r, ngx_http_upstream_t *u)
 
         u->cacheable = 1;
 
+        c = r->cache;
+
+        c->body_start = u->conf->buffer_size;
+        c->min_uses = u->conf->cache_min_uses;
+        c->file_cache = cache;
+
         switch (ngx_http_test_predicates(r, u->conf->cache_bypass)) {
 
         case NGX_ERROR:
@@ -776,14 +791,9 @@ ngx_http_upstream_cache(ngx_http_request_t *r, ngx_http_upstream_t *u)
             break;
         }
 
-        c = r->cache;
-
-        c->min_uses = u->conf->cache_min_uses;
-        c->body_start = u->conf->buffer_size;
-        c->file_cache = u->conf->cache->data;
-
         c->lock = u->conf->cache_lock;
         c->lock_timeout = u->conf->cache_lock_timeout;
+        c->lock_age = u->conf->cache_lock_age;
 
         u->cache_status = NGX_HTTP_CACHE_MISS;
     }
@@ -873,6 +883,49 @@ ngx_http_upstream_cache(ngx_http_request_t *r, ngx_http_upstream_t *u)
 
 
 static ngx_int_t
+ngx_http_upstream_cache_get(ngx_http_request_t *r, ngx_http_upstream_t *u,
+    ngx_http_file_cache_t **cache)
+{
+    ngx_str_t               *name, val;
+    ngx_uint_t               i;
+    ngx_http_file_cache_t  **caches;
+
+    if (u->conf->cache_zone) {
+        *cache = u->conf->cache_zone->data;
+        return NGX_OK;
+    }
+
+    if (ngx_http_complex_value(r, u->conf->cache_value, &val) != NGX_OK) {
+        return NGX_ERROR;
+    }
+
+    if (val.len == 0
+        || (val.len == 3 && ngx_strncmp(val.data, "off", 3) == 0))
+    {
+        return NGX_DECLINED;
+    }
+
+    caches = u->caches->elts;
+
+    for (i = 0; i < u->caches->nelts; i++) {
+        name = &caches[i]->shm_zone->shm.name;
+
+        if (name->len == val.len
+            && ngx_strncmp(name->data, val.data, val.len) == 0)
+        {
+            *cache = caches[i];
+            return NGX_OK;
+        }
+    }
+
+    ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
+                  "cache \"%V\" not found", &val);
+
+    return NGX_ERROR;
+}
+
+
+static ngx_int_t
 ngx_http_upstream_cache_send(ngx_http_request_t *r, ngx_http_upstream_t *u)
 {
     ngx_int_t          rc;
@@ -941,6 +994,11 @@ ngx_http_upstream_resolve_handler(ngx_resolver_ctx_t *ctx)
     u = r->upstream;
     ur = u->resolved;
 
+    ngx_http_set_log_request(c->log, r);
+
+    ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,
+                   "http upstream resolve: \"%V?%V\"", &r->uri, &r->args);
+
     if (ctx->state) {
         ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
                       "%V could not be resolved (%i: %s)",
@@ -1002,7 +1060,6 @@ ngx_http_upstream_handler(ngx_event_t *ev)
 {
     ngx_connection_t     *c;
     ngx_http_request_t   *r;
-    ngx_http_log_ctx_t   *ctx;
     ngx_http_upstream_t  *u;
 
     c = ev->data;
@@ -1011,8 +1068,7 @@ ngx_http_upstream_handler(ngx_event_t *ev)
     u = r->upstream;
     c = r->connection;
 
-    ctx = c->log->data;
-    ctx->current_request = r;
+    ngx_http_set_log_request(c->log, r);
 
     ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,
                    "http upstream request: \"%V?%V\"", &r->uri, &r->args);
@@ -1446,6 +1502,8 @@ ngx_http_upstream_ssl_handshake(ngx_connection_t *c)
     r = c->data;
     u = r->upstream;
 
+    ngx_http_set_log_request(c->log, r);
+
     if (c->ssl->handshaked) {
 
         if (u->conf->ssl_verify) {
@@ -2218,19 +2276,26 @@ ngx_http_upstream_process_headers(ngx_http_request_t *r, ngx_http_upstream_t *u)
         }
 
         uri = u->headers_in.x_accel_redirect->value;
-        ngx_str_null(&args);
-        flags = NGX_HTTP_LOG_UNSAFE;
 
-        if (ngx_http_parse_unsafe_uri(r, &uri, &args, &flags) != NGX_OK) {
-            ngx_http_finalize_request(r, NGX_HTTP_NOT_FOUND);
-            return NGX_DONE;
-        }
+        if (uri.data[0] == '@') {
+            ngx_http_named_location(r, &uri);
 
-        if (r->method != NGX_HTTP_HEAD) {
-            r->method = NGX_HTTP_GET;
+        } else {
+            ngx_str_null(&args);
+            flags = NGX_HTTP_LOG_UNSAFE;
+
+            if (ngx_http_parse_unsafe_uri(r, &uri, &args, &flags) != NGX_OK) {
+                ngx_http_finalize_request(r, NGX_HTTP_NOT_FOUND);
+                return NGX_DONE;
+            }
+
+            if (r->method != NGX_HTTP_HEAD) {
+                r->method = NGX_HTTP_GET;
+            }
+
+            ngx_http_internal_redirect(r, &uri, &args);
         }
 
-        ngx_http_internal_redirect(r, &uri, &args);
         ngx_http_finalize_request(r, NGX_DONE);
         return NGX_DONE;
     }
@@ -2523,9 +2588,7 @@ ngx_http_upstream_send_response(ngx_http_request_t *r, ngx_http_upstream_t *u)
 
         if (u->cache_status == NGX_HTTP_CACHE_BYPASS) {
 
-            r->cache->min_uses = u->conf->cache_min_uses;
-            r->cache->body_start = u->conf->buffer_size;
-            r->cache->file_cache = u->conf->cache->data;
+            /* create cache if previously bypassed */
 
             if (ngx_http_file_cache_create(r) != NGX_OK) {
                 ngx_http_upstream_finalize_request(r, u, NGX_ERROR);
@@ -2552,12 +2615,17 @@ ngx_http_upstream_send_response(ngx_http_request_t *r, ngx_http_upstream_t *u)
         }
 
         if (valid) {
-            r->cache->last_modified = u->headers_in.last_modified_time;
             r->cache->date = now;
             r->cache->body_start = (u_short) (u->buffer.pos - u->buffer.start);
 
-            if (u->headers_in.etag) {
-                r->cache->etag = u->headers_in.etag->value;
+            if (u->headers_in.status_n == NGX_HTTP_OK
+                || u->headers_in.status_n == NGX_HTTP_PARTIAL_CONTENT)
+            {
+                r->cache->last_modified = u->headers_in.last_modified_time;
+
+                if (u->headers_in.etag) {
+                    r->cache->etag = u->headers_in.etag->value;
+                }
             }
 
             ngx_http_file_cache_set_header(r, u->buffer.start);
@@ -3926,7 +3994,7 @@ ngx_http_upstream_process_cache_control(ngx_http_request_t *r,
 
 #if (NGX_HTTP_CACHE)
     {
-    u_char     *p, *last;
+    u_char     *p, *start, *last;
     ngx_int_t   n;
 
     if (u->conf->ignore_headers & NGX_HTTP_UPSTREAM_IGN_CACHE_CONTROL) {
@@ -3941,18 +4009,24 @@ ngx_http_upstream_process_cache_control(ngx_http_request_t *r,
         return NGX_OK;
     }
 
-    p = h->value.data;
-    last = p + h->value.len;
+    start = h->value.data;
+    last = start + h->value.len;
 
-    if (ngx_strlcasestrn(p, last, (u_char *) "no-cache", 8 - 1) != NULL
-        || ngx_strlcasestrn(p, last, (u_char *) "no-store", 8 - 1) != NULL
-        || ngx_strlcasestrn(p, last, (u_char *) "private", 7 - 1) != NULL)
+    if (ngx_strlcasestrn(start, last, (u_char *) "no-cache", 8 - 1) != NULL
+        || ngx_strlcasestrn(start, last, (u_char *) "no-store", 8 - 1) != NULL
+        || ngx_strlcasestrn(start, last, (u_char *) "private", 7 - 1) != NULL)
     {
         u->cacheable = 0;
         return NGX_OK;
     }
 
-    p = ngx_strlcasestrn(p, last, (u_char *) "max-age=", 8 - 1);
+    p = ngx_strlcasestrn(start, last, (u_char *) "s-maxage=", 9 - 1);
+    offset = 9;
+
+    if (p == NULL) {
+        p = ngx_strlcasestrn(start, last, (u_char *) "max-age=", 8 - 1);
+        offset = 8;
+    }
 
     if (p == NULL) {
         return NGX_OK;
@@ -3960,7 +4034,7 @@ ngx_http_upstream_process_cache_control(ngx_http_request_t *r,
 
     n = 0;
 
-    for (p += 8; p < last; p++) {
+    for (p += offset; p < last; p++) {
         if (*p == ',' || *p == ';' || *p == ' ') {
             break;
         }
@@ -5521,7 +5595,7 @@ ngx_http_upstream_hide_headers_hash(ngx_conf_t *cf,
 
         if (conf->hide_headers_hash.buckets
 #if (NGX_HTTP_CACHE)
-            && ((conf->cache == NULL) == (prev->cache == NULL))
+            && ((conf->cache == 0) == (prev->cache == 0))
 #endif
            )
         {

  Renamed: vendor/nginx-1.7.9/src/http/ngx_http_upstream.h (+9 -1) 97%
===================================================================
--- vendor/nginx-1.7.7/src/http/ngx_http_upstream.h    2015-02-09 04:43:41 +0900 (0032c2c)
+++ vendor/nginx-1.7.9/src/http/ngx_http_upstream.h    2015-02-09 04:48:38 +0900 (9d2ec93)
@@ -175,7 +175,8 @@ typedef struct {
     ngx_http_upstream_local_t       *local;
 
 #if (NGX_HTTP_CACHE)
-    ngx_shm_zone_t                  *cache;
+    ngx_shm_zone_t                  *cache_zone;
+    ngx_http_complex_value_t        *cache_value;
 
     ngx_uint_t                       cache_min_uses;
     ngx_uint_t                       cache_use_stale;
@@ -183,6 +184,7 @@ typedef struct {
 
     ngx_flag_t                       cache_lock;
     ngx_msec_t                       cache_lock_timeout;
+    ngx_msec_t                       cache_lock_age;
 
     ngx_flag_t                       cache_revalidate;
 
@@ -194,6 +196,9 @@ typedef struct {
     ngx_array_t                     *store_lengths;
     ngx_array_t                     *store_values;
 
+#if (NGX_HTTP_CACHE)
+    signed                           cache:2;
+#endif
     signed                           store:2;
     unsigned                         intercept_404:1;
     unsigned                         change_buffering:1;
@@ -296,6 +301,9 @@ struct ngx_http_upstream_s {
     ngx_chain_writer_ctx_t           writer;
 
     ngx_http_upstream_conf_t        *conf;
+#if (NGX_HTTP_CACHE)
+    ngx_array_t                     *caches;
+#endif
 
     ngx_http_upstream_headers_in_t   headers_in;
 

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/http/ngx_http_write_filter_module.c (+11 -2) 97%
===================================================================
--- vendor/nginx-1.7.7/src/http/ngx_http_write_filter_module.c    2015-02-09 04:43:41 +0900 (b19f75b)
+++ vendor/nginx-1.7.9/src/http/ngx_http_write_filter_module.c    2015-02-09 04:48:38 +0900 (a2db530)
@@ -48,7 +48,7 @@ ngx_int_t
 ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
 {
     off_t                      size, sent, nsent, limit;
-    ngx_uint_t                 last, flush;
+    ngx_uint_t                 last, flush, sync;
     ngx_msec_t                 delay;
     ngx_chain_t               *cl, *ln, **ll, *chain;
     ngx_connection_t          *c;
@@ -62,6 +62,7 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
 
     size = 0;
     flush = 0;
+    sync = 0;
     last = 0;
     ll = &r->out;
 
@@ -105,6 +106,10 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
             flush = 1;
         }
 
+        if (cl->buf->sync) {
+            sync = 1;
+        }
+
         if (cl->buf->last_buf) {
             last = 1;
         }
@@ -157,6 +162,10 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
             flush = 1;
         }
 
+        if (cl->buf->sync) {
+            sync = 1;
+        }
+
         if (cl->buf->last_buf) {
             last = 1;
         }
@@ -188,7 +197,7 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
         && !(c->buffered & NGX_LOWLEVEL_BUFFERED)
         && !(last && c->need_last_buf))
     {
-        if (last || flush) {
+        if (last || flush || sync) {
             for (cl = r->out; cl; /* void */) {
                 ln = cl;
                 cl = cl->next;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/mysql/config (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.7.9/src/mysql/ngx_http_mysql_test.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.7.9/src/mysql/ngx_mysql.c (+0 -0) 100%
===================================================================

  Renamed: vendor/nginx-1.7.9/src/mysql/ngx_mysql.h (+0 -0) 100%
===================================================================

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

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

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

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

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

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

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

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

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

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

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

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

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

  Added: vendor/nginx-1.7.9/src/os/unix/ngx_darwin_sendfile_chain.c (+203 -0) 100644
===================================================================
--- /dev/null
+++ vendor/nginx-1.7.9/src/os/unix/ngx_darwin_sendfile_chain.c    2015-02-09 04:48:38 +0900 (f01651a)
@@ -0,0 +1,203 @@
+
+/*
+ * Copyright (C) Igor Sysoev
+ * Copyright (C) Nginx, Inc.
+ */
+
+
+#include <ngx_config.h>
+#include <ngx_core.h>
+#include <ngx_event.h>
+
+
+/*
+ * It seems that Darwin 9.4 (Mac OS X 1.5) sendfile() has the same
+ * old bug as early FreeBSD sendfile() syscall:
+ * http://bugs.freebsd.org/33771
+ *
+ * Besides sendfile() has another bug: if one calls sendfile()
+ * with both a header and a trailer, then sendfile() ignores a file part
+ * at all and sends only the header and the trailer together.
+ * For this reason we send a trailer only if there is no a header.
+ *
+ * Although sendfile() allows to pass a header or a trailer,
+ * it may send the header or the trailer and a part of the file
+ * in different packets.  And FreeBSD workaround (TCP_NOPUSH option)
+ * does not help.
+ */
+
+
+ngx_chain_t *
+ngx_darwin_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
+{
+    int              rc;
+    off_t            send, prev_send, sent;
+    off_t            file_size;
+    ssize_t          n;
+    ngx_uint_t       eintr;
+    ngx_err_t        err;
+    ngx_buf_t       *file;
+    ngx_event_t     *wev;
+    ngx_chain_t     *cl;
+    ngx_iovec_t      header, trailer;
+    struct sf_hdtr   hdtr;
+    struct iovec     headers[NGX_IOVS_PREALLOCATE];
+    struct iovec     trailers[NGX_IOVS_PREALLOCATE];
+
+    wev = c->write;
+
+    if (!wev->ready) {
+        return in;
+    }
+
+#if (NGX_HAVE_KQUEUE)
+
+    if ((ngx_event_flags & NGX_USE_KQUEUE_EVENT) && wev->pending_eof) {
+        (void) ngx_connection_error(c, wev->kq_errno,
+                               "kevent() reported about an closed connection");
+        wev->error = 1;
+        return NGX_CHAIN_ERROR;
+    }
+
+#endif
+
+    /* the maximum limit size is the maximum size_t value - the page size */
+
+    if (limit == 0 || limit > (off_t) (NGX_MAX_SIZE_T_VALUE - ngx_pagesize)) {
+        limit = NGX_MAX_SIZE_T_VALUE - ngx_pagesize;
+    }
+
+    send = 0;
+
+    header.iovs = headers;
+    header.nalloc = NGX_IOVS_PREALLOCATE;
+
+    trailer.iovs = trailers;
+    trailer.nalloc = NGX_IOVS_PREALLOCATE;
+
+    for ( ;; ) {
+        eintr = 0;
+        prev_send = send;
+
+        /* create the header iovec and coalesce the neighbouring bufs */
+
+        cl = ngx_output_chain_to_iovec(&header, in, limit - send, c->log);
+
+        if (cl == NGX_CHAIN_ERROR) {
+            return NGX_CHAIN_ERROR;
+        }
+
+        send += header.size;
+
+        if (cl && cl->buf->in_file && send < limit) {
+            file = cl->buf;
+
+            /* coalesce the neighbouring file bufs */
+
+            file_size = ngx_chain_coalesce_file(&cl, limit - send);
+
+            send += file_size;
+
+            if (header.count == 0) {
+
+                /*
+                 * create the trailer iovec and coalesce the neighbouring bufs
+                 */
+
+                cl = ngx_output_chain_to_iovec(&trailer, cl, limit - send,
+                                               c->log);
+                if (cl == NGX_CHAIN_ERROR) {
+                    return NGX_CHAIN_ERROR;
+                }
+
+                send += trailer.size;
+            }
+
+            /*
+             * sendfile() returns EINVAL if sf_hdtr's count is 0,
+             * but corresponding pointer is not NULL
+             */
+
+            hdtr.headers = header.count ? header.iovs : NULL;
+            hdtr.hdr_cnt = header.count;
+            hdtr.trailers = trailer.count ? trailer.iovs : NULL;
+            hdtr.trl_cnt = trailer.count;
+
+            sent = header.size + file_size;
+
+            ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0,
+                           "sendfile: @%O %O h:%uz",
+                           file->file_pos, sent, header.size);
+
+            rc = sendfile(file->file->fd, c->fd, file->file_pos,
+                          &sent, &hdtr, 0);
+
+            if (rc == -1) {
+                err = ngx_errno;
+
+                switch (err) {
+                case NGX_EAGAIN:
+                    break;
+
+                case NGX_EINTR:
+                    eintr = 1;
+                    break;
+
+                default:
+                    wev->error = 1;
+                    (void) ngx_connection_error(c, err, "sendfile() failed");
+                    return NGX_CHAIN_ERROR;
+                }
+
+                ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, err,
+                               "sendfile() sent only %O bytes", sent);
+            }
+
+            if (rc == 0 && sent == 0) {
+
+                /*
+                 * if rc and sent equal to zero, then someone
+                 * has truncated the file, so the offset became beyond
+                 * the end of the file
+                 */
+
+                ngx_log_error(NGX_LOG_ALERT, c->log, 0,
+                              "sendfile() reported that \"%s\" was truncated",
+                              file->file->name.data);
+
+                return NGX_CHAIN_ERROR;
+            }
+
+            ngx_log_debug4(NGX_LOG_DEBUG_EVENT, c->log, 0,
+                           "sendfile: %d, @%O %O:%O",
+                           rc, file->file_pos, sent, file_size + header.size);
+
+        } else {
+            n = ngx_writev(c, &header);
+
+            if (n == NGX_ERROR) {
+                return NGX_CHAIN_ERROR;
+            }
+
+            sent = (n == NGX_AGAIN) ? 0 : n;
+        }
+
+        c->sent += sent;
+
+        in = ngx_chain_update_sent(in, sent);
+
+        if (eintr) {
+            send = prev_send + sent;
+            continue;
+        }
+
+        if (send - prev_send != sent) {
+            wev->ready = 0;
+            return in;
+        }
+
+        if (send >= limit || in == NULL) {
+            return in;
+        }
+    }
+}

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/os/unix/ngx_freebsd_sendfile_chain.c (+28 -155) 58%
===================================================================
--- vendor/nginx-1.7.7/src/os/unix/ngx_freebsd_sendfile_chain.c    2015-02-09 04:43:41 +0900 (88eacc2)
+++ vendor/nginx-1.7.9/src/os/unix/ngx_freebsd_sendfile_chain.c    2015-02-09 04:48:38 +0900 (7199c86)
@@ -33,17 +33,16 @@ ngx_chain_t *
 ngx_freebsd_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 {
     int              rc, flags;
-    u_char          *prev;
-    off_t            size, send, prev_send, aligned, sent, fprev;
-    size_t           header_size, file_size;
+    off_t            send, prev_send, sent;
+    size_t           file_size;
+    ssize_t          n;
     ngx_uint_t       eintr, eagain;
     ngx_err_t        err;
     ngx_buf_t       *file;
-    ngx_array_t      header, trailer;
     ngx_event_t     *wev;
     ngx_chain_t     *cl;
+    ngx_iovec_t      header, trailer;
     struct sf_hdtr   hdtr;
-    struct iovec    *iov;
     struct iovec     headers[NGX_IOVS_PREALLOCATE];
     struct iovec     trailers[NGX_IOVS_PREALLOCATE];
 
@@ -74,150 +73,44 @@ ngx_freebsd_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
     eagain = 0;
     flags = 0;
 
-    header.elts = headers;
-    header.size = sizeof(struct iovec);
+    header.iovs = headers;
     header.nalloc = NGX_IOVS_PREALLOCATE;
-    header.pool = c->pool;
 
-    trailer.elts = trailers;
-    trailer.size = sizeof(struct iovec);
+    trailer.iovs = trailers;
     trailer.nalloc = NGX_IOVS_PREALLOCATE;
-    trailer.pool = c->pool;
 
     for ( ;; ) {
-        file = NULL;
-        file_size = 0;
-        header_size = 0;
         eintr = 0;
         prev_send = send;
 
-        header.nelts = 0;
-        trailer.nelts = 0;
-
         /* create the header iovec and coalesce the neighbouring bufs */
 
-        prev = NULL;
-        iov = NULL;
-
-        for (cl = in; cl && send < limit; cl = cl->next) {
-
-            if (ngx_buf_special(cl->buf)) {
-                continue;
-            }
-
-            if (!ngx_buf_in_memory_only(cl->buf)) {
-                break;
-            }
-
-            size = cl->buf->last - cl->buf->pos;
-
-            if (send + size > limit) {
-                size = limit - send;
-            }
+        cl = ngx_output_chain_to_iovec(&header, in, limit - send, c->log);
 
-            if (prev == cl->buf->pos) {
-                iov->iov_len += (size_t) size;
-
-            } else {
-                if (header.nelts >= IOV_MAX){
-                    break;
-                }
-
-                iov = ngx_array_push(&header);
-                if (iov == NULL) {
-                    return NGX_CHAIN_ERROR;
-                }
-
-                iov->iov_base = (void *) cl->buf->pos;
-                iov->iov_len = (size_t) size;
-            }
-
-            prev = cl->buf->pos + (size_t) size;
-            header_size += (size_t) size;
-            send += size;
+        if (cl == NGX_CHAIN_ERROR) {
+            return NGX_CHAIN_ERROR;
         }
 
+        send += header.size;
 
         if (cl && cl->buf->in_file && send < limit) {
             file = cl->buf;
 
             /* coalesce the neighbouring file bufs */
 
-            do {
-                size = cl->buf->file_last - cl->buf->file_pos;
-
-                if (send + size > limit) {
-                    size = limit - send;
-
-                    aligned = (cl->buf->file_pos + size + ngx_pagesize - 1)
-                               & ~((off_t) ngx_pagesize - 1);
-
-                    if (aligned <= cl->buf->file_last) {
-                        size = aligned - cl->buf->file_pos;
-                    }
-                }
-
-                file_size += (size_t) size;
-                send += size;
-                fprev = cl->buf->file_pos + size;
-                cl = cl->next;
-
-            } while (cl
-                     && cl->buf->in_file
-                     && send < limit
-                     && file->file->fd == cl->buf->file->fd
-                     && fprev == cl->buf->file_pos);
-        }
-
+            file_size = (size_t) ngx_chain_coalesce_file(&cl, limit - send);
 
-        if (file) {
+            send += file_size;
 
             /* create the trailer iovec and coalesce the neighbouring bufs */
 
-            prev = NULL;
-            iov = NULL;
-
-            while (cl && send < limit) {
-
-                if (ngx_buf_special(cl->buf)) {
-                    cl = cl->next;
-                    continue;
-                }
-
-                if (!ngx_buf_in_memory_only(cl->buf)) {
-                    break;
-                }
+            cl = ngx_output_chain_to_iovec(&trailer, cl, limit - send, c->log);
 
-                size = cl->buf->last - cl->buf->pos;
-
-                if (send + size > limit) {
-                    size = limit - send;
-                }
-
-                if (prev == cl->buf->pos) {
-                    iov->iov_len += (size_t) size;
-
-                } else {
-                    if (trailer.nelts >= IOV_MAX){
-                        break;
-                    }
-
-                    iov = ngx_array_push(&trailer);
-                    if (iov == NULL) {
-                        return NGX_CHAIN_ERROR;
-                    }
-
-                    iov->iov_base = (void *) cl->buf->pos;
-                    iov->iov_len = (size_t) size;
-                }
-
-                prev = cl->buf->pos + (size_t) size;
-                send += size;
-                cl = cl->next;
+            if (cl == NGX_CHAIN_ERROR) {
+                return NGX_CHAIN_ERROR;
             }
-        }
 
-        if (file) {
+            send += trailer.size;
 
             if (ngx_freebsd_use_tcp_nopush
                 && c->tcp_nopush == NGX_TCP_NOPUSH_UNSET)
@@ -250,10 +143,10 @@ ngx_freebsd_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
              * but corresponding pointer is not NULL
              */
 
-            hdtr.headers = header.nelts ? (struct iovec *) header.elts: NULL;
-            hdtr.hdr_cnt = header.nelts;
-            hdtr.trailers = trailer.nelts ? (struct iovec *) trailer.elts: NULL;
-            hdtr.trl_cnt = trailer.nelts;
+            hdtr.headers = header.count ? header.iovs : NULL;
+            hdtr.hdr_cnt = header.count;
+            hdtr.trailers = trailer.count ? trailer.iovs : NULL;
+            hdtr.trl_cnt = trailer.count;
 
             /*
              * the "nbytes bug" of the old sendfile() syscall:
@@ -261,7 +154,7 @@ ngx_freebsd_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
              */
 
             if (!ngx_freebsd_sendfile_nbytes_bug) {
-                header_size = 0;
+                header.size = 0;
             }
 
             sent = 0;
@@ -271,7 +164,7 @@ ngx_freebsd_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 #endif
 
             rc = sendfile(file->file->fd, c->fd, file->file_pos,
-                          file_size + header_size, &hdtr, &sent, flags);
+                          file_size + header.size, &hdtr, &sent, flags);
 
             if (rc == -1) {
                 err = ngx_errno;
@@ -322,41 +215,21 @@ ngx_freebsd_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 
             ngx_log_debug4(NGX_LOG_DEBUG_EVENT, c->log, 0,
                            "sendfile: %d, @%O %O:%uz",
-                           rc, file->file_pos, sent, file_size + header_size);
+                           rc, file->file_pos, sent, file_size + header.size);
 
         } else {
-            rc = writev(c->fd, header.elts, header.nelts);
-
-            ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                           "writev: %d of %uz", rc, header_size);
-
-            if (rc == -1) {
-                err = ngx_errno;
-
-                switch (err) {
-                case NGX_EAGAIN:
-                    break;
-
-                case NGX_EINTR:
-                    eintr = 1;
-                    break;
-
-                default:
-                    wev->error = 1;
-                    ngx_connection_error(c, err, "writev() failed");
-                    return NGX_CHAIN_ERROR;
-                }
+            n = ngx_writev(c, &header);
 
-                ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, err,
-                               "writev() not ready");
+            if (n == NGX_ERROR) {
+                return NGX_CHAIN_ERROR;
             }
 
-            sent = rc > 0 ? rc : 0;
+            sent = (n == NGX_AGAIN) ? 0 : n;
         }
 
         c->sent += sent;
 
-        in = ngx_handle_sent_chain(in, sent);
+        in = ngx_chain_update_sent(in, sent);
 
 #if (NGX_HAVE_AIO_SENDFILE)
         if (c->busy_sendfile) {

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/os/unix/ngx_linux_sendfile_chain.c (+25 -127) 56%
===================================================================
--- vendor/nginx-1.7.7/src/os/unix/ngx_linux_sendfile_chain.c    2015-02-09 04:43:41 +0900 (60867c5)
+++ vendor/nginx-1.7.9/src/os/unix/ngx_linux_sendfile_chain.c    2015-02-09 04:48:38 +0900 (d696438)
@@ -30,17 +30,17 @@
 ngx_chain_t *
 ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 {
-    int            rc, tcp_nodelay;
-    off_t          size, send, prev_send, aligned, sent, fprev;
-    u_char        *prev;
+    int            tcp_nodelay;
+    off_t          send, prev_send, sent;
     size_t         file_size;
+    ssize_t        n;
     ngx_err_t      err;
     ngx_buf_t     *file;
     ngx_uint_t     eintr;
-    ngx_array_t    header;
     ngx_event_t   *wev;
     ngx_chain_t   *cl;
-    struct iovec  *iov, headers[NGX_IOVS_PREALLOCATE];
+    ngx_iovec_t    header;
+    struct iovec   headers[NGX_IOVS_PREALLOCATE];
 #if (NGX_HAVE_SENDFILE64)
     off_t          offset;
 #else
@@ -63,86 +63,27 @@ ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 
     send = 0;
 
-    header.elts = headers;
-    header.size = sizeof(struct iovec);
+    header.iovs = headers;
     header.nalloc = NGX_IOVS_PREALLOCATE;
-    header.pool = c->pool;
 
     for ( ;; ) {
-        file = NULL;
-        file_size = 0;
         eintr = 0;
         prev_send = send;
 
-        header.nelts = 0;
-
-        prev = NULL;
-        iov = NULL;
-
         /* create the iovec and coalesce the neighbouring bufs */
 
-        for (cl = in; cl && send < limit; cl = cl->next) {
-
-            if (ngx_buf_special(cl->buf)) {
-                continue;
-            }
-
-#if 1
-            if (!ngx_buf_in_memory(cl->buf) && !cl->buf->in_file) {
-                ngx_log_error(NGX_LOG_ALERT, c->log, 0,
-                              "zero size buf in sendfile "
-                              "t:%d r:%d f:%d %p %p-%p %p %O-%O",
-                              cl->buf->temporary,
-                              cl->buf->recycled,
-                              cl->buf->in_file,
-                              cl->buf->start,
-                              cl->buf->pos,
-                              cl->buf->last,
-                              cl->buf->file,
-                              cl->buf->file_pos,
-                              cl->buf->file_last);
-
-                ngx_debug_point();
-
-                return NGX_CHAIN_ERROR;
-            }
-#endif
-
-            if (!ngx_buf_in_memory_only(cl->buf)) {
-                break;
-            }
+        cl = ngx_output_chain_to_iovec(&header, in, limit - send, c->log);
 
-            size = cl->buf->last - cl->buf->pos;
-
-            if (send + size > limit) {
-                size = limit - send;
-            }
-
-            if (prev == cl->buf->pos) {
-                iov->iov_len += (size_t) size;
-
-            } else {
-                if (header.nelts >= IOV_MAX) {
-                    break;
-                }
-
-                iov = ngx_array_push(&header);
-                if (iov == NULL) {
-                    return NGX_CHAIN_ERROR;
-                }
-
-                iov->iov_base = (void *) cl->buf->pos;
-                iov->iov_len = (size_t) size;
-            }
-
-            prev = cl->buf->pos + (size_t) size;
-            send += size;
+        if (cl == NGX_CHAIN_ERROR) {
+            return NGX_CHAIN_ERROR;
         }
 
+        send += header.size;
+
         /* set TCP_CORK if there is a header before a file */
 
         if (c->tcp_nopush == NGX_TCP_NOPUSH_UNSET
-            && header.nelts != 0
+            && header.count != 0
             && cl
             && cl->buf->in_file)
         {
@@ -206,38 +147,14 @@ ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 
         /* get the file buf */
 
-        if (header.nelts == 0 && cl && cl->buf->in_file && send < limit) {
+        if (header.count == 0 && cl && cl->buf->in_file && send < limit) {
             file = cl->buf;
 
             /* coalesce the neighbouring file bufs */
 
-            do {
-                size = cl->buf->file_last - cl->buf->file_pos;
+            file_size = (size_t) ngx_chain_coalesce_file(&cl, limit - send);
 
-                if (send + size > limit) {
-                    size = limit - send;
-
-                    aligned = (cl->buf->file_pos + size + ngx_pagesize - 1)
-                               & ~((off_t) ngx_pagesize - 1);
-
-                    if (aligned <= cl->buf->file_last) {
-                        size = aligned - cl->buf->file_pos;
-                    }
-                }
-
-                file_size += (size_t) size;
-                send += size;
-                fprev = cl->buf->file_pos + size;
-                cl = cl->next;
-
-            } while (cl
-                     && cl->buf->in_file
-                     && send < limit
-                     && file->file->fd == cl->buf->file->fd
-                     && fprev == cl->buf->file_pos);
-        }
-
-        if (file) {
+            send += file_size;
 #if 1
             if (file_size == 0) {
                 ngx_debug_point();
@@ -253,9 +170,9 @@ ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
             ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
                            "sendfile: @%O %uz", file->file_pos, file_size);
 
-            rc = sendfile(c->fd, file->file->fd, &offset, file_size);
+            n = sendfile(c->fd, file->file->fd, &offset, file_size);
 
-            if (rc == -1) {
+            if (n == -1) {
                 err = ngx_errno;
 
                 switch (err) {
@@ -276,44 +193,25 @@ ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
                                "sendfile() is not ready");
             }
 
-            sent = rc > 0 ? rc : 0;
+            sent = n > 0 ? n : 0;
 
             ngx_log_debug4(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                           "sendfile: %d, @%O %O:%uz",
-                           rc, file->file_pos, sent, file_size);
+                           "sendfile: %z, @%O %O:%uz",
+                           n, file->file_pos, sent, file_size);
 
         } else {
-            rc = writev(c->fd, header.elts, header.nelts);
-
-            if (rc == -1) {
-                err = ngx_errno;
-
-                switch (err) {
-                case NGX_EAGAIN:
-                    break;
+            n = ngx_writev(c, &header);
 
-                case NGX_EINTR:
-                    eintr = 1;
-                    break;
-
-                default:
-                    wev->error = 1;
-                    ngx_connection_error(c, err, "writev() failed");
-                    return NGX_CHAIN_ERROR;
-                }
-
-                ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, err,
-                               "writev() not ready");
+            if (n == NGX_ERROR) {
+                return NGX_CHAIN_ERROR;
             }
 
-            sent = rc > 0 ? rc : 0;
-
-            ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, "writev: %O", sent);
+            sent = (n == NGX_AGAIN) ? 0 : n;
         }
 
         c->sent += sent;
 
-        in = ngx_handle_sent_chain(in, sent);
+        in = ngx_chain_update_sent(in, sent);
 
         if (eintr) {
             send = prev_send;

  Renamed: vendor/nginx-1.7.9/src/os/unix/ngx_os.h (+14 -0) 88%
===================================================================
--- vendor/nginx-1.7.7/src/os/unix/ngx_os.h    2015-02-09 04:43:41 +0900 (a158642)
+++ vendor/nginx-1.7.9/src/os/unix/ngx_os.h    2015-02-09 04:48:38 +0900 (09f7917)
@@ -64,6 +64,20 @@ ngx_chain_t *ngx_aio_write_chain(ngx_connection_t *c, ngx_chain_t *in,
 #endif
 
 
+typedef struct {
+    struct iovec  *iovs;
+    ngx_uint_t     count;
+    size_t         size;
+    ngx_uint_t     nalloc;
+} ngx_iovec_t;
+
+ngx_chain_t *ngx_output_chain_to_iovec(ngx_iovec_t *vec, ngx_chain_t *in,
+    size_t limit, ngx_log_t *log);
+
+
+ssize_t ngx_writev(ngx_connection_t *c, ngx_iovec_t *vec);
+
+
 extern ngx_os_io_t  ngx_os_io;
 extern ngx_int_t    ngx_ncpu;
 extern ngx_int_t    ngx_max_sockets;

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/os/unix/ngx_process_cycle.c (+2 -1) 99%
===================================================================
--- vendor/nginx-1.7.7/src/os/unix/ngx_process_cycle.c    2015-02-09 04:43:41 +0900 (6c84ba8)
+++ vendor/nginx-1.7.9/src/os/unix/ngx_process_cycle.c    2015-02-09 04:48:38 +0900 (51cf725)
@@ -809,6 +809,8 @@ ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data)
                 }
             }
 
+            ngx_event_cancel_timers();
+
             if (ngx_event_timer_rbtree.root == ngx_event_timer_rbtree.sentinel)
             {
                 ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "exiting");
@@ -1213,7 +1215,6 @@ ngx_wakeup_worker_threads(ngx_cycle_t *cycle)
 
             /* STUB */
             ngx_done_events(cycle);
-            ngx_mutex_destroy(ngx_event_timer_mutex);
 
             return;
         }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/os/unix/ngx_solaris_sendfilev_chain.c (+8 -19) 86%
===================================================================
--- vendor/nginx-1.7.7/src/os/unix/ngx_solaris_sendfilev_chain.c    2015-02-09 04:43:41 +0900 (1b71f1d)
+++ vendor/nginx-1.7.9/src/os/unix/ngx_solaris_sendfilev_chain.c    2015-02-09 04:48:38 +0900 (7504239)
@@ -48,8 +48,8 @@ ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
     ssize_t         n;
     ngx_int_t       eintr;
     ngx_err_t       err;
+    ngx_uint_t      nsfv;
     sendfilevec_t  *sfv, sfvs[NGX_SENDFILEVECS];
-    ngx_array_t     vec;
     ngx_event_t    *wev;
     ngx_chain_t    *cl;
 
@@ -73,11 +73,6 @@ ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 
     send = 0;
 
-    vec.elts = sfvs;
-    vec.size = sizeof(sendfilevec_t);
-    vec.nalloc = NGX_SENDFILEVECS;
-    vec.pool = c->pool;
-
     for ( ;; ) {
         fd = SFV_FD_SELF;
         prev = NULL;
@@ -87,7 +82,7 @@ ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
         sent = 0;
         prev_send = send;
 
-        vec.nelts = 0;
+        nsfv = 0;
 
         /* create the sendfilevec and coalesce the neighbouring bufs */
 
@@ -110,14 +105,11 @@ ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
                     sfv->sfv_len += (size_t) size;
 
                 } else {
-                    if (vec.nelts >= IOV_MAX) {
+                    if (nsfv == NGX_SENDFILEVECS) {
                         break;
                     }
 
-                    sfv = ngx_array_push(&vec);
-                    if (sfv == NULL) {
-                        return NGX_CHAIN_ERROR;
-                    }
+                    sfv = &sfvs[nsfv++];
 
                     sfv->sfv_fd = SFV_FD_SELF;
                     sfv->sfv_flag = 0;
@@ -148,14 +140,11 @@ ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
                     sfv->sfv_len += (size_t) size;
 
                 } else {
-                    if (vec.nelts >= IOV_MAX) {
+                    if (nsfv == NGX_SENDFILEVECS) {
                         break;
                     }
 
-                    sfv = ngx_array_push(&vec);
-                    if (sfv == NULL) {
-                        return NGX_CHAIN_ERROR;
-                    }
+                    sfv = &sfvs[nsfv++];
 
                     fd = cl->buf->file->fd;
                     sfv->sfv_fd = fd;
@@ -169,7 +158,7 @@ ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
             }
         }
 
-        n = sendfilev(c->fd, vec.elts, vec.nelts, &sent);
+        n = sendfilev(c->fd, sfvs, nsfv, &sent);
 
         if (n == -1) {
             err = ngx_errno;
@@ -197,7 +186,7 @@ ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 
         c->sent += sent;
 
-        in = ngx_handle_sent_chain(in, sent);
+        in = ngx_chain_update_sent(in, sent);
 
         if (eintr) {
             send = prev_send + sent;

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

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

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

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

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

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

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

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

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

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

  Added: vendor/nginx-1.7.9/src/os/unix/ngx_writev_chain.c (+216 -0) 100644
===================================================================
--- /dev/null
+++ vendor/nginx-1.7.9/src/os/unix/ngx_writev_chain.c    2015-02-09 04:48:38 +0900 (e38a3aa)
@@ -0,0 +1,216 @@
+
+/*
+ * Copyright (C) Igor Sysoev
+ * Copyright (C) Nginx, Inc.
+ */
+
+
+#include <ngx_config.h>
+#include <ngx_core.h>
+#include <ngx_event.h>
+
+
+ngx_chain_t *
+ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
+{
+    ssize_t        n, sent;
+    off_t          send, prev_send;
+    ngx_chain_t   *cl;
+    ngx_event_t   *wev;
+    ngx_iovec_t    vec;
+    struct iovec   iovs[NGX_IOVS_PREALLOCATE];
+
+    wev = c->write;
+
+    if (!wev->ready) {
+        return in;
+    }
+
+#if (NGX_HAVE_KQUEUE)
+
+    if ((ngx_event_flags & NGX_USE_KQUEUE_EVENT) && wev->pending_eof) {
+        (void) ngx_connection_error(c, wev->kq_errno,
+                               "kevent() reported about an closed connection");
+        wev->error = 1;
+        return NGX_CHAIN_ERROR;
+    }
+
+#endif
+
+    /* the maximum limit size is the maximum size_t value - the page size */
+
+    if (limit == 0 || limit > (off_t) (NGX_MAX_SIZE_T_VALUE - ngx_pagesize)) {
+        limit = NGX_MAX_SIZE_T_VALUE - ngx_pagesize;
+    }
+
+    send = 0;
+
+    vec.iovs = iovs;
+    vec.nalloc = NGX_IOVS_PREALLOCATE;
+
+    for ( ;; ) {
+        prev_send = send;
+
+        /* create the iovec and coalesce the neighbouring bufs */
+
+        cl = ngx_output_chain_to_iovec(&vec, in, limit - send, c->log);
+
+        if (cl == NGX_CHAIN_ERROR) {
+            return NGX_CHAIN_ERROR;
+        }
+
+        if (cl && cl->buf->in_file) {
+            ngx_log_error(NGX_LOG_ALERT, c->log, 0,
+                          "file buf in writev "
+                          "t:%d r:%d f:%d %p %p-%p %p %O-%O",
+                          cl->buf->temporary,
+                          cl->buf->recycled,
+                          cl->buf->in_file,
+                          cl->buf->start,
+                          cl->buf->pos,
+                          cl->buf->last,
+                          cl->buf->file,
+                          cl->buf->file_pos,
+                          cl->buf->file_last);
+
+            ngx_debug_point();
+
+            return NGX_CHAIN_ERROR;
+        }
+
+        send += vec.size;
+
+        n = ngx_writev(c, &vec);
+
+        if (n == NGX_ERROR) {
+            return NGX_CHAIN_ERROR;
+        }
+
+        sent = (n == NGX_AGAIN) ? 0 : n;
+
+        c->sent += sent;
+
+        in = ngx_chain_update_sent(in, sent);
+
+        if (send - prev_send != sent) {
+            wev->ready = 0;
+            return in;
+        }
+
+        if (send >= limit || in == NULL) {
+            return in;
+        }
+    }
+}
+
+
+ngx_chain_t *
+ngx_output_chain_to_iovec(ngx_iovec_t *vec, ngx_chain_t *in, size_t limit,
+    ngx_log_t *log)
+{
+    size_t         total, size;
+    u_char        *prev;
+    ngx_uint_t     n;
+    struct iovec  *iov;
+
+    iov = NULL;
+    prev = NULL;
+    total = 0;
+    n = 0;
+
+    for ( /* void */ ; in && total < limit; in = in->next) {
+
+        if (ngx_buf_special(in->buf)) {
+            continue;
+        }
+
+        if (in->buf->in_file) {
+            break;
+        }
+
+        if (!ngx_buf_in_memory(in->buf)) {
+            ngx_log_error(NGX_LOG_ALERT, log, 0,
+                          "bad buf in output chain "
+                          "t:%d r:%d f:%d %p %p-%p %p %O-%O",
+                          in->buf->temporary,
+                          in->buf->recycled,
+                          in->buf->in_file,
+                          in->buf->start,
+                          in->buf->pos,
+                          in->buf->last,
+                          in->buf->file,
+                          in->buf->file_pos,
+                          in->buf->file_last);
+
+            ngx_debug_point();
+
+            return NGX_CHAIN_ERROR;
+        }
+
+        size = in->buf->last - in->buf->pos;
+
+        if (size > limit - total) {
+            size = limit - total;
+        }
+
+        if (prev == in->buf->pos) {
+            iov->iov_len += size;
+
+        } else {
+            if (n == vec->nalloc) {
+                break;
+            }
+
+            iov = &vec->iovs[n++];
+
+            iov->iov_base = (void *) in->buf->pos;
+            iov->iov_len = size;
+        }
+
+        prev = in->buf->pos + size;
+        total += size;
+    }
+
+    vec->count = n;
+    vec->size = total;
+
+    return in;
+}
+
+
+ssize_t
+ngx_writev(ngx_connection_t *c, ngx_iovec_t *vec)
+{
+    ssize_t    n;
+    ngx_err_t  err;
+
+eintr:
+
+    n = writev(c->fd, vec->iovs, vec->count);
+
+    ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
+                   "writev: %z of %uz", n, vec->size);
+
+    if (n == -1) {
+        err = ngx_errno;
+
+        switch (err) {
+        case NGX_EAGAIN:
+            ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, err,
+                           "writev() not ready");
+            return NGX_AGAIN;
+
+        case NGX_EINTR:
+            ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, err,
+                           "writev() was interrupted");
+            goto eintr;
+
+        default:
+            c->write->error = 1;
+            ngx_connection_error(c, err, "writev() failed");
+            return NGX_ERROR;
+        }
+    }
+
+    return n;
+}

  Renamed: vendor/nginx-1.7.9/src/os/unix/rfork_thread.S (+0 -0) 100%
===================================================================

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/os/win32/ngx_process_cycle.c (+2 -0) 99%
===================================================================
--- vendor/nginx-1.7.7/src/os/win32/ngx_process_cycle.c    2015-02-09 04:43:41 +0900 (183efc8)
+++ vendor/nginx-1.7.9/src/os/win32/ngx_process_cycle.c    2015-02-09 04:48:38 +0900 (7bfb281)
@@ -821,6 +821,8 @@ ngx_worker_thread(void *data)
                 }
             }
 
+            ngx_event_cancel_timers();
+
             if (ngx_event_timer_rbtree.root
                 == ngx_event_timer_rbtree.sentinel)
             {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Renamed: vendor/nginx-1.7.9/src/os/win32/ngx_wsasend_chain.c (+2 -2) 98%
===================================================================
--- vendor/nginx-1.7.7/src/os/win32/ngx_wsasend_chain.c    2015-02-09 04:43:41 +0900 (a0d438a)
+++ vendor/nginx-1.7.9/src/os/win32/ngx_wsasend_chain.c    2015-02-09 04:48:38 +0900 (0815627)
@@ -113,7 +113,7 @@ ngx_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 
         c->sent += sent;
 
-        in = ngx_handle_sent_chain(in, sent);
+        in = ngx_chain_update_sent(in, sent);
 
         if (send - prev_send != sent) {
             wev->ready = 0;
@@ -279,7 +279,7 @@ ngx_overlapped_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 
     c->sent += sent;
 
-    in = ngx_handle_sent_chain(in, sent);
+    in = ngx_chain_update_sent(in, sent);
 
     if (in) {
         wev->ready = 0;




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