nginxtra 1.4.7.9 → 1.6.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/bin/nginxtra +1 -1
  3. data/bin/nginxtra_rails +1 -1
  4. data/lib/nginxtra/version.rb +1 -1
  5. data/vendor/nginx/CHANGES +286 -19
  6. data/vendor/nginx/CHANGES.ru +296 -22
  7. data/vendor/nginx/auto/cc/clang +4 -3
  8. data/vendor/nginx/auto/cc/conf +23 -0
  9. data/vendor/nginx/auto/cc/msvc +1 -0
  10. data/vendor/nginx/auto/cc/name +1 -1
  11. data/vendor/nginx/auto/cc/owc +4 -4
  12. data/vendor/nginx/auto/cc/sunc +1 -1
  13. data/vendor/nginx/auto/endianness +2 -2
  14. data/vendor/nginx/auto/feature +1 -1
  15. data/vendor/nginx/auto/include +1 -1
  16. data/vendor/nginx/auto/lib/libatomic/make +3 -1
  17. data/vendor/nginx/auto/lib/openssl/conf +4 -0
  18. data/vendor/nginx/auto/lib/openssl/make +1 -1
  19. data/vendor/nginx/auto/lib/pcre/conf +5 -0
  20. data/vendor/nginx/auto/lib/pcre/make +11 -11
  21. data/vendor/nginx/auto/lib/pcre/makefile.bcc +4 -3
  22. data/vendor/nginx/auto/lib/pcre/makefile.msvc +2 -1
  23. data/vendor/nginx/auto/lib/pcre/makefile.owc +2 -1
  24. data/vendor/nginx/auto/lib/perl/make +1 -0
  25. data/vendor/nginx/auto/lib/test +1 -1
  26. data/vendor/nginx/auto/lib/zlib/make +22 -1
  27. data/vendor/nginx/auto/modules +8 -0
  28. data/vendor/nginx/auto/options +3 -0
  29. data/vendor/nginx/auto/os/darwin +1 -1
  30. data/vendor/nginx/auto/os/linux +32 -0
  31. data/vendor/nginx/auto/os/win32 +12 -1
  32. data/vendor/nginx/auto/sources +8 -2
  33. data/vendor/nginx/auto/types/sizeof +1 -1
  34. data/vendor/nginx/auto/types/typedef +1 -1
  35. data/vendor/nginx/auto/types/uintptr_t +1 -1
  36. data/vendor/nginx/auto/unix +13 -1
  37. data/vendor/nginx/conf/mime.types +11 -2
  38. data/vendor/nginx/conf/nginx.conf +3 -4
  39. data/vendor/nginx/contrib/README +6 -0
  40. data/vendor/nginx/contrib/vim/ftdetect/nginx.vim +4 -0
  41. data/vendor/nginx/contrib/vim/indent/nginx.vim +11 -0
  42. data/vendor/nginx/contrib/vim/syntax/nginx.vim +703 -0
  43. data/vendor/nginx/src/core/nginx.c +2 -7
  44. data/vendor/nginx/src/core/nginx.h +2 -2
  45. data/vendor/nginx/src/core/ngx_conf_file.c +8 -88
  46. data/vendor/nginx/src/core/ngx_conf_file.h +3 -3
  47. data/vendor/nginx/src/core/ngx_config.h +2 -2
  48. data/vendor/nginx/src/core/ngx_connection.c +100 -29
  49. data/vendor/nginx/src/core/ngx_connection.h +11 -0
  50. data/vendor/nginx/src/core/ngx_core.h +1 -0
  51. data/vendor/nginx/src/core/ngx_cycle.c +23 -99
  52. data/vendor/nginx/src/core/ngx_cycle.h +2 -0
  53. data/vendor/nginx/src/core/ngx_file.c +100 -8
  54. data/vendor/nginx/src/core/ngx_file.h +3 -0
  55. data/vendor/nginx/src/core/ngx_hash.c +6 -9
  56. data/vendor/nginx/src/core/ngx_inet.c +93 -5
  57. data/vendor/nginx/src/core/ngx_inet.h +4 -2
  58. data/vendor/nginx/src/core/ngx_list.c +1 -9
  59. data/vendor/nginx/src/core/ngx_log.c +132 -30
  60. data/vendor/nginx/src/core/ngx_log.h +5 -2
  61. data/vendor/nginx/src/core/ngx_open_file_cache.c +67 -1
  62. data/vendor/nginx/src/core/ngx_palloc.c +5 -2
  63. data/vendor/nginx/src/core/ngx_proxy_protocol.c +91 -0
  64. data/vendor/nginx/src/core/ngx_proxy_protocol.h +23 -0
  65. data/vendor/nginx/src/core/ngx_resolver.c +1080 -285
  66. data/vendor/nginx/src/core/ngx_resolver.h +33 -3
  67. data/vendor/nginx/src/core/ngx_slab.c +7 -2
  68. data/vendor/nginx/src/core/ngx_slab.h +2 -0
  69. data/vendor/nginx/src/core/ngx_string.c +78 -13
  70. data/vendor/nginx/src/core/ngx_string.h +2 -0
  71. data/vendor/nginx/src/event/modules/ngx_devpoll_module.c +2 -2
  72. data/vendor/nginx/src/event/modules/ngx_epoll_module.c +13 -5
  73. data/vendor/nginx/src/event/modules/ngx_select_module.c +1 -1
  74. data/vendor/nginx/src/event/modules/ngx_win32_select_module.c +2 -2
  75. data/vendor/nginx/src/event/ngx_event.c +0 -1
  76. data/vendor/nginx/src/event/ngx_event.h +7 -6
  77. data/vendor/nginx/src/event/ngx_event_accept.c +6 -4
  78. data/vendor/nginx/src/event/ngx_event_connect.c +2 -2
  79. data/vendor/nginx/src/event/ngx_event_openssl.c +304 -13
  80. data/vendor/nginx/src/event/ngx_event_openssl.h +20 -1
  81. data/vendor/nginx/src/event/ngx_event_openssl_stapling.c +35 -23
  82. data/vendor/nginx/src/event/ngx_event_pipe.c +15 -30
  83. data/vendor/nginx/src/http/modules/ngx_http_access_module.c +115 -35
  84. data/vendor/nginx/src/http/modules/ngx_http_auth_basic_module.c +1 -1
  85. data/vendor/nginx/src/http/modules/ngx_http_auth_request_module.c +444 -0
  86. data/vendor/nginx/src/http/modules/ngx_http_autoindex_module.c +2 -1
  87. data/vendor/nginx/src/http/modules/ngx_http_charset_filter_module.c +1 -1
  88. data/vendor/nginx/src/http/modules/ngx_http_dav_module.c +1 -3
  89. data/vendor/nginx/src/http/modules/ngx_http_fastcgi_module.c +251 -36
  90. data/vendor/nginx/src/http/modules/ngx_http_gunzip_filter_module.c +9 -5
  91. data/vendor/nginx/src/http/modules/ngx_http_gzip_filter_module.c +5 -3
  92. data/vendor/nginx/src/http/modules/ngx_http_gzip_static_module.c +1 -1
  93. data/vendor/nginx/src/http/modules/ngx_http_headers_filter_module.c +4 -0
  94. data/vendor/nginx/src/http/modules/ngx_http_image_filter_module.c +8 -2
  95. data/vendor/nginx/src/http/modules/ngx_http_limit_req_module.c +5 -1
  96. data/vendor/nginx/src/http/modules/ngx_http_map_module.c +3 -3
  97. data/vendor/nginx/src/http/modules/ngx_http_memcached_module.c +21 -10
  98. data/vendor/nginx/src/http/modules/ngx_http_mp4_module.c +669 -197
  99. data/vendor/nginx/src/http/modules/ngx_http_proxy_module.c +93 -60
  100. data/vendor/nginx/src/http/modules/ngx_http_range_filter_module.c +13 -6
  101. data/vendor/nginx/src/http/modules/ngx_http_realip_module.c +20 -1
  102. data/vendor/nginx/src/http/modules/ngx_http_referer_module.c +132 -74
  103. data/vendor/nginx/src/http/modules/ngx_http_scgi_module.c +18 -12
  104. data/vendor/nginx/src/http/modules/ngx_http_ssi_filter_module.c +22 -20
  105. data/vendor/nginx/src/http/modules/ngx_http_ssl_module.c +121 -3
  106. data/vendor/nginx/src/http/modules/ngx_http_ssl_module.h +5 -0
  107. data/vendor/nginx/src/http/modules/ngx_http_stub_status_module.c +3 -0
  108. data/vendor/nginx/src/http/modules/ngx_http_sub_filter_module.c +123 -91
  109. data/vendor/nginx/src/http/modules/ngx_http_upstream_ip_hash_module.c +29 -19
  110. data/vendor/nginx/src/http/modules/ngx_http_upstream_keepalive_module.c +2 -5
  111. data/vendor/nginx/src/http/modules/ngx_http_uwsgi_module.c +215 -19
  112. data/vendor/nginx/src/http/modules/ngx_http_xslt_filter_module.c +32 -6
  113. data/vendor/nginx/src/http/modules/perl/nginx.xs +4 -7
  114. data/vendor/nginx/src/http/modules/perl/ngx_http_perl_module.c +2 -2
  115. data/vendor/nginx/src/http/ngx_http.c +17 -7
  116. data/vendor/nginx/src/http/ngx_http_cache.h +4 -2
  117. data/vendor/nginx/src/http/ngx_http_copy_filter_module.c +4 -2
  118. data/vendor/nginx/src/http/ngx_http_core_module.c +63 -50
  119. data/vendor/nginx/src/http/ngx_http_core_module.h +5 -0
  120. data/vendor/nginx/src/http/ngx_http_file_cache.c +115 -3
  121. data/vendor/nginx/src/http/ngx_http_header_filter_module.c +9 -6
  122. data/vendor/nginx/src/http/ngx_http_parse.c +88 -10
  123. data/vendor/nginx/src/http/ngx_http_postpone_filter_module.c +2 -4
  124. data/vendor/nginx/src/http/ngx_http_request.c +116 -8
  125. data/vendor/nginx/src/http/ngx_http_request.h +5 -1
  126. data/vendor/nginx/src/http/ngx_http_request_body.c +7 -7
  127. data/vendor/nginx/src/http/ngx_http_script.c +6 -5
  128. data/vendor/nginx/src/http/ngx_http_spdy.c +889 -271
  129. data/vendor/nginx/src/http/ngx_http_spdy.h +51 -28
  130. data/vendor/nginx/src/http/ngx_http_spdy_filter_module.c +382 -167
  131. data/vendor/nginx/src/http/ngx_http_spdy_module.c +65 -8
  132. data/vendor/nginx/src/http/ngx_http_spdy_module.h +5 -0
  133. data/vendor/nginx/src/http/ngx_http_special_response.c +1 -1
  134. data/vendor/nginx/src/http/ngx_http_upstream.c +290 -114
  135. data/vendor/nginx/src/http/ngx_http_upstream.h +9 -5
  136. data/vendor/nginx/src/http/ngx_http_upstream_round_robin.c +32 -24
  137. data/vendor/nginx/src/http/ngx_http_variables.c +40 -6
  138. data/vendor/nginx/src/http/ngx_http_write_filter_module.c +12 -5
  139. data/vendor/nginx/src/mail/ngx_mail.c +4 -2
  140. data/vendor/nginx/src/mail/ngx_mail.h +2 -0
  141. data/vendor/nginx/src/mail/ngx_mail_auth_http_module.c +0 -1
  142. data/vendor/nginx/src/mail/ngx_mail_core_module.c +2 -1
  143. data/vendor/nginx/src/mail/ngx_mail_handler.c +17 -4
  144. data/vendor/nginx/src/mail/ngx_mail_parse.c +32 -2
  145. data/vendor/nginx/src/mail/ngx_mail_proxy_module.c +54 -7
  146. data/vendor/nginx/src/mail/ngx_mail_smtp_handler.c +50 -78
  147. data/vendor/nginx/src/mail/ngx_mail_ssl_module.c +48 -11
  148. data/vendor/nginx/src/mail/ngx_mail_ssl_module.h +3 -0
  149. data/vendor/nginx/src/os/unix/ngx_channel.c +3 -1
  150. data/vendor/nginx/src/os/unix/ngx_darwin_config.h +1 -0
  151. data/vendor/nginx/src/os/unix/ngx_darwin_init.c +1 -1
  152. data/vendor/nginx/src/os/unix/ngx_darwin_sendfile_chain.c +14 -16
  153. data/vendor/nginx/src/os/unix/ngx_errno.h +3 -0
  154. data/vendor/nginx/src/os/unix/ngx_files.h +10 -16
  155. data/vendor/nginx/src/os/unix/ngx_freebsd_config.h +6 -0
  156. data/vendor/nginx/src/os/unix/ngx_freebsd_init.c +1 -1
  157. data/vendor/nginx/src/os/unix/ngx_freebsd_rfork_thread.c +1 -1
  158. data/vendor/nginx/src/os/unix/ngx_freebsd_rfork_thread.h +2 -2
  159. data/vendor/nginx/src/os/unix/ngx_freebsd_sendfile_chain.c +17 -19
  160. data/vendor/nginx/src/os/unix/ngx_linux_config.h +8 -2
  161. data/vendor/nginx/src/os/unix/ngx_linux_sendfile_chain.c +20 -22
  162. data/vendor/nginx/src/os/unix/ngx_posix_config.h +1 -0
  163. data/vendor/nginx/src/os/unix/ngx_process.c +5 -0
  164. data/vendor/nginx/src/os/unix/ngx_process_cycle.c +15 -3
  165. data/vendor/nginx/src/os/unix/ngx_readv_chain.c +2 -1
  166. data/vendor/nginx/src/os/unix/ngx_recv.c +4 -1
  167. data/vendor/nginx/src/os/unix/ngx_solaris_config.h +1 -0
  168. data/vendor/nginx/src/os/unix/ngx_solaris_sendfilev_chain.c +14 -16
  169. metadata +8 -2
@@ -5,8 +5,8 @@
5
5
  # clang
6
6
 
7
7
 
8
- NGX_CLANG_VER=`$CC -v 2>&1 | grep 'clang version' 2>&1 \
9
- | sed -e 's/^.*clang version \(.*\)/\1/'`
8
+ NGX_CLANG_VER=`$CC -v 2>&1 | grep '\(clang\|LLVM\) version' 2>&1 \
9
+ | sed -e 's/^.* version \(.*\)/\1/'`
10
10
 
11
11
  echo " + clang version: $NGX_CLANG_VER"
12
12
 
@@ -82,13 +82,14 @@ fi
82
82
  # warnings
83
83
 
84
84
  CFLAGS="$CFLAGS $NGX_CLANG_OPT -Wall -Wextra -Wpointer-arith"
85
+ CFLAGS="$CFLAGS -Wconditional-uninitialized"
85
86
  #CFLAGS="$CFLAGS -Wmissing-prototypes"
86
87
 
87
88
  # we have a lot of unused function arguments
88
89
  CFLAGS="$CFLAGS -Wno-unused-parameter"
89
90
 
90
91
  # stop on warning
91
- #CFLAGS="$CFLAGS -Werror"
92
+ CFLAGS="$CFLAGS -Werror"
92
93
 
93
94
  # debug
94
95
  CFLAGS="$CFLAGS -g"
@@ -43,6 +43,29 @@ if test -n "$CFLAGS"; then
43
43
  ngx_include_opt="-I"
44
44
  ;;
45
45
 
46
+ sunc)
47
+
48
+ case "$NGX_MACHINE" in
49
+
50
+ i86pc)
51
+ NGX_AUX=" src/os/unix/ngx_sunpro_x86.il"
52
+ ;;
53
+
54
+ sun4u | sun4v)
55
+ NGX_AUX=" src/os/unix/ngx_sunpro_sparc64.il"
56
+ ;;
57
+
58
+ esac
59
+
60
+ case $CPU in
61
+
62
+ amd64)
63
+ NGX_AUX=" src/os/unix/ngx_sunpro_amd64.il"
64
+ ;;
65
+
66
+ esac
67
+ ;;
68
+
46
69
  esac
47
70
 
48
71
  else
@@ -106,6 +106,7 @@ fi
106
106
 
107
107
  # precompiled headers
108
108
  CORE_DEPS="$CORE_DEPS $NGX_OBJS/ngx_config.pch"
109
+ CORE_LINK="$CORE_LINK $NGX_OBJS/ngx_pch.obj"
109
110
  NGX_PCH="$NGX_OBJS/ngx_config.pch"
110
111
  NGX_BUILD_PCH="-Ycngx_config.h -Fp$NGX_OBJS/ngx_config.pch"
111
112
  NGX_USE_PCH="-Yungx_config.h -Fp$NGX_OBJS/ngx_config.pch"
@@ -67,7 +67,7 @@ elif `$CC -v 2>&1 | grep 'gcc version' >/dev/null 2>&1`; then
67
67
  NGX_CC_NAME=gcc
68
68
  echo " + using GNU C compiler"
69
69
 
70
- elif `$CC -v 2>&1 | grep 'clang version' >/dev/null 2>&1`; then
70
+ elif `$CC -v 2>&1 | grep '\(clang\|LLVM\) version' >/dev/null 2>&1`; then
71
71
  NGX_CC_NAME=clang
72
72
  echo " + using Clang C compiler"
73
73
 
@@ -65,10 +65,10 @@ have=NGX_HAVE_C99_VARIADIC_MACROS . auto/have
65
65
 
66
66
 
67
67
  # the precompiled headers
68
- CORE_DEPS="$CORE_DEPS $NGX_OBJS/ngx_config.pch"
69
- NGX_PCH="$NGX_OBJS/ngx_config.pch"
70
- NGX_BUILD_PCH="-fhq=$NGX_OBJS/ngx_config.pch"
71
- NGX_USE_PCH="-fh=$NGX_OBJS/ngx_config.pch"
68
+ #CORE_DEPS="$CORE_DEPS $NGX_OBJS/ngx_config.pch"
69
+ #NGX_PCH="$NGX_OBJS/ngx_config.pch"
70
+ #NGX_BUILD_PCH="-fhq=$NGX_OBJS/ngx_config.pch"
71
+ #NGX_USE_PCH="-fh=$NGX_OBJS/ngx_config.pch"
72
72
 
73
73
 
74
74
  # the link flags, built target is NT GUI mode application
@@ -30,7 +30,7 @@ if [ -x $NGX_AUTOTEST ]; then
30
30
  ngx_sunc_ver=`$NGX_AUTOTEST`
31
31
  fi
32
32
 
33
- rm $NGX_AUTOTEST*
33
+ rm -rf $NGX_AUTOTEST*
34
34
 
35
35
  # 1424 == 0x590, Sun Studio 12
36
36
 
@@ -34,10 +34,10 @@ if [ -x $NGX_AUTOTEST ]; then
34
34
  echo " big endian"
35
35
  fi
36
36
 
37
- rm $NGX_AUTOTEST*
37
+ rm -rf $NGX_AUTOTEST*
38
38
 
39
39
  else
40
- rm $NGX_AUTOTEST*
40
+ rm -rf $NGX_AUTOTEST*
41
41
 
42
42
  echo
43
43
  echo "$0: error: cannot detect system byte ordering"
@@ -120,4 +120,4 @@ else
120
120
  echo "----------" >> $NGX_AUTOCONF_ERR
121
121
  fi
122
122
 
123
- rm $NGX_AUTOTEST*
123
+ rm -rf $NGX_AUTOTEST*
@@ -58,4 +58,4 @@ else
58
58
  echo "----------" >> $NGX_AUTOCONF_ERR
59
59
  fi
60
60
 
61
- rm $NGX_AUTOTEST*
61
+ rm -rf $NGX_AUTOTEST*
@@ -9,6 +9,8 @@ $NGX_LIBATOMIC/src/libatomic_ops.a: $NGX_LIBATOMIC/Makefile
9
9
  cd $NGX_LIBATOMIC && \$(MAKE)
10
10
 
11
11
  $NGX_LIBATOMIC/Makefile: $NGX_MAKEFILE
12
- cd $NGX_LIBATOMIC && ./configure
12
+ cd $NGX_LIBATOMIC \\
13
+ && if [ -f Makefile ]; then \$(MAKE) distclean; fi \\
14
+ && ./configure
13
15
 
14
16
  END
@@ -33,6 +33,10 @@ if [ $OPENSSL != NONE ]; then
33
33
  CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libssl.a"
34
34
  CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libcrypto.a"
35
35
  CORE_LIBS="$CORE_LIBS $NGX_LIBDL"
36
+
37
+ if [ "$NGX_PLATFORM" = win32 ]; then
38
+ CORE_LIBS="$CORE_LIBS -lgdi32 -lcrypt32 -lws2_32"
39
+ fi
36
40
  ;;
37
41
  esac
38
42
 
@@ -55,7 +55,7 @@ END
55
55
 
56
56
  $OPENSSL/.openssl/include/openssl/ssl.h: $NGX_MAKEFILE
57
57
  cd $OPENSSL \\
58
- && \$(MAKE) clean \\
58
+ && if [ -f Makefile ]; then \$(MAKE) clean; fi \\
59
59
  && ./config --prefix=$ngx_prefix no-shared $OPENSSL_OPT \\
60
60
  && \$(MAKE) \\
61
61
  && \$(MAKE) install LIBDIR=lib
@@ -73,6 +73,11 @@ if [ $PCRE != NONE ]; then
73
73
 
74
74
  *)
75
75
  have=NGX_PCRE . auto/have
76
+
77
+ if [ "$NGX_PLATFORM" = win32 ]; then
78
+ have=PCRE_STATIC . auto/have
79
+ fi
80
+
76
81
  CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
77
82
  LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a"
78
83
  CORE_LIBS="$CORE_LIBS $PCRE/.libs/libpcre.a"
@@ -23,16 +23,19 @@ case "$NGX_CC_NAME" in
23
23
  ngx_pcre=`echo \-DPCRE=\"$PCRE\" | sed -e "s/\//$ngx_regex_dirsep/g"`
24
24
  ;;
25
25
 
26
- esac
26
+ *)
27
+ ngx_makefile=
28
+ ;;
27
29
 
30
+ esac
28
31
 
29
- case "$NGX_PLATFORM" in
30
32
 
31
- win32)
33
+ if [ -n "$ngx_makefile" ]; then
32
34
 
33
- cat << END >> $NGX_MAKEFILE
35
+ cat << END >> $NGX_MAKEFILE
34
36
 
35
- `echo "$PCRE/pcre.lib: $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
37
+ `echo "$PCRE/pcre.lib: $PCRE/pcre.h $NGX_MAKEFILE" \
38
+ | sed -e "s/\//$ngx_regex_dirsep/g"`
36
39
  \$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre $ngx_opt
37
40
 
38
41
  `echo "$PCRE/pcre.h:" | sed -e "s/\//$ngx_regex_dirsep/g"`
@@ -40,10 +43,9 @@ case "$NGX_PLATFORM" in
40
43
 
41
44
  END
42
45
 
43
- ;;
46
+ else
44
47
 
45
- *)
46
- cat << END >> $NGX_MAKEFILE
48
+ cat << END >> $NGX_MAKEFILE
47
49
 
48
50
  $PCRE/pcre.h: $PCRE/Makefile
49
51
 
@@ -59,6 +61,4 @@ $PCRE/.libs/libpcre.a: $PCRE/Makefile
59
61
 
60
62
  END
61
63
 
62
- ;;
63
-
64
- esac
64
+ fi
@@ -4,7 +4,8 @@
4
4
 
5
5
 
6
6
  CFLAGS = -q -O2 -tWM -w-8004 $(CPU_OPT)
7
- PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
7
+ PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 \
8
+ -DSUPPORT_PCRE8 -DHAVE_MEMMOVE
8
9
 
9
10
 
10
11
  pcre.lib:
@@ -12,8 +13,8 @@ pcre.lib:
12
13
 
13
14
  bcc32 -c $(CFLAGS) -I. $(PCREFLAGS) pcre_*.c
14
15
 
15
- > pcre.lst
16
- for %n in (*.obj) do @echo +%n & >> pcre.lst
16
+ copy /y nul pcre.lst
17
+ for %n in (*.obj) do @echo +%n ^^& >> pcre.lst
17
18
  echo + >> pcre.lst
18
19
 
19
20
  tlib pcre.lib @pcre.lst
@@ -4,7 +4,8 @@
4
4
 
5
5
 
6
6
  CFLAGS = -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT)
7
- PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
7
+ PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 \
8
+ -DSUPPORT_PCRE8 -DHAVE_MEMMOVE
8
9
 
9
10
 
10
11
  pcre.lib:
@@ -4,7 +4,8 @@
4
4
 
5
5
 
6
6
  CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(CPU_OPT)
7
- PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
7
+ PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 &
8
+ -DSUPPORT_PCRE8 -DHAVE_MEMMOVE
8
9
 
9
10
 
10
11
  pcre.lib:
@@ -18,6 +18,7 @@ $NGX_OBJS/src/http/modules/perl/blib/arch/auto/nginx/nginx.$ngx_perl_dlext: \\
18
18
 
19
19
 
20
20
  $NGX_OBJS/src/http/modules/perl/Makefile: \\
21
+ $NGX_AUTO_CONFIG_H \\
21
22
  src/core/nginx.h \\
22
23
  src/http/modules/perl/Makefile.PL \\
23
24
  src/http/modules/perl/nginx.pm \\
@@ -37,4 +37,4 @@ else
37
37
  echo " not found"
38
38
  fi
39
39
 
40
- rm $NGX_AUTOTEST*
40
+ rm -rf $NGX_AUTOTEST*
@@ -24,6 +24,10 @@ case "$NGX_CC_NAME" in
24
24
  ngx_zlib=`echo \-DZLIB=\"$ZLIB\" | sed -e "s/\//$ngx_regex_dirsep/g"`
25
25
  ;;
26
26
 
27
+ *)
28
+ ngx_makefile=
29
+ ;;
30
+
27
31
  esac
28
32
 
29
33
 
@@ -33,13 +37,30 @@ done=NO
33
37
  case "$NGX_PLATFORM" in
34
38
 
35
39
  win32)
36
- cat << END >> $NGX_MAKEFILE
40
+
41
+ if [ -n "$ngx_makefile" ]; then
42
+ cat << END >> $NGX_MAKEFILE
37
43
 
38
44
  `echo "$ZLIB/zlib.lib: $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
39
45
  \$(MAKE) -f auto/lib/zlib/$ngx_makefile $ngx_opt $ngx_zlib
40
46
 
41
47
  END
42
48
 
49
+ else
50
+
51
+ cat << END >> $NGX_MAKEFILE
52
+
53
+ $ZLIB/libz.a: $NGX_MAKEFILE
54
+ cd $ZLIB \\
55
+ && \$(MAKE) distclean \\
56
+ && \$(MAKE) -f win32/Makefile.gcc \\
57
+ CFLAGS="$ZLIB_OPT" CC="\$(CC)" \\
58
+ libz.a
59
+
60
+ END
61
+
62
+ fi
63
+
43
64
  done=YES
44
65
  ;;
45
66
 
@@ -42,6 +42,7 @@ fi
42
42
 
43
43
  if [ $NGX_TEST_BUILD_EPOLL = YES ]; then
44
44
  have=NGX_HAVE_EPOLL . auto/have
45
+ have=NGX_HAVE_EPOLLRDHUP . auto/have
45
46
  have=NGX_HAVE_EVENTFD . auto/have
46
47
  have=NGX_TEST_BUILD_EPOLL . auto/have
47
48
  EVENT_MODULES="$EVENT_MODULES $EPOLL_MODULE"
@@ -220,6 +221,11 @@ if [ $HTTP_RANDOM_INDEX = YES ]; then
220
221
  HTTP_SRCS="$HTTP_SRCS $HTTP_RANDOM_INDEX_SRCS"
221
222
  fi
222
223
 
224
+ if [ $HTTP_AUTH_REQUEST = YES ]; then
225
+ HTTP_MODULES="$HTTP_MODULES $HTTP_AUTH_REQUEST_MODULE"
226
+ HTTP_SRCS="$HTTP_SRCS $HTTP_AUTH_REQUEST_SRCS"
227
+ fi
228
+
223
229
  if [ $HTTP_AUTH_BASIC = YES ]; then
224
230
  USE_MD5=YES
225
231
  USE_SHA1=YES
@@ -477,6 +483,8 @@ if [ $MAIL = YES ]; then
477
483
 
478
484
  modules="$modules $MAIL_PROXY_MODULE"
479
485
  MAIL_SRCS="$MAIL_SRCS $MAIL_PROXY_SRCS"
486
+
487
+ NGX_ADDON_DEPS="$NGX_ADDON_DEPS \$(MAIL_DEPS)"
480
488
  fi
481
489
 
482
490
 
@@ -71,6 +71,7 @@ HTTP_ADDITION=NO
71
71
  HTTP_DAV=NO
72
72
  HTTP_ACCESS=YES
73
73
  HTTP_AUTH_BASIC=YES
74
+ HTTP_AUTH_REQUEST=NO
74
75
  HTTP_USERID=YES
75
76
  HTTP_AUTOINDEX=YES
76
77
  HTTP_RANDOM_INDEX=NO
@@ -215,6 +216,7 @@ do
215
216
  --with-http_mp4_module) HTTP_MP4=YES ;;
216
217
  --with-http_gunzip_module) HTTP_GUNZIP=YES ;;
217
218
  --with-http_gzip_static_module) HTTP_GZIP_STATIC=YES ;;
219
+ --with-http_auth_request_module) HTTP_AUTH_REQUEST=YES ;;
218
220
  --with-http_random_index_module) HTTP_RANDOM_INDEX=YES ;;
219
221
  --with-http_secure_link_module) HTTP_SECURE_LINK=YES ;;
220
222
  --with-http_degradation_module) HTTP_DEGRADATION=YES ;;
@@ -363,6 +365,7 @@ cat << END
363
365
  --with-http_mp4_module enable ngx_http_mp4_module
364
366
  --with-http_gunzip_module enable ngx_http_gunzip_module
365
367
  --with-http_gzip_static_module enable ngx_http_gzip_static_module
368
+ --with-http_auth_request_module enable ngx_http_auth_request_module
366
369
  --with-http_random_index_module enable ngx_http_random_index_module
367
370
  --with-http_secure_link_module enable ngx_http_secure_link_module
368
371
  --with-http_degradation_module enable ngx_http_degradation_module
@@ -112,5 +112,5 @@ ngx_feature_incs="#include <libkern/OSAtomic.h>"
112
112
  ngx_feature_path=
113
113
  ngx_feature_libs=
114
114
  ngx_feature_test="int32_t lock, n;
115
- n = OSAtomicCompareAndSwap32Barrier(0, 1, lock)"
115
+ n = OSAtomicCompareAndSwap32Barrier(0, 1, &lock)"
116
116
  . auto/feature
@@ -65,9 +65,41 @@ if [ $ngx_found = yes ]; then
65
65
  CORE_SRCS="$CORE_SRCS $EPOLL_SRCS"
66
66
  EVENT_MODULES="$EVENT_MODULES $EPOLL_MODULE"
67
67
  EVENT_FOUND=YES
68
+
69
+
70
+ # EPOLLRDHUP appeared in Linux 2.6.17, glibc 2.8
71
+
72
+ ngx_feature="EPOLLRDHUP"
73
+ ngx_feature_name="NGX_HAVE_EPOLLRDHUP"
74
+ ngx_feature_run=no
75
+ ngx_feature_incs="#include <sys/epoll.h>"
76
+ ngx_feature_path=
77
+ ngx_feature_libs=
78
+ ngx_feature_test="int efd = 0, fd = 0;
79
+ struct epoll_event ee;
80
+ ee.events = EPOLLIN|EPOLLRDHUP|EPOLLET;
81
+ ee.data.ptr = NULL;
82
+ epoll_ctl(efd, EPOLL_CTL_ADD, fd, &ee)"
83
+ . auto/feature
68
84
  fi
69
85
 
70
86
 
87
+ # O_PATH and AT_EMPTY_PATH were introduced in 2.6.39, glibc 2.14
88
+
89
+ ngx_feature="O_PATH"
90
+ ngx_feature_name="NGX_HAVE_O_PATH"
91
+ ngx_feature_run=no
92
+ ngx_feature_incs="#include <sys/types.h>
93
+ #include <sys/stat.h>
94
+ #include <fcntl.h>"
95
+ ngx_feature_path=
96
+ ngx_feature_libs=
97
+ ngx_feature_test="int fd; struct stat sb;
98
+ fd = openat(AT_FDCWD, \".\", O_PATH|O_DIRECTORY|O_NOFOLLOW);
99
+ if (fstatat(fd, \"\", &sb, AT_EMPTY_PATH) != 0) return 1"
100
+ . auto/feature
101
+
102
+
71
103
  # sendfile()
72
104
 
73
105
  CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE"
@@ -9,10 +9,21 @@ CORE_INCS="$WIN32_INCS"
9
9
  CORE_DEPS="$WIN32_DEPS"
10
10
  CORE_SRCS="$WIN32_SRCS $IOCP_SRCS"
11
11
  OS_CONFIG="$WIN32_CONFIG"
12
- CORE_LIBS="$CORE_LIBS advapi32.lib ws2_32.lib"
13
12
  NGX_ICONS="$NGX_WIN32_ICONS"
14
13
  SELECT_SRCS=$WIN32_SELECT_SRCS
15
14
 
15
+ case "$NGX_CC_NAME" in
16
+
17
+ gcc)
18
+ CORE_LIBS="$CORE_LIBS -ladvapi32 -lws2_32"
19
+ ;;
20
+
21
+ *)
22
+ CORE_LIBS="$CORE_LIBS advapi32.lib ws2_32.lib"
23
+ ;;
24
+
25
+ esac
26
+
16
27
  EVENT_MODULES="$EVENT_MODULES $IOCP_MODULE"
17
28
  EVENT_FOUND=YES
18
29