nginxtra 1.8.1.12 → 1.10.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (238) 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 +363 -25
  6. data/vendor/nginx/CHANGES.ru +365 -21
  7. data/vendor/nginx/LICENSE +2 -2
  8. data/vendor/nginx/auto/cc/conf +32 -0
  9. data/vendor/nginx/auto/cc/gcc +1 -1
  10. data/vendor/nginx/auto/cc/icc +2 -2
  11. data/vendor/nginx/auto/cc/msvc +29 -8
  12. data/vendor/nginx/auto/cc/name +2 -25
  13. data/vendor/nginx/auto/cc/sunc +3 -0
  14. data/vendor/nginx/auto/endianness +7 -2
  15. data/vendor/nginx/auto/install +60 -26
  16. data/vendor/nginx/auto/lib/conf +4 -4
  17. data/vendor/nginx/auto/lib/geoip/conf +6 -1
  18. data/vendor/nginx/auto/lib/libgd/conf +6 -1
  19. data/vendor/nginx/auto/lib/libxslt/conf +11 -2
  20. data/vendor/nginx/auto/lib/make +1 -1
  21. data/vendor/nginx/auto/lib/md5/conf +2 -2
  22. data/vendor/nginx/auto/lib/md5/make +2 -2
  23. data/vendor/nginx/auto/lib/openssl/conf +52 -3
  24. data/vendor/nginx/auto/lib/openssl/make +1 -1
  25. data/vendor/nginx/auto/lib/pcre/conf +2 -2
  26. data/vendor/nginx/auto/lib/pcre/make +2 -2
  27. data/vendor/nginx/auto/lib/perl/conf +6 -3
  28. data/vendor/nginx/auto/lib/perl/make +4 -1
  29. data/vendor/nginx/auto/lib/sha1/conf +2 -2
  30. data/vendor/nginx/auto/lib/sha1/make +2 -2
  31. data/vendor/nginx/auto/lib/zlib/conf +2 -2
  32. data/vendor/nginx/auto/lib/zlib/make +2 -2
  33. data/vendor/nginx/auto/make +281 -16
  34. data/vendor/nginx/auto/module +122 -0
  35. data/vendor/nginx/auto/modules +909 -178
  36. data/vendor/nginx/auto/options +81 -19
  37. data/vendor/nginx/auto/os/conf +9 -0
  38. data/vendor/nginx/auto/os/darwin +3 -0
  39. data/vendor/nginx/auto/os/freebsd +0 -20
  40. data/vendor/nginx/auto/os/linux +0 -12
  41. data/vendor/nginx/auto/os/win32 +5 -1
  42. data/vendor/nginx/auto/sources +11 -311
  43. data/vendor/nginx/auto/summary +1 -0
  44. data/vendor/nginx/auto/types/sizeof +5 -3
  45. data/vendor/nginx/auto/types/typedef +9 -4
  46. data/vendor/nginx/auto/types/uintptr_t +7 -2
  47. data/vendor/nginx/auto/unix +72 -12
  48. data/vendor/nginx/conf/fastcgi.conf +1 -0
  49. data/vendor/nginx/conf/fastcgi_params +1 -0
  50. data/vendor/nginx/conf/scgi_params +1 -0
  51. data/vendor/nginx/conf/uwsgi_params +1 -0
  52. data/vendor/nginx/configure +1 -1
  53. data/vendor/nginx/contrib/vim/syntax/nginx.vim +2 -2
  54. data/vendor/nginx/man/nginx.8 +6 -2
  55. data/vendor/nginx/src/core/nginx.c +281 -114
  56. data/vendor/nginx/src/core/nginx.h +2 -2
  57. data/vendor/nginx/src/core/ngx_conf_file.c +54 -13
  58. data/vendor/nginx/src/core/ngx_conf_file.h +8 -52
  59. data/vendor/nginx/src/core/ngx_config.h +0 -5
  60. data/vendor/nginx/src/core/ngx_connection.c +270 -37
  61. data/vendor/nginx/src/core/ngx_connection.h +35 -12
  62. data/vendor/nginx/src/core/ngx_core.h +4 -0
  63. data/vendor/nginx/src/core/ngx_crypt.c +2 -2
  64. data/vendor/nginx/src/core/ngx_cycle.c +72 -25
  65. data/vendor/nginx/src/core/ngx_cycle.h +28 -39
  66. data/vendor/nginx/src/core/ngx_file.c +14 -5
  67. data/vendor/nginx/src/core/ngx_file.h +2 -0
  68. data/vendor/nginx/src/core/ngx_hash.c +13 -1
  69. data/vendor/nginx/src/core/ngx_inet.c +20 -18
  70. data/vendor/nginx/src/core/ngx_log.c +12 -12
  71. data/vendor/nginx/src/core/ngx_log.h +13 -6
  72. data/vendor/nginx/src/core/ngx_module.c +360 -0
  73. data/vendor/nginx/src/core/ngx_module.h +307 -0
  74. data/vendor/nginx/src/core/ngx_open_file_cache.c +2 -2
  75. data/vendor/nginx/src/core/ngx_output_chain.c +8 -4
  76. data/vendor/nginx/src/core/ngx_palloc.c +42 -44
  77. data/vendor/nginx/src/{http/ngx_http_parse_time.c → core/ngx_parse_time.c} +2 -3
  78. data/vendor/nginx/src/core/ngx_parse_time.h +22 -0
  79. data/vendor/nginx/src/core/ngx_proxy_protocol.c +50 -1
  80. data/vendor/nginx/src/core/ngx_proxy_protocol.h +3 -1
  81. data/vendor/nginx/src/core/ngx_regex.c +1 -38
  82. data/vendor/nginx/src/core/ngx_resolver.c +1814 -320
  83. data/vendor/nginx/src/core/ngx_resolver.h +67 -10
  84. data/vendor/nginx/src/core/ngx_rwlock.c +120 -0
  85. data/vendor/nginx/src/core/ngx_rwlock.h +21 -0
  86. data/vendor/nginx/src/core/ngx_slab.c +6 -5
  87. data/vendor/nginx/src/core/ngx_string.c +1 -1
  88. data/vendor/nginx/src/core/ngx_syslog.c +11 -3
  89. data/vendor/nginx/src/core/ngx_syslog.h +2 -1
  90. data/vendor/nginx/src/core/ngx_thread_pool.c +4 -0
  91. data/vendor/nginx/src/core/ngx_times.c +2 -2
  92. data/vendor/nginx/src/event/modules/ngx_devpoll_module.c +3 -1
  93. data/vendor/nginx/src/event/modules/ngx_epoll_module.c +5 -2
  94. data/vendor/nginx/src/event/modules/ngx_eventport_module.c +5 -5
  95. data/vendor/nginx/src/event/modules/ngx_kqueue_module.c +15 -8
  96. data/vendor/nginx/src/event/modules/ngx_poll_module.c +0 -10
  97. data/vendor/nginx/src/event/modules/ngx_select_module.c +0 -10
  98. data/vendor/nginx/src/event/ngx_event.c +60 -103
  99. data/vendor/nginx/src/event/ngx_event.h +22 -26
  100. data/vendor/nginx/src/event/ngx_event_accept.c +414 -88
  101. data/vendor/nginx/src/event/ngx_event_connect.c +27 -18
  102. data/vendor/nginx/src/event/ngx_event_connect.h +1 -0
  103. data/vendor/nginx/src/event/ngx_event_openssl.c +65 -25
  104. data/vendor/nginx/src/event/ngx_event_openssl.h +17 -0
  105. data/vendor/nginx/src/event/ngx_event_openssl_stapling.c +73 -7
  106. data/vendor/nginx/src/event/ngx_event_pipe.c +85 -27
  107. data/vendor/nginx/src/event/ngx_event_pipe.h +10 -0
  108. data/vendor/nginx/src/http/modules/ngx_http_auth_basic_module.c +1 -1
  109. data/vendor/nginx/src/http/modules/ngx_http_auth_request_module.c +2 -2
  110. data/vendor/nginx/src/http/modules/ngx_http_chunked_filter_module.c +2 -2
  111. data/vendor/nginx/src/http/modules/ngx_http_dav_module.c +6 -6
  112. data/vendor/nginx/src/http/modules/ngx_http_fastcgi_module.c +17 -11
  113. data/vendor/nginx/src/http/modules/ngx_http_gzip_filter_module.c +2 -2
  114. data/vendor/nginx/src/http/modules/ngx_http_headers_filter_module.c +9 -9
  115. data/vendor/nginx/src/http/modules/ngx_http_image_filter_module.c +2 -2
  116. data/vendor/nginx/src/http/modules/ngx_http_limit_conn_module.c +2 -2
  117. data/vendor/nginx/src/http/modules/ngx_http_limit_req_module.c +0 -7
  118. data/vendor/nginx/src/http/modules/ngx_http_map_module.c +6 -6
  119. data/vendor/nginx/src/http/modules/ngx_http_memcached_module.c +2 -1
  120. data/vendor/nginx/src/http/modules/ngx_http_mp4_module.c +13 -13
  121. data/vendor/nginx/src/http/modules/ngx_http_not_modified_filter_module.c +2 -2
  122. data/vendor/nginx/src/http/modules/ngx_http_proxy_module.c +26 -21
  123. data/vendor/nginx/src/http/modules/ngx_http_random_index_module.c +1 -1
  124. data/vendor/nginx/src/http/modules/ngx_http_range_filter_module.c +26 -8
  125. data/vendor/nginx/src/http/modules/ngx_http_realip_module.c +73 -3
  126. data/vendor/nginx/src/http/modules/ngx_http_referer_module.c +1 -1
  127. data/vendor/nginx/src/http/modules/ngx_http_rewrite_module.c +6 -6
  128. data/vendor/nginx/src/http/modules/ngx_http_scgi_module.c +5 -3
  129. data/vendor/nginx/src/http/modules/ngx_http_slice_filter_module.c +526 -0
  130. data/vendor/nginx/src/http/modules/ngx_http_ssi_filter_module.c +7 -7
  131. data/vendor/nginx/src/http/modules/ngx_http_ssl_module.c +19 -16
  132. data/vendor/nginx/src/http/modules/ngx_http_static_module.c +1 -1
  133. data/vendor/nginx/src/http/modules/ngx_http_stub_status_module.c +1 -1
  134. data/vendor/nginx/src/http/modules/ngx_http_sub_filter_module.c +373 -173
  135. data/vendor/nginx/src/http/modules/ngx_http_upstream_hash_module.c +72 -46
  136. data/vendor/nginx/src/http/modules/ngx_http_upstream_ip_hash_module.c +18 -30
  137. data/vendor/nginx/src/http/modules/ngx_http_upstream_keepalive_module.c +50 -39
  138. data/vendor/nginx/src/http/modules/ngx_http_upstream_least_conn_module.c +38 -129
  139. data/vendor/nginx/src/http/modules/ngx_http_upstream_zone_module.c +246 -0
  140. data/vendor/nginx/src/http/modules/ngx_http_uwsgi_module.c +6 -5
  141. data/vendor/nginx/src/http/modules/perl/nginx.xs +9 -9
  142. data/vendor/nginx/src/http/ngx_http.c +46 -43
  143. data/vendor/nginx/src/http/ngx_http.h +4 -9
  144. data/vendor/nginx/src/http/ngx_http_cache.h +4 -0
  145. data/vendor/nginx/src/http/ngx_http_copy_filter_module.c +13 -5
  146. data/vendor/nginx/src/http/ngx_http_core_module.c +92 -91
  147. data/vendor/nginx/src/http/ngx_http_core_module.h +12 -8
  148. data/vendor/nginx/src/http/ngx_http_file_cache.c +61 -10
  149. data/vendor/nginx/src/http/ngx_http_request.c +37 -50
  150. data/vendor/nginx/src/http/ngx_http_request.h +10 -15
  151. data/vendor/nginx/src/http/ngx_http_request_body.c +64 -88
  152. data/vendor/nginx/src/http/ngx_http_script.c +3 -3
  153. data/vendor/nginx/src/http/ngx_http_special_response.c +1 -4
  154. data/vendor/nginx/src/http/ngx_http_upstream.c +245 -109
  155. data/vendor/nginx/src/http/ngx_http_upstream.h +11 -5
  156. data/vendor/nginx/src/http/ngx_http_upstream_round_robin.c +212 -65
  157. data/vendor/nginx/src/http/ngx_http_upstream_round_robin.h +66 -5
  158. data/vendor/nginx/src/http/ngx_http_variables.c +28 -15
  159. data/vendor/nginx/src/http/ngx_http_write_filter_module.c +1 -1
  160. data/vendor/nginx/src/http/v2/ngx_http_v2.c +4349 -0
  161. data/vendor/nginx/src/http/v2/ngx_http_v2.h +337 -0
  162. data/vendor/nginx/src/http/v2/ngx_http_v2_filter_module.c +1391 -0
  163. data/vendor/nginx/src/http/v2/ngx_http_v2_huff_decode.c +2714 -0
  164. data/vendor/nginx/src/http/v2/ngx_http_v2_huff_encode.c +254 -0
  165. data/vendor/nginx/src/http/v2/ngx_http_v2_module.c +469 -0
  166. data/vendor/nginx/src/http/{ngx_http_spdy_module.h → v2/ngx_http_v2_module.h} +10 -9
  167. data/vendor/nginx/src/http/v2/ngx_http_v2_table.c +349 -0
  168. data/vendor/nginx/src/mail/ngx_mail.c +49 -82
  169. data/vendor/nginx/src/mail/ngx_mail.h +16 -23
  170. data/vendor/nginx/src/mail/ngx_mail_auth_http_module.c +1 -1
  171. data/vendor/nginx/src/mail/ngx_mail_core_module.c +60 -34
  172. data/vendor/nginx/src/mail/ngx_mail_handler.c +17 -12
  173. data/vendor/nginx/src/mail/ngx_mail_proxy_module.c +1 -14
  174. data/vendor/nginx/src/mail/ngx_mail_smtp_handler.c +1 -1
  175. data/vendor/nginx/src/mail/ngx_mail_ssl_module.c +5 -5
  176. data/vendor/nginx/src/os/unix/ngx_atomic.h +10 -10
  177. data/vendor/nginx/src/os/unix/ngx_channel.h +4 -4
  178. data/vendor/nginx/src/os/unix/ngx_darwin_config.h +2 -0
  179. data/vendor/nginx/src/os/unix/ngx_darwin_init.c +1 -0
  180. data/vendor/nginx/src/os/unix/ngx_dlopen.c +28 -0
  181. data/vendor/nginx/src/os/unix/ngx_dlopen.h +31 -0
  182. data/vendor/nginx/src/os/unix/ngx_errno.h +1 -0
  183. data/vendor/nginx/src/os/unix/ngx_file_aio_read.c +1 -1
  184. data/vendor/nginx/src/os/unix/ngx_files.c +313 -80
  185. data/vendor/nginx/src/os/unix/ngx_files.h +5 -2
  186. data/vendor/nginx/src/os/unix/ngx_freebsd_config.h +3 -1
  187. data/vendor/nginx/src/os/unix/ngx_freebsd_init.c +1 -0
  188. data/vendor/nginx/src/os/unix/ngx_freebsd_sendfile_chain.c +13 -0
  189. data/vendor/nginx/src/os/unix/ngx_linux.h +0 -2
  190. data/vendor/nginx/src/os/unix/ngx_linux_aio_read.c +1 -1
  191. data/vendor/nginx/src/os/unix/ngx_linux_config.h +2 -6
  192. data/vendor/nginx/src/os/unix/ngx_linux_init.c +1 -33
  193. data/vendor/nginx/src/os/unix/ngx_linux_sendfile_chain.c +55 -12
  194. data/vendor/nginx/src/os/unix/ngx_os.h +3 -9
  195. data/vendor/nginx/src/os/unix/ngx_posix_config.h +14 -1
  196. data/vendor/nginx/src/os/unix/ngx_posix_init.c +2 -1
  197. data/vendor/nginx/src/os/unix/ngx_process.c +1 -1
  198. data/vendor/nginx/src/os/unix/ngx_process_cycle.c +25 -51
  199. data/vendor/nginx/src/os/unix/ngx_process_cycle.h +1 -0
  200. data/vendor/nginx/src/os/unix/ngx_readv_chain.c +24 -28
  201. data/vendor/nginx/src/os/unix/ngx_recv.c +30 -79
  202. data/vendor/nginx/src/os/unix/ngx_send.c +1 -1
  203. data/vendor/nginx/src/os/unix/ngx_setaffinity.c +14 -30
  204. data/vendor/nginx/src/os/unix/ngx_setaffinity.h +15 -1
  205. data/vendor/nginx/src/os/unix/ngx_solaris_config.h +2 -0
  206. data/vendor/nginx/src/os/unix/ngx_solaris_init.c +1 -0
  207. data/vendor/nginx/src/os/unix/ngx_solaris_sendfilev_chain.c +23 -0
  208. data/vendor/nginx/src/os/unix/ngx_sunpro_amd64.il +3 -3
  209. data/vendor/nginx/src/os/unix/ngx_sunpro_x86.il +3 -3
  210. data/vendor/nginx/src/os/unix/ngx_udp_recv.c +5 -48
  211. data/vendor/nginx/src/os/unix/ngx_udp_send.c +56 -0
  212. data/vendor/nginx/src/stream/ngx_stream.c +564 -0
  213. data/vendor/nginx/src/stream/ngx_stream.h +212 -0
  214. data/vendor/nginx/src/stream/ngx_stream_access_module.c +451 -0
  215. data/vendor/nginx/src/stream/ngx_stream_core_module.c +562 -0
  216. data/vendor/nginx/src/stream/ngx_stream_handler.c +344 -0
  217. data/vendor/nginx/src/stream/ngx_stream_limit_conn_module.c +632 -0
  218. data/vendor/nginx/src/stream/ngx_stream_proxy_module.c +1674 -0
  219. data/vendor/nginx/src/stream/ngx_stream_ssl_module.c +460 -0
  220. data/vendor/nginx/src/stream/ngx_stream_ssl_module.h +49 -0
  221. data/vendor/nginx/src/stream/ngx_stream_upstream.c +464 -0
  222. data/vendor/nginx/src/stream/ngx_stream_upstream.h +107 -0
  223. data/vendor/nginx/src/stream/ngx_stream_upstream_hash_module.c +656 -0
  224. data/vendor/nginx/src/stream/ngx_stream_upstream_least_conn_module.c +307 -0
  225. data/vendor/nginx/src/stream/ngx_stream_upstream_round_robin.c +702 -0
  226. data/vendor/nginx/src/stream/ngx_stream_upstream_round_robin.h +139 -0
  227. data/vendor/nginx/src/stream/ngx_stream_upstream_zone_module.c +242 -0
  228. metadata +39 -15
  229. data/vendor/nginx/src/event/modules/ngx_aio_module.c +0 -171
  230. data/vendor/nginx/src/event/modules/ngx_rtsig_module.c +0 -735
  231. data/vendor/nginx/src/http/ngx_http_spdy.c +0 -3701
  232. data/vendor/nginx/src/http/ngx_http_spdy.h +0 -261
  233. data/vendor/nginx/src/http/ngx_http_spdy_filter_module.c +0 -1222
  234. data/vendor/nginx/src/http/ngx_http_spdy_module.c +0 -408
  235. data/vendor/nginx/src/os/unix/ngx_aio_read.c +0 -109
  236. data/vendor/nginx/src/os/unix/ngx_aio_read_chain.c +0 -78
  237. data/vendor/nginx/src/os/unix/ngx_aio_write.c +0 -109
  238. data/vendor/nginx/src/os/unix/ngx_aio_write_chain.c +0 -100
@@ -0,0 +1,307 @@
1
+
2
+ /*
3
+ * Copyright (C) Igor Sysoev
4
+ * Copyright (C) Maxim Dounin
5
+ * Copyright (C) Nginx, Inc.
6
+ */
7
+
8
+
9
+ #ifndef _NGX_MODULE_H_INCLUDED_
10
+ #define _NGX_MODULE_H_INCLUDED_
11
+
12
+
13
+ #include <ngx_config.h>
14
+ #include <ngx_core.h>
15
+ #include <nginx.h>
16
+
17
+
18
+ #define NGX_MODULE_UNSET_INDEX (ngx_uint_t) -1
19
+
20
+
21
+ #define NGX_MODULE_SIGNATURE_0 \
22
+ ngx_value(NGX_PTR_SIZE) "," \
23
+ ngx_value(NGX_SIG_ATOMIC_T_SIZE) "," \
24
+ ngx_value(NGX_TIME_T_SIZE) ","
25
+
26
+ #if (NGX_HAVE_KQUEUE)
27
+ #define NGX_MODULE_SIGNATURE_1 "1"
28
+ #else
29
+ #define NGX_MODULE_SIGNATURE_1 "0"
30
+ #endif
31
+
32
+ #if (NGX_HAVE_IOCP)
33
+ #define NGX_MODULE_SIGNATURE_2 "1"
34
+ #else
35
+ #define NGX_MODULE_SIGNATURE_2 "0"
36
+ #endif
37
+
38
+ #if (NGX_HAVE_FILE_AIO)
39
+ #define NGX_MODULE_SIGNATURE_3 "1"
40
+ #else
41
+ #define NGX_MODULE_SIGNATURE_3 "0"
42
+ #endif
43
+
44
+ #if (NGX_HAVE_AIO_SENDFILE)
45
+ #define NGX_MODULE_SIGNATURE_4 "1"
46
+ #else
47
+ #define NGX_MODULE_SIGNATURE_4 "0"
48
+ #endif
49
+
50
+ #if (NGX_HAVE_EVENTFD)
51
+ #define NGX_MODULE_SIGNATURE_5 "1"
52
+ #else
53
+ #define NGX_MODULE_SIGNATURE_5 "0"
54
+ #endif
55
+
56
+ #if (NGX_HAVE_EPOLL)
57
+ #define NGX_MODULE_SIGNATURE_6 "1"
58
+ #else
59
+ #define NGX_MODULE_SIGNATURE_6 "0"
60
+ #endif
61
+
62
+ #if (NGX_HAVE_KEEPALIVE_TUNABLE)
63
+ #define NGX_MODULE_SIGNATURE_7 "1"
64
+ #else
65
+ #define NGX_MODULE_SIGNATURE_7 "0"
66
+ #endif
67
+
68
+ #if (NGX_HAVE_INET6)
69
+ #define NGX_MODULE_SIGNATURE_8 "1"
70
+ #else
71
+ #define NGX_MODULE_SIGNATURE_8 "0"
72
+ #endif
73
+
74
+ #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
75
+ #define NGX_MODULE_SIGNATURE_9 "1"
76
+ #else
77
+ #define NGX_MODULE_SIGNATURE_9 "0"
78
+ #endif
79
+
80
+ #if (NGX_HAVE_REUSEPORT)
81
+ #define NGX_MODULE_SIGNATURE_10 "1"
82
+ #else
83
+ #define NGX_MODULE_SIGNATURE_10 "0"
84
+ #endif
85
+
86
+ #if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER)
87
+ #define NGX_MODULE_SIGNATURE_11 "1"
88
+ #else
89
+ #define NGX_MODULE_SIGNATURE_11 "0"
90
+ #endif
91
+
92
+ #if (NGX_HAVE_DEFERRED_ACCEPT && defined TCP_DEFER_ACCEPT)
93
+ #define NGX_MODULE_SIGNATURE_12 "1"
94
+ #else
95
+ #define NGX_MODULE_SIGNATURE_12 "0"
96
+ #endif
97
+
98
+ #if (NGX_HAVE_SETFIB)
99
+ #define NGX_MODULE_SIGNATURE_13 "1"
100
+ #else
101
+ #define NGX_MODULE_SIGNATURE_13 "0"
102
+ #endif
103
+
104
+ #if (NGX_HAVE_TCP_FASTOPEN)
105
+ #define NGX_MODULE_SIGNATURE_14 "1"
106
+ #else
107
+ #define NGX_MODULE_SIGNATURE_14 "0"
108
+ #endif
109
+
110
+ #if (NGX_HAVE_UNIX_DOMAIN)
111
+ #define NGX_MODULE_SIGNATURE_15 "1"
112
+ #else
113
+ #define NGX_MODULE_SIGNATURE_15 "0"
114
+ #endif
115
+
116
+ #if (NGX_HAVE_VARIADIC_MACROS)
117
+ #define NGX_MODULE_SIGNATURE_16 "1"
118
+ #else
119
+ #define NGX_MODULE_SIGNATURE_16 "0"
120
+ #endif
121
+
122
+ #if (NGX_HAVE_MD5)
123
+ #define NGX_MODULE_SIGNATURE_17 "1"
124
+ #else
125
+ #define NGX_MODULE_SIGNATURE_17 "0"
126
+ #endif
127
+
128
+ #if (NGX_HAVE_SHA1)
129
+ #define NGX_MODULE_SIGNATURE_18 "1"
130
+ #else
131
+ #define NGX_MODULE_SIGNATURE_18 "0"
132
+ #endif
133
+
134
+ #if (NGX_HAVE_OPENAT)
135
+ #define NGX_MODULE_SIGNATURE_19 "1"
136
+ #else
137
+ #define NGX_MODULE_SIGNATURE_19 "0"
138
+ #endif
139
+
140
+ #if (NGX_HAVE_ATOMIC_OPS)
141
+ #define NGX_MODULE_SIGNATURE_20 "1"
142
+ #else
143
+ #define NGX_MODULE_SIGNATURE_20 "0"
144
+ #endif
145
+
146
+ #if (NGX_HAVE_POSIX_SEM)
147
+ #define NGX_MODULE_SIGNATURE_21 "1"
148
+ #else
149
+ #define NGX_MODULE_SIGNATURE_21 "0"
150
+ #endif
151
+
152
+ #if (NGX_THREADS)
153
+ #define NGX_MODULE_SIGNATURE_22 "1"
154
+ #else
155
+ #define NGX_MODULE_SIGNATURE_22 "0"
156
+ #endif
157
+
158
+ #if (NGX_PCRE)
159
+ #define NGX_MODULE_SIGNATURE_23 "1"
160
+ #else
161
+ #define NGX_MODULE_SIGNATURE_23 "0"
162
+ #endif
163
+
164
+ #if (NGX_HTTP_SSL)
165
+ #define NGX_MODULE_SIGNATURE_24 "1"
166
+ #else
167
+ #define NGX_MODULE_SIGNATURE_24 "0"
168
+ #endif
169
+
170
+ #if (NGX_HTTP_V2)
171
+ #define NGX_MODULE_SIGNATURE_25 "1"
172
+ #else
173
+ #define NGX_MODULE_SIGNATURE_25 "0"
174
+ #endif
175
+
176
+ #if (NGX_HTTP_GZIP)
177
+ #define NGX_MODULE_SIGNATURE_26 "1"
178
+ #else
179
+ #define NGX_MODULE_SIGNATURE_26 "0"
180
+ #endif
181
+
182
+ #if (NGX_HTTP_DEGRADATION)
183
+ #define NGX_MODULE_SIGNATURE_27 "1"
184
+ #else
185
+ #define NGX_MODULE_SIGNATURE_27 "0"
186
+ #endif
187
+
188
+ #if (NGX_HTTP_X_FORWARDED_FOR)
189
+ #define NGX_MODULE_SIGNATURE_28 "1"
190
+ #else
191
+ #define NGX_MODULE_SIGNATURE_28 "0"
192
+ #endif
193
+
194
+ #if (NGX_HTTP_REALIP)
195
+ #define NGX_MODULE_SIGNATURE_29 "1"
196
+ #else
197
+ #define NGX_MODULE_SIGNATURE_29 "0"
198
+ #endif
199
+
200
+ #if (NGX_HTTP_HEADERS)
201
+ #define NGX_MODULE_SIGNATURE_30 "1"
202
+ #else
203
+ #define NGX_MODULE_SIGNATURE_30 "0"
204
+ #endif
205
+
206
+ #if (NGX_HTTP_DAV)
207
+ #define NGX_MODULE_SIGNATURE_31 "1"
208
+ #else
209
+ #define NGX_MODULE_SIGNATURE_31 "0"
210
+ #endif
211
+
212
+ #if (NGX_HTTP_CACHE)
213
+ #define NGX_MODULE_SIGNATURE_32 "1"
214
+ #else
215
+ #define NGX_MODULE_SIGNATURE_32 "0"
216
+ #endif
217
+
218
+ #if (NGX_HTTP_UPSTREAM_ZONE)
219
+ #define NGX_MODULE_SIGNATURE_33 "1"
220
+ #else
221
+ #define NGX_MODULE_SIGNATURE_33 "0"
222
+ #endif
223
+
224
+ #define NGX_MODULE_SIGNATURE \
225
+ NGX_MODULE_SIGNATURE_0 NGX_MODULE_SIGNATURE_1 NGX_MODULE_SIGNATURE_2 \
226
+ NGX_MODULE_SIGNATURE_3 NGX_MODULE_SIGNATURE_4 NGX_MODULE_SIGNATURE_5 \
227
+ NGX_MODULE_SIGNATURE_6 NGX_MODULE_SIGNATURE_7 NGX_MODULE_SIGNATURE_8 \
228
+ NGX_MODULE_SIGNATURE_9 NGX_MODULE_SIGNATURE_10 NGX_MODULE_SIGNATURE_11 \
229
+ NGX_MODULE_SIGNATURE_12 NGX_MODULE_SIGNATURE_13 NGX_MODULE_SIGNATURE_14 \
230
+ NGX_MODULE_SIGNATURE_15 NGX_MODULE_SIGNATURE_16 NGX_MODULE_SIGNATURE_17 \
231
+ NGX_MODULE_SIGNATURE_18 NGX_MODULE_SIGNATURE_19 NGX_MODULE_SIGNATURE_20 \
232
+ NGX_MODULE_SIGNATURE_21 NGX_MODULE_SIGNATURE_22 NGX_MODULE_SIGNATURE_23 \
233
+ NGX_MODULE_SIGNATURE_24 NGX_MODULE_SIGNATURE_25 NGX_MODULE_SIGNATURE_26 \
234
+ NGX_MODULE_SIGNATURE_27 NGX_MODULE_SIGNATURE_28 NGX_MODULE_SIGNATURE_29 \
235
+ NGX_MODULE_SIGNATURE_30 NGX_MODULE_SIGNATURE_31 NGX_MODULE_SIGNATURE_32 \
236
+ NGX_MODULE_SIGNATURE_33
237
+
238
+
239
+ #define NGX_MODULE_V1 \
240
+ NGX_MODULE_UNSET_INDEX, NGX_MODULE_UNSET_INDEX, \
241
+ NULL, 0, 0, nginx_version, NGX_MODULE_SIGNATURE
242
+
243
+ #define NGX_MODULE_V1_PADDING 0, 0, 0, 0, 0, 0, 0, 0
244
+
245
+
246
+ struct ngx_module_s {
247
+ ngx_uint_t ctx_index;
248
+ ngx_uint_t index;
249
+
250
+ char *name;
251
+
252
+ ngx_uint_t spare0;
253
+ ngx_uint_t spare1;
254
+
255
+ ngx_uint_t version;
256
+ const char *signature;
257
+
258
+ void *ctx;
259
+ ngx_command_t *commands;
260
+ ngx_uint_t type;
261
+
262
+ ngx_int_t (*init_master)(ngx_log_t *log);
263
+
264
+ ngx_int_t (*init_module)(ngx_cycle_t *cycle);
265
+
266
+ ngx_int_t (*init_process)(ngx_cycle_t *cycle);
267
+ ngx_int_t (*init_thread)(ngx_cycle_t *cycle);
268
+ void (*exit_thread)(ngx_cycle_t *cycle);
269
+ void (*exit_process)(ngx_cycle_t *cycle);
270
+
271
+ void (*exit_master)(ngx_cycle_t *cycle);
272
+
273
+ uintptr_t spare_hook0;
274
+ uintptr_t spare_hook1;
275
+ uintptr_t spare_hook2;
276
+ uintptr_t spare_hook3;
277
+ uintptr_t spare_hook4;
278
+ uintptr_t spare_hook5;
279
+ uintptr_t spare_hook6;
280
+ uintptr_t spare_hook7;
281
+ };
282
+
283
+
284
+ typedef struct {
285
+ ngx_str_t name;
286
+ void *(*create_conf)(ngx_cycle_t *cycle);
287
+ char *(*init_conf)(ngx_cycle_t *cycle, void *conf);
288
+ } ngx_core_module_t;
289
+
290
+
291
+ ngx_int_t ngx_preinit_modules(void);
292
+ ngx_int_t ngx_cycle_modules(ngx_cycle_t *cycle);
293
+ ngx_int_t ngx_init_modules(ngx_cycle_t *cycle);
294
+ ngx_int_t ngx_count_modules(ngx_cycle_t *cycle, ngx_uint_t type);
295
+
296
+
297
+ ngx_int_t ngx_add_module(ngx_conf_t *cf, ngx_str_t *file,
298
+ ngx_module_t *module, char **order);
299
+
300
+
301
+ extern ngx_module_t *ngx_modules[];
302
+ extern ngx_uint_t ngx_max_module;
303
+
304
+ extern char *ngx_module_names[];
305
+
306
+
307
+ #endif /* _NGX_MODULE_H_INCLUDED_ */
@@ -128,7 +128,7 @@ ngx_open_file_cache_cleanup(void *data)
128
128
 
129
129
  if (cache->current) {
130
130
  ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0,
131
- "%ui items still leave in open file cache",
131
+ "%ui items still left in open file cache",
132
132
  cache->current);
133
133
  }
134
134
 
@@ -544,7 +544,7 @@ failed:
544
544
 
545
545
  if (ngx_close_file(fd) == NGX_FILE_ERROR) {
546
546
  ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
547
- ngx_close_file_n " \"%V\" failed", name);
547
+ ngx_close_file_n " \"%s\" failed", name);
548
548
  }
549
549
 
550
550
  ngx_set_errno(err);
@@ -577,11 +577,15 @@ ngx_output_chain_copy_buf(ngx_output_chain_ctx_t *ctx)
577
577
  } else
578
578
  #endif
579
579
  #if (NGX_THREADS)
580
- if (src->file->thread_handler) {
581
- n = ngx_thread_read(&ctx->thread_task, src->file, dst->pos,
582
- (size_t) size, src->file_pos, ctx->pool);
580
+ if (ctx->thread_handler) {
581
+ src->file->thread_task = ctx->thread_task;
582
+ src->file->thread_handler = ctx->thread_handler;
583
+ src->file->thread_ctx = ctx->filter_ctx;
584
+
585
+ n = ngx_thread_read(src->file, dst->pos, (size_t) size,
586
+ src->file_pos, ctx->pool);
583
587
  if (n == NGX_AGAIN) {
584
- ctx->aio = 1;
588
+ ctx->thread_task = src->file->thread_task;
585
589
  return NGX_AGAIN;
586
590
  }
587
591
 
@@ -9,6 +9,8 @@
9
9
  #include <ngx_core.h>
10
10
 
11
11
 
12
+ static ngx_inline void *ngx_palloc_small(ngx_pool_t *pool, size_t size,
13
+ ngx_uint_t align);
12
14
  static void *ngx_palloc_block(ngx_pool_t *pool, size_t size);
13
15
  static void *ngx_palloc_large(ngx_pool_t *pool, size_t size);
14
16
 
@@ -56,15 +58,6 @@ ngx_destroy_pool(ngx_pool_t *pool)
56
58
  }
57
59
  }
58
60
 
59
- for (l = pool->large; l; l = l->next) {
60
-
61
- ngx_log_debug1(NGX_LOG_DEBUG_ALLOC, pool->log, 0, "free: %p", l->alloc);
62
-
63
- if (l->alloc) {
64
- ngx_free(l->alloc);
65
- }
66
- }
67
-
68
61
  #if (NGX_DEBUG)
69
62
 
70
63
  /*
@@ -72,6 +65,10 @@ ngx_destroy_pool(ngx_pool_t *pool)
72
65
  * so we cannot use this log while free()ing the pool
73
66
  */
74
67
 
68
+ for (l = pool->large; l; l = l->next) {
69
+ ngx_log_debug1(NGX_LOG_DEBUG_ALLOC, pool->log, 0, "free: %p", l->alloc);
70
+ }
71
+
75
72
  for (p = pool, n = pool->d.next; /* void */; p = n, n = n->d.next) {
76
73
  ngx_log_debug2(NGX_LOG_DEBUG_ALLOC, pool->log, 0,
77
74
  "free: %p, unused: %uz", p, p->d.end - p->d.last);
@@ -83,6 +80,12 @@ ngx_destroy_pool(ngx_pool_t *pool)
83
80
 
84
81
  #endif
85
82
 
83
+ for (l = pool->large; l; l = l->next) {
84
+ if (l->alloc) {
85
+ ngx_free(l->alloc);
86
+ }
87
+ }
88
+
86
89
  for (p = pool, n = pool->d.next; /* void */; p = n, n = n->d.next) {
87
90
  ngx_free(p);
88
91
 
@@ -119,60 +122,55 @@ ngx_reset_pool(ngx_pool_t *pool)
119
122
  void *
120
123
  ngx_palloc(ngx_pool_t *pool, size_t size)
121
124
  {
122
- u_char *m;
123
- ngx_pool_t *p;
124
-
125
+ #if !(NGX_DEBUG_PALLOC)
125
126
  if (size <= pool->max) {
127
+ return ngx_palloc_small(pool, size, 1);
128
+ }
129
+ #endif
126
130
 
127
- p = pool->current;
128
-
129
- do {
130
- m = ngx_align_ptr(p->d.last, NGX_ALIGNMENT);
131
-
132
- if ((size_t) (p->d.end - m) >= size) {
133
- p->d.last = m + size;
134
-
135
- return m;
136
- }
137
-
138
- p = p->d.next;
131
+ return ngx_palloc_large(pool, size);
132
+ }
139
133
 
140
- } while (p);
141
134
 
142
- return ngx_palloc_block(pool, size);
135
+ void *
136
+ ngx_pnalloc(ngx_pool_t *pool, size_t size)
137
+ {
138
+ #if !(NGX_DEBUG_PALLOC)
139
+ if (size <= pool->max) {
140
+ return ngx_palloc_small(pool, size, 0);
143
141
  }
142
+ #endif
144
143
 
145
144
  return ngx_palloc_large(pool, size);
146
145
  }
147
146
 
148
147
 
149
- void *
150
- ngx_pnalloc(ngx_pool_t *pool, size_t size)
148
+ static ngx_inline void *
149
+ ngx_palloc_small(ngx_pool_t *pool, size_t size, ngx_uint_t align)
151
150
  {
152
151
  u_char *m;
153
152
  ngx_pool_t *p;
154
153
 
155
- if (size <= pool->max) {
156
-
157
- p = pool->current;
154
+ p = pool->current;
158
155
 
159
- do {
160
- m = p->d.last;
156
+ do {
157
+ m = p->d.last;
161
158
 
162
- if ((size_t) (p->d.end - m) >= size) {
163
- p->d.last = m + size;
159
+ if (align) {
160
+ m = ngx_align_ptr(m, NGX_ALIGNMENT);
161
+ }
164
162
 
165
- return m;
166
- }
163
+ if ((size_t) (p->d.end - m) >= size) {
164
+ p->d.last = m + size;
167
165
 
168
- p = p->d.next;
166
+ return m;
167
+ }
169
168
 
170
- } while (p);
169
+ p = p->d.next;
171
170
 
172
- return ngx_palloc_block(pool, size);
173
- }
171
+ } while (p);
174
172
 
175
- return ngx_palloc_large(pool, size);
173
+ return ngx_palloc_block(pool, size);
176
174
  }
177
175
 
178
176
 
@@ -237,7 +235,7 @@ ngx_palloc_large(ngx_pool_t *pool, size_t size)
237
235
  }
238
236
  }
239
237
 
240
- large = ngx_palloc(pool, sizeof(ngx_pool_large_t));
238
+ large = ngx_palloc_small(pool, sizeof(ngx_pool_large_t), 1);
241
239
  if (large == NULL) {
242
240
  ngx_free(p);
243
241
  return NULL;
@@ -262,7 +260,7 @@ ngx_pmemalign(ngx_pool_t *pool, size_t size, size_t alignment)
262
260
  return NULL;
263
261
  }
264
262
 
265
- large = ngx_palloc(pool, sizeof(ngx_pool_large_t));
263
+ large = ngx_palloc_small(pool, sizeof(ngx_pool_large_t), 1);
266
264
  if (large == NULL) {
267
265
  ngx_free(p);
268
266
  return NULL;