nginxtra 1.2.3.7 → 1.2.4.7
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/nginxtra +1 -1
- data/bin/nginxtra_rails +1 -1
- data/lib/nginxtra/version.rb +1 -1
- data/vendor/nginx/CHANGES +28 -0
- data/vendor/nginx/CHANGES.ru +27 -0
- data/vendor/nginx/auto/install +1 -1
- data/vendor/nginx/auto/lib/libatomic/make +1 -1
- data/vendor/nginx/auto/lib/perl/make +1 -1
- data/vendor/nginx/auto/lib/zlib/makefile.bcc +5 -3
- data/vendor/nginx/auto/lib/zlib/makefile.msvc +5 -2
- data/vendor/nginx/auto/lib/zlib/makefile.owc +2 -2
- data/vendor/nginx/html/50x.html +14 -11
- data/vendor/nginx/html/index.html +19 -2
- data/vendor/nginx/src/core/nginx.c +1 -1
- data/vendor/nginx/src/core/nginx.h +2 -2
- data/vendor/nginx/src/core/ngx_conf_file.c +1 -2
- data/vendor/nginx/src/core/ngx_conf_file.h +1 -0
- data/vendor/nginx/src/core/ngx_crypt.c +9 -2
- data/vendor/nginx/src/core/ngx_cycle.c +8 -8
- data/vendor/nginx/src/core/ngx_radix_tree.c +1 -1
- data/vendor/nginx/src/core/ngx_resolver.c +9 -9
- data/vendor/nginx/src/core/ngx_slab.c +2 -2
- data/vendor/nginx/src/core/ngx_string.c +1 -1
- data/vendor/nginx/src/core/ngx_string.h +1 -1
- data/vendor/nginx/src/core/ngx_times.c +4 -0
- data/vendor/nginx/src/event/ngx_event.c +1 -1
- data/vendor/nginx/src/http/modules/ngx_http_fastcgi_module.c +3 -0
- data/vendor/nginx/src/http/modules/ngx_http_geo_module.c +14 -5
- data/vendor/nginx/src/http/modules/ngx_http_geoip_module.c +10 -1
- data/vendor/nginx/src/http/modules/ngx_http_limit_conn_module.c +4 -0
- data/vendor/nginx/src/http/modules/ngx_http_limit_req_module.c +7 -4
- data/vendor/nginx/src/http/modules/ngx_http_map_module.c +4 -18
- data/vendor/nginx/src/http/modules/ngx_http_ssi_filter_module.c +1 -0
- data/vendor/nginx/src/http/modules/perl/nginx.pm +1 -1
- data/vendor/nginx/src/http/ngx_http_core_module.c +11 -10
- data/vendor/nginx/src/http/ngx_http_write_filter_module.c +7 -11
- data/vendor/nginx/src/mail/ngx_mail.c +11 -0
- data/vendor/nginx/src/mail/ngx_mail_auth_http_module.c +1 -1
- data/vendor/nginx/src/mail/ngx_mail_core_module.c +22 -12
- data/vendor/nginx/src/mail/ngx_mail_handler.c +0 -2
- data/vendor/nginx/src/os/unix/ngx_files.c +1 -1
- metadata +3 -3
data/bin/nginxtra
CHANGED
data/bin/nginxtra_rails
CHANGED
data/lib/nginxtra/version.rb
CHANGED
data/vendor/nginx/CHANGES
CHANGED
@@ -1,4 +1,32 @@
|
|
1
1
|
|
2
|
+
Changes with nginx 1.2.4 25 Sep 2012
|
3
|
+
|
4
|
+
*) Bugfix: in the "limit_req" directive; the bug had appeared in 1.1.14.
|
5
|
+
Thanks to Charles Chen.
|
6
|
+
|
7
|
+
*) Bugfix: nginx could not be built by gcc 4.7 with -O2 optimization if
|
8
|
+
the --with-ipv6 option was used.
|
9
|
+
|
10
|
+
*) Bugfix: a segmentation fault might occur in a worker process if the
|
11
|
+
"map" directive was used with variables as values.
|
12
|
+
|
13
|
+
*) Bugfix: a segmentation fault might occur in a worker process if the
|
14
|
+
"geo" directive was used with the "ranges" parameter but without the
|
15
|
+
"default" parameter; the bug had appeared in 0.8.43.
|
16
|
+
Thanks to Zhen Chen and Weibin Yao.
|
17
|
+
|
18
|
+
*) Bugfix: in the -p command-line parameter handling.
|
19
|
+
|
20
|
+
*) Bugfix: in the mail proxy server.
|
21
|
+
|
22
|
+
*) Bugfix: of minor potential bugs.
|
23
|
+
Thanks to Coverity.
|
24
|
+
|
25
|
+
*) Bugfix: nginx/Windows could not be built with Visual Studio 2005
|
26
|
+
Express.
|
27
|
+
Thanks to HAYASHI Kentaro.
|
28
|
+
|
29
|
+
|
2
30
|
Changes with nginx 1.2.3 07 Aug 2012
|
3
31
|
|
4
32
|
*) Feature: the Clang compiler support.
|
data/vendor/nginx/CHANGES.ru
CHANGED
@@ -1,4 +1,31 @@
|
|
1
1
|
|
2
|
+
Изменения в nginx 1.2.4 25.09.2012
|
3
|
+
|
4
|
+
*) Исправление: в директиве "limit_req"; ошибка появилась в 1.1.14.
|
5
|
+
Спасибо Charles Chen.
|
6
|
+
|
7
|
+
*) Исправление: nginx не собирался gcc 4.7 с оптимизацией -O2 если
|
8
|
+
использовался параметр --with-ipv6.
|
9
|
+
|
10
|
+
*) Исправление: в рабочем процессе мог произойти segmentation fault,
|
11
|
+
если в директиве map в качестве значений использовались переменные.
|
12
|
+
|
13
|
+
*) Исправление: в рабочем процессе мог произойти segmentation fault при
|
14
|
+
использовании директивы geo с параметром ranges, но без параметра
|
15
|
+
default; ошибка появилась в 0.8.43.
|
16
|
+
Спасибо Zhen Chen и Weibin Yao.
|
17
|
+
|
18
|
+
*) Исправление: в обработке параметра командной строки -p.
|
19
|
+
|
20
|
+
*) Исправление: в почтовом прокси-сервере.
|
21
|
+
|
22
|
+
*) Исправление: незначительных потенциальных ошибок.
|
23
|
+
Спасибо Coverity.
|
24
|
+
|
25
|
+
*) Исправление: nginx/Windows не собирался с Visual Studio 2005 Express.
|
26
|
+
Спасибо HAYASHI Kentaro.
|
27
|
+
|
28
|
+
|
2
29
|
Изменения в nginx 1.2.3 07.08.2012
|
3
30
|
|
4
31
|
*) Добавление: поддержка компилятора Clang.
|
data/vendor/nginx/auto/install
CHANGED
@@ -12,7 +12,7 @@ $NGX_OBJS/src/http/modules/perl/blib/arch/auto/nginx/nginx.so: \
|
|
12
12
|
$NGX_OBJS/src/http/modules/perl/Makefile
|
13
13
|
cp -p src/http/modules/perl/nginx.* $NGX_OBJS/src/http/modules/perl/
|
14
14
|
|
15
|
-
cd $NGX_OBJS/src/http/modules/perl && \$
|
15
|
+
cd $NGX_OBJS/src/http/modules/perl && \$(MAKE)
|
16
16
|
|
17
17
|
rm -rf $NGX_OBJS/install_perl
|
18
18
|
|
@@ -8,8 +8,10 @@ CFLAGS = -q -O2 -tWM -w-8004 -w-8012 $(CPU_OPT)
|
|
8
8
|
zlib.lib:
|
9
9
|
cd $(ZLIB)
|
10
10
|
|
11
|
-
bcc32 -c $(CFLAGS) adler32.c crc32.c deflate.c
|
12
|
-
compress.c
|
11
|
+
bcc32 -c $(CFLAGS) adler32.c crc32.c deflate.c \
|
12
|
+
trees.c zutil.c compress.c \
|
13
|
+
inflate.c inffast.c inftrees.c
|
13
14
|
|
14
15
|
tlib zlib.lib +adler32.obj +crc32.obj +deflate.obj \
|
15
|
-
+trees.obj +zutil.obj +compress.obj
|
16
|
+
+trees.obj +zutil.obj +compress.obj \
|
17
|
+
+inflate.obj +inffast.obj +inftrees.obj
|
@@ -8,7 +8,10 @@ CFLAGS = -nologo -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT)
|
|
8
8
|
zlib.lib:
|
9
9
|
cd $(ZLIB)
|
10
10
|
|
11
|
-
cl -c $(CFLAGS) adler32.c crc32.c deflate.c
|
11
|
+
cl -c $(CFLAGS) adler32.c crc32.c deflate.c \
|
12
|
+
trees.c zutil.c compress.c \
|
13
|
+
inflate.c inffast.c inftrees.c
|
12
14
|
|
13
15
|
link -lib -out:zlib.lib adler32.obj crc32.obj deflate.obj \
|
14
|
-
trees.obj zutil.obj compress.obj
|
16
|
+
trees.obj zutil.obj compress.obj \
|
17
|
+
inflate.obj inffast.obj inftrees.obj
|
@@ -9,6 +9,6 @@ zlib.lib:
|
|
9
9
|
cd $(ZLIB)
|
10
10
|
|
11
11
|
wcl386 -c $(CFLAGS) adler32.c crc32.c deflate.c trees.c zutil.c &
|
12
|
-
compress.c
|
12
|
+
compress.c inflate.c inffast.c inftrees.c
|
13
13
|
wlib -n zlib.lib adler32.obj crc32.obj deflate.obj trees.obj &
|
14
|
-
zutil.obj compress.obj
|
14
|
+
zutil.obj compress.obj inflate.obj inffast.obj inftrees.obj
|
data/vendor/nginx/html/50x.html
CHANGED
@@ -1,18 +1,21 @@
|
|
1
|
+
<!DOCTYPE html>
|
1
2
|
<html>
|
2
3
|
<head>
|
3
|
-
<title>
|
4
|
+
<title>Error</title>
|
4
5
|
<style>
|
5
|
-
body {
|
6
|
+
body {
|
7
|
+
width: 35em;
|
8
|
+
margin: 0 auto;
|
9
|
+
font-family: Tahoma, Verdana, Arial, sans-serif;
|
10
|
+
}
|
6
11
|
</style>
|
7
12
|
</head>
|
8
|
-
<body
|
9
|
-
<
|
10
|
-
<
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
</tr>
|
16
|
-
</table>
|
13
|
+
<body>
|
14
|
+
<h1>An error occurred.</h1>
|
15
|
+
<p>Sorry, the page you are looking for is currently unavailable.<br/>
|
16
|
+
Please try again later.</p>
|
17
|
+
<p>If you are the system administrator of this resource then you should check
|
18
|
+
the <a href="http://nginx.org/r/error_log">error log</a> for details.</p>
|
19
|
+
<p><em>Faithfully yours, nginx.</em></p>
|
17
20
|
</body>
|
18
21
|
</html>
|
@@ -1,8 +1,25 @@
|
|
1
|
+
<!DOCTYPE html>
|
1
2
|
<html>
|
2
3
|
<head>
|
3
4
|
<title>Welcome to nginx!</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
width: 35em;
|
8
|
+
margin: 0 auto;
|
9
|
+
font-family: Tahoma, Verdana, Arial, sans-serif;
|
10
|
+
}
|
11
|
+
</style>
|
4
12
|
</head>
|
5
|
-
<body
|
6
|
-
<
|
13
|
+
<body>
|
14
|
+
<h1>Welcome to nginx!</h1>
|
15
|
+
<p>If you see this page, the nginx web server is successfully installed and
|
16
|
+
working. Further configuration is required.</p>
|
17
|
+
|
18
|
+
<p>For online documentation and support please refer to
|
19
|
+
<a href="http://nginx.org/">nginx.org</a>.<br/>
|
20
|
+
Commercial support is available at
|
21
|
+
<a href="http://nginx.com/">nginx.com</a>.</p>
|
22
|
+
|
23
|
+
<p><em>Thank you for using nginx.</em></p>
|
7
24
|
</body>
|
8
25
|
</html>
|
@@ -836,7 +836,7 @@ ngx_process_options(ngx_cycle_t *cycle)
|
|
836
836
|
len = ngx_strlen(ngx_prefix);
|
837
837
|
p = ngx_prefix;
|
838
838
|
|
839
|
-
if (!ngx_path_separator(
|
839
|
+
if (len && !ngx_path_separator(p[len - 1])) {
|
840
840
|
p = ngx_pnalloc(cycle->pool, len + 1);
|
841
841
|
if (p == NULL) {
|
842
842
|
return NGX_ERROR;
|
@@ -12,7 +12,6 @@
|
|
12
12
|
|
13
13
|
static ngx_int_t ngx_conf_handler(ngx_conf_t *cf, ngx_int_t last);
|
14
14
|
static ngx_int_t ngx_conf_read_token(ngx_conf_t *cf);
|
15
|
-
static char *ngx_conf_include(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
|
16
15
|
static ngx_int_t ngx_conf_test_full_name(ngx_str_t *name);
|
17
16
|
static void ngx_conf_flush_files(ngx_cycle_t *cycle);
|
18
17
|
|
@@ -731,7 +730,7 @@ ngx_conf_read_token(ngx_conf_t *cf)
|
|
731
730
|
}
|
732
731
|
|
733
732
|
|
734
|
-
|
733
|
+
char *
|
735
734
|
ngx_conf_include(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
736
735
|
{
|
737
736
|
char *rv;
|
@@ -317,6 +317,7 @@ char *ngx_conf_check_num_bounds(ngx_conf_t *cf, void *post, void *data);
|
|
317
317
|
|
318
318
|
char *ngx_conf_param(ngx_conf_t *cf);
|
319
319
|
char *ngx_conf_parse(ngx_conf_t *cf, ngx_str_t *filename);
|
320
|
+
char *ngx_conf_include(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
|
320
321
|
|
321
322
|
|
322
323
|
ngx_int_t ngx_conf_full_name(ngx_cycle_t *cycle, ngx_str_t *name,
|
@@ -194,6 +194,7 @@ static ngx_int_t
|
|
194
194
|
ngx_crypt_ssha(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted)
|
195
195
|
{
|
196
196
|
size_t len;
|
197
|
+
ngx_int_t rc;
|
197
198
|
ngx_str_t encoded, decoded;
|
198
199
|
ngx_sha1_t sha1;
|
199
200
|
|
@@ -204,12 +205,18 @@ ngx_crypt_ssha(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted)
|
|
204
205
|
encoded.data = salt + sizeof("{SSHA}") - 1;
|
205
206
|
encoded.len = ngx_strlen(encoded.data);
|
206
207
|
|
207
|
-
|
208
|
+
len = ngx_max(ngx_base64_decoded_length(encoded.len), 20);
|
209
|
+
|
210
|
+
decoded.data = ngx_pnalloc(pool, len);
|
208
211
|
if (decoded.data == NULL) {
|
209
212
|
return NGX_ERROR;
|
210
213
|
}
|
211
214
|
|
212
|
-
ngx_decode_base64(&decoded, &encoded);
|
215
|
+
rc = ngx_decode_base64(&decoded, &encoded);
|
216
|
+
|
217
|
+
if (rc != NGX_OK || decoded.len < 20) {
|
218
|
+
decoded.len = 20;
|
219
|
+
}
|
213
220
|
|
214
221
|
/* update SHA1 from key and salt */
|
215
222
|
|
@@ -1285,14 +1285,6 @@ ngx_shared_memory_add(ngx_conf_t *cf, ngx_str_t *name, size_t size, void *tag)
|
|
1285
1285
|
continue;
|
1286
1286
|
}
|
1287
1287
|
|
1288
|
-
if (size && size != shm_zone[i].shm.size) {
|
1289
|
-
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
1290
|
-
"the size %uz of shared memory zone \"%V\" "
|
1291
|
-
"conflicts with already declared size %uz",
|
1292
|
-
size, &shm_zone[i].shm.name, shm_zone[i].shm.size);
|
1293
|
-
return NULL;
|
1294
|
-
}
|
1295
|
-
|
1296
1288
|
if (tag != shm_zone[i].tag) {
|
1297
1289
|
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
1298
1290
|
"the shared memory zone \"%V\" is "
|
@@ -1301,6 +1293,14 @@ ngx_shared_memory_add(ngx_conf_t *cf, ngx_str_t *name, size_t size, void *tag)
|
|
1301
1293
|
return NULL;
|
1302
1294
|
}
|
1303
1295
|
|
1296
|
+
if (size && size != shm_zone[i].shm.size) {
|
1297
|
+
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
1298
|
+
"the size %uz of shared memory zone \"%V\" "
|
1299
|
+
"conflicts with already declared size %uz",
|
1300
|
+
size, &shm_zone[i].shm.name, shm_zone[i].shm.size);
|
1301
|
+
return NULL;
|
1302
|
+
}
|
1303
|
+
|
1304
1304
|
return &shm_zone[i];
|
1305
1305
|
}
|
1306
1306
|
|
@@ -113,15 +113,6 @@ ngx_resolver_create(ngx_conf_t *cf, ngx_str_t *names, ngx_uint_t n)
|
|
113
113
|
return NULL;
|
114
114
|
}
|
115
115
|
|
116
|
-
if (n) {
|
117
|
-
if (ngx_array_init(&r->udp_connections, cf->pool, n,
|
118
|
-
sizeof(ngx_udp_connection_t))
|
119
|
-
!= NGX_OK)
|
120
|
-
{
|
121
|
-
return NULL;
|
122
|
-
}
|
123
|
-
}
|
124
|
-
|
125
116
|
cln->data = r;
|
126
117
|
|
127
118
|
r->event = ngx_calloc(sizeof(ngx_event_t), cf->log);
|
@@ -153,6 +144,15 @@ ngx_resolver_create(ngx_conf_t *cf, ngx_str_t *names, ngx_uint_t n)
|
|
153
144
|
r->log = &cf->cycle->new_log;
|
154
145
|
r->log_level = NGX_LOG_ERR;
|
155
146
|
|
147
|
+
if (n) {
|
148
|
+
if (ngx_array_init(&r->udp_connections, cf->pool, n,
|
149
|
+
sizeof(ngx_udp_connection_t))
|
150
|
+
!= NGX_OK)
|
151
|
+
{
|
152
|
+
return NULL;
|
153
|
+
}
|
154
|
+
}
|
155
|
+
|
156
156
|
for (i = 0; i < n; i++) {
|
157
157
|
if (ngx_strncmp(names[i].data, "valid=", 6) == 0) {
|
158
158
|
s.len = names[i].len - 6;
|
@@ -162,8 +162,8 @@ ngx_slab_alloc_locked(ngx_slab_pool_t *pool, size_t size)
|
|
162
162
|
ngx_log_debug1(NGX_LOG_DEBUG_ALLOC, ngx_cycle->log, 0,
|
163
163
|
"slab alloc: %uz", size);
|
164
164
|
|
165
|
-
page = ngx_slab_alloc_pages(pool, (size
|
166
|
-
|
165
|
+
page = ngx_slab_alloc_pages(pool, (size >> ngx_pagesize_shift)
|
166
|
+
+ ((size % ngx_pagesize) ? 1 : 0));
|
167
167
|
if (page) {
|
168
168
|
p = (page - pool->pages) << ngx_pagesize_shift;
|
169
169
|
p += (uintptr_t) pool->start;
|
@@ -1827,7 +1827,7 @@ ngx_sort(void *base, size_t n, size_t size,
|
|
1827
1827
|
#if (NGX_MEMCPY_LIMIT)
|
1828
1828
|
|
1829
1829
|
void *
|
1830
|
-
ngx_memcpy(void *dst, void *src, size_t n)
|
1830
|
+
ngx_memcpy(void *dst, const void *src, size_t n)
|
1831
1831
|
{
|
1832
1832
|
if (n > NGX_MEMCPY_LIMIT) {
|
1833
1833
|
ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0, "memcpy %uz bytes", n);
|
@@ -89,7 +89,7 @@ ngx_strlchr(u_char *p, u_char *last, u_char c)
|
|
89
89
|
|
90
90
|
#if (NGX_MEMCPY_LIMIT)
|
91
91
|
|
92
|
-
void *ngx_memcpy(void *dst, void *src, size_t n);
|
92
|
+
void *ngx_memcpy(void *dst, const void *src, size_t n);
|
93
93
|
#define ngx_cpymem(dst, src, n) (((u_char *) ngx_memcpy(dst, src, n)) + (n))
|
94
94
|
|
95
95
|
#else
|
@@ -233,12 +233,21 @@ ngx_http_geo_addr(ngx_http_request_t *r, ngx_http_geo_ctx_t *ctx)
|
|
233
233
|
#if (NGX_HAVE_INET6)
|
234
234
|
|
235
235
|
if (addr.sockaddr->sa_family == AF_INET6) {
|
236
|
+
u_char *p;
|
237
|
+
in_addr_t inaddr;
|
236
238
|
struct in6_addr *inaddr6;
|
237
239
|
|
238
240
|
inaddr6 = &((struct sockaddr_in6 *) addr.sockaddr)->sin6_addr;
|
239
241
|
|
240
242
|
if (IN6_IS_ADDR_V4MAPPED(inaddr6)) {
|
241
|
-
|
243
|
+
p = inaddr6->s6_addr;
|
244
|
+
|
245
|
+
inaddr = p[12] << 24;
|
246
|
+
inaddr += p[13] << 16;
|
247
|
+
inaddr += p[14] << 8;
|
248
|
+
inaddr += p[15];
|
249
|
+
|
250
|
+
return inaddr;
|
242
251
|
}
|
243
252
|
}
|
244
253
|
|
@@ -400,15 +409,15 @@ ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|
400
409
|
}
|
401
410
|
}
|
402
411
|
|
412
|
+
if (ctx.high.default_value == NULL) {
|
413
|
+
ctx.high.default_value = &ngx_http_variable_null_value;
|
414
|
+
}
|
415
|
+
|
403
416
|
geo->u.high = ctx.high;
|
404
417
|
|
405
418
|
var->get_handler = ngx_http_geo_range_variable;
|
406
419
|
var->data = (uintptr_t) geo;
|
407
420
|
|
408
|
-
if (ctx.high.default_value == NULL) {
|
409
|
-
ctx.high.default_value = &ngx_http_variable_null_value;
|
410
|
-
}
|
411
|
-
|
412
421
|
ngx_destroy_pool(ctx.temp_pool);
|
413
422
|
ngx_destroy_pool(pool);
|
414
423
|
|
@@ -226,12 +226,21 @@ ngx_http_geoip_addr(ngx_http_request_t *r, ngx_http_geoip_conf_t *gcf)
|
|
226
226
|
#if (NGX_HAVE_INET6)
|
227
227
|
|
228
228
|
if (addr.sockaddr->sa_family == AF_INET6) {
|
229
|
+
u_char *p;
|
230
|
+
in_addr_t inaddr;
|
229
231
|
struct in6_addr *inaddr6;
|
230
232
|
|
231
233
|
inaddr6 = &((struct sockaddr_in6 *) addr.sockaddr)->sin6_addr;
|
232
234
|
|
233
235
|
if (IN6_IS_ADDR_V4MAPPED(inaddr6)) {
|
234
|
-
|
236
|
+
p = inaddr6->s6_addr;
|
237
|
+
|
238
|
+
inaddr = p[12] << 24;
|
239
|
+
inaddr += p[13] << 16;
|
240
|
+
inaddr += p[14] << 8;
|
241
|
+
inaddr += p[15];
|
242
|
+
|
243
|
+
return inaddr;
|
235
244
|
}
|
236
245
|
}
|
237
246
|
|
@@ -444,17 +444,17 @@ ngx_http_limit_req_lookup(ngx_http_limit_req_limit_t *limit, ngx_uint_t hash,
|
|
444
444
|
|
445
445
|
node->key = hash;
|
446
446
|
|
447
|
-
ngx_rbtree_insert(&ctx->sh->rbtree, node);
|
448
|
-
|
449
447
|
lr = (ngx_http_limit_req_node_t *) &node->color;
|
450
448
|
|
451
|
-
ngx_queue_insert_head(&ctx->sh->queue, &lr->queue);
|
452
|
-
|
453
449
|
lr->len = (u_char) len;
|
454
450
|
lr->excess = 0;
|
455
451
|
|
456
452
|
ngx_memcpy(lr->data, data, len);
|
457
453
|
|
454
|
+
ngx_rbtree_insert(&ctx->sh->rbtree, node);
|
455
|
+
|
456
|
+
ngx_queue_insert_head(&ctx->sh->queue, &lr->queue);
|
457
|
+
|
458
458
|
if (account) {
|
459
459
|
lr->last = now;
|
460
460
|
lr->count = 0;
|
@@ -937,6 +937,9 @@ ngx_http_limit_req(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|
937
937
|
}
|
938
938
|
|
939
939
|
limit = ngx_array_push(&lrcf->limits);
|
940
|
+
if (limit == NULL) {
|
941
|
+
return NGX_CONF_ERROR;
|
942
|
+
}
|
940
943
|
|
941
944
|
limit->shm_zone = shm_zone;
|
942
945
|
limit->burst = burst * 1000;
|
@@ -369,7 +369,7 @@ static char *
|
|
369
369
|
ngx_http_map(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
|
370
370
|
{
|
371
371
|
ngx_int_t rc, index;
|
372
|
-
ngx_str_t *value,
|
372
|
+
ngx_str_t *value, name;
|
373
373
|
ngx_uint_t i, key;
|
374
374
|
ngx_http_map_conf_ctx_t *ctx;
|
375
375
|
ngx_http_variable_value_t *var, **vp;
|
@@ -391,15 +391,7 @@ ngx_http_map(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
|
|
391
391
|
}
|
392
392
|
|
393
393
|
if (ngx_strcmp(value[0].data, "include") == 0) {
|
394
|
-
|
395
|
-
|
396
|
-
if (ngx_conf_full_name(cf->cycle, &file, 1) != NGX_OK) {
|
397
|
-
return NGX_CONF_ERROR;
|
398
|
-
}
|
399
|
-
|
400
|
-
ngx_log_debug1(NGX_LOG_DEBUG_CORE, cf->log, 0, "include %s", file.data);
|
401
|
-
|
402
|
-
return ngx_conf_parse(cf, &file);
|
394
|
+
return ngx_conf_include(cf, dummy, conf);
|
403
395
|
}
|
404
396
|
|
405
397
|
if (value[1].data[0] == '$') {
|
@@ -416,11 +408,12 @@ ngx_http_map(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
|
|
416
408
|
|
417
409
|
for (i = 0; i < ctx->var_values.nelts; i++) {
|
418
410
|
if (index == (ngx_int_t) var[i].data) {
|
411
|
+
var = &var[i];
|
419
412
|
goto found;
|
420
413
|
}
|
421
414
|
}
|
422
415
|
|
423
|
-
var =
|
416
|
+
var = ngx_array_push(&ctx->var_values);
|
424
417
|
if (var == NULL) {
|
425
418
|
return NGX_CONF_ERROR;
|
426
419
|
}
|
@@ -431,13 +424,6 @@ ngx_http_map(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
|
|
431
424
|
var->len = 0;
|
432
425
|
var->data = (u_char *) index;
|
433
426
|
|
434
|
-
vp = ngx_array_push(&ctx->var_values);
|
435
|
-
if (vp == NULL) {
|
436
|
-
return NGX_CONF_ERROR;
|
437
|
-
}
|
438
|
-
|
439
|
-
*vp = var;
|
440
|
-
|
441
427
|
goto found;
|
442
428
|
}
|
443
429
|
|
@@ -2733,7 +2733,15 @@ ngx_http_get_forwarded_addr(ngx_http_request_t *r, ngx_addr_t *addr,
|
|
2733
2733
|
|
2734
2734
|
if (IN6_IS_ADDR_V4MAPPED(inaddr6)) {
|
2735
2735
|
family = AF_INET;
|
2736
|
-
|
2736
|
+
|
2737
|
+
p = inaddr6->s6_addr;
|
2738
|
+
|
2739
|
+
inaddr = p[12] << 24;
|
2740
|
+
inaddr += p[13] << 16;
|
2741
|
+
inaddr += p[14] << 8;
|
2742
|
+
inaddr += p[15];
|
2743
|
+
|
2744
|
+
inaddr = htonl(inaddr);
|
2737
2745
|
}
|
2738
2746
|
}
|
2739
2747
|
#endif
|
@@ -3193,7 +3201,7 @@ ngx_http_core_type(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
|
|
3193
3201
|
{
|
3194
3202
|
ngx_http_core_loc_conf_t *clcf = conf;
|
3195
3203
|
|
3196
|
-
ngx_str_t *value, *content_type, *old
|
3204
|
+
ngx_str_t *value, *content_type, *old;
|
3197
3205
|
ngx_uint_t i, n, hash;
|
3198
3206
|
ngx_hash_key_t *type;
|
3199
3207
|
|
@@ -3206,15 +3214,8 @@ ngx_http_core_type(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
|
|
3206
3214
|
" in \"include\" directive");
|
3207
3215
|
return NGX_CONF_ERROR;
|
3208
3216
|
}
|
3209
|
-
file = value[1];
|
3210
|
-
|
3211
|
-
if (ngx_conf_full_name(cf->cycle, &file, 1) != NGX_OK) {
|
3212
|
-
return NGX_CONF_ERROR;
|
3213
|
-
}
|
3214
|
-
|
3215
|
-
ngx_log_debug1(NGX_LOG_DEBUG_CORE, cf->log, 0, "include %s", file.data);
|
3216
3217
|
|
3217
|
-
return
|
3218
|
+
return ngx_conf_include(cf, dummy, conf);
|
3218
3219
|
}
|
3219
3220
|
|
3220
3221
|
content_type = ngx_palloc(cf->pool, sizeof(ngx_str_t));
|
@@ -185,18 +185,14 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
|
185
185
|
}
|
186
186
|
|
187
187
|
if (size == 0 && !(c->buffered & NGX_LOWLEVEL_BUFFERED)) {
|
188
|
-
if (last) {
|
189
|
-
r->out
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
if (flush) {
|
196
|
-
do {
|
197
|
-
r->out = r->out->next;
|
198
|
-
} while (r->out);
|
188
|
+
if (last || flush) {
|
189
|
+
for (cl = r->out; cl; /* void */) {
|
190
|
+
ln = cl;
|
191
|
+
cl = cl->next;
|
192
|
+
ngx_free_chain(r->pool, ln);
|
193
|
+
}
|
199
194
|
|
195
|
+
r->out = NULL;
|
200
196
|
c->buffered &= ~NGX_HTTP_WRITE_BUFFERED;
|
201
197
|
|
202
198
|
return NGX_OK;
|
@@ -263,6 +263,12 @@ ngx_mail_add_ports(ngx_conf_t *cf, ngx_array_t *ports,
|
|
263
263
|
break;
|
264
264
|
#endif
|
265
265
|
|
266
|
+
#if (NGX_HAVE_UNIX_DOMAIN)
|
267
|
+
case AF_UNIX:
|
268
|
+
p = 0;
|
269
|
+
break;
|
270
|
+
#endif
|
271
|
+
|
266
272
|
default: /* AF_INET */
|
267
273
|
sin = (struct sockaddr_in *) sa;
|
268
274
|
p = sin->sin_port;
|
@@ -539,6 +545,11 @@ ngx_mail_cmp_conf_addrs(const void *one, const void *two)
|
|
539
545
|
return 1;
|
540
546
|
}
|
541
547
|
|
548
|
+
if (second->wildcard) {
|
549
|
+
/* a wildcard must be the last resort, shift it to the end */
|
550
|
+
return -1;
|
551
|
+
}
|
552
|
+
|
542
553
|
if (first->bind && !second->bind) {
|
543
554
|
/* shift explicit bind()ed addresses to the start */
|
544
555
|
return -1;
|
@@ -1332,7 +1332,7 @@ ngx_mail_auth_http_merge_conf(ngx_conf_t *cf, void *parent, void *child)
|
|
1332
1332
|
|
1333
1333
|
if (conf->peer == NULL) {
|
1334
1334
|
ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
|
1335
|
-
"no \"
|
1335
|
+
"no \"auth_http\" is defined for server in %s:%ui",
|
1336
1336
|
conf->file, conf->line);
|
1337
1337
|
|
1338
1338
|
return NGX_CONF_ERROR;
|
@@ -340,6 +340,14 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|
340
340
|
break;
|
341
341
|
#endif
|
342
342
|
|
343
|
+
#if (NGX_HAVE_UNIX_DOMAIN)
|
344
|
+
case AF_UNIX:
|
345
|
+
off = offsetof(struct sockaddr_un, sun_path);
|
346
|
+
len = sizeof(((struct sockaddr_un *) sa)->sun_path);
|
347
|
+
port = 0;
|
348
|
+
break;
|
349
|
+
#endif
|
350
|
+
|
343
351
|
default: /* AF_INET */
|
344
352
|
off = offsetof(struct sockaddr_in, sin_addr);
|
345
353
|
len = 4;
|
@@ -374,21 +382,23 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|
374
382
|
ls->wildcard = u.wildcard;
|
375
383
|
ls->ctx = cf->ctx;
|
376
384
|
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
385
|
+
if (cscf->protocol == NULL) {
|
386
|
+
for (m = 0; ngx_modules[m]; m++) {
|
387
|
+
if (ngx_modules[m]->type != NGX_MAIL_MODULE) {
|
388
|
+
continue;
|
389
|
+
}
|
381
390
|
|
382
|
-
|
391
|
+
module = ngx_modules[m]->ctx;
|
383
392
|
|
384
|
-
|
385
|
-
|
386
|
-
|
393
|
+
if (module->protocol == NULL) {
|
394
|
+
continue;
|
395
|
+
}
|
387
396
|
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
397
|
+
for (i = 0; module->protocol->port[i]; i++) {
|
398
|
+
if (module->protocol->port[i] == u.port) {
|
399
|
+
cscf->protocol = module->protocol;
|
400
|
+
break;
|
401
|
+
}
|
392
402
|
}
|
393
403
|
}
|
394
404
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nginxtra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-09-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
16
|
-
requirement: &
|
16
|
+
requirement: &22194120 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: 0.16.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *22194120
|
25
25
|
description: This gem is intended to provide an easy to use configuration file that
|
26
26
|
will automatically be used to compile nginx and configure the configuration.
|
27
27
|
email: reasonnumber@gmail.com
|