nginxtra 1.2.7.8 → 1.2.8.8
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 +17 -0
- data/vendor/nginx/CHANGES.ru +17 -0
- data/vendor/nginx/auto/lib/perl/make +2 -1
- data/vendor/nginx/src/core/nginx.c +8 -2
- data/vendor/nginx/src/core/nginx.h +2 -2
- data/vendor/nginx/src/core/ngx_conf_file.c +1 -1
- data/vendor/nginx/src/core/ngx_connection.c +2 -2
- data/vendor/nginx/src/core/ngx_cycle.c +1 -1
- data/vendor/nginx/src/event/ngx_event_openssl.c +22 -2
- data/vendor/nginx/src/http/modules/ngx_http_autoindex_module.c +5 -2
- data/vendor/nginx/src/http/modules/ngx_http_index_module.c +5 -5
- data/vendor/nginx/src/http/modules/ngx_http_mp4_module.c +7 -0
- data/vendor/nginx/src/http/modules/ngx_http_split_clients_module.c +1 -1
- data/vendor/nginx/src/http/modules/ngx_http_ssl_module.c +0 -1
- data/vendor/nginx/src/http/modules/ngx_http_upstream_keepalive_module.c +1 -11
- data/vendor/nginx/src/http/modules/ngx_http_upstream_least_conn_module.c +0 -4
- data/vendor/nginx/src/http/modules/perl/nginx.pm +1 -1
- data/vendor/nginx/src/http/ngx_http.h +0 -1
- data/vendor/nginx/src/http/ngx_http_file_cache.c +0 -2
- data/vendor/nginx/src/http/ngx_http_request.c +1 -0
- data/vendor/nginx/src/http/ngx_http_upstream.c +18 -9
- data/vendor/nginx/src/http/ngx_http_upstream_round_robin.c +0 -4
- data/vendor/nginx/src/http/ngx_http_variables.h +0 -3
- data/vendor/nginx/src/os/unix/ngx_process_cycle.c +1 -1
- metadata +2 -2
data/bin/nginxtra
CHANGED
data/bin/nginxtra_rails
CHANGED
data/lib/nginxtra/version.rb
CHANGED
data/vendor/nginx/CHANGES
CHANGED
@@ -1,4 +1,21 @@
|
|
1
1
|
|
2
|
+
Changes with nginx 1.2.8 02 Apr 2013
|
3
|
+
|
4
|
+
*) Bugfix: new sessions were not always stored if the "ssl_session_cache
|
5
|
+
shared" directive was used and there was no free space in shared
|
6
|
+
memory.
|
7
|
+
Thanks to Piotr Sikora.
|
8
|
+
|
9
|
+
*) Bugfix: responses might hang if subrequests were used and a DNS error
|
10
|
+
happened during subrequest processing.
|
11
|
+
Thanks to Lanshun Zhou.
|
12
|
+
|
13
|
+
*) Bugfix: in the ngx_http_mp4_module.
|
14
|
+
Thanks to Gernot Vormayr.
|
15
|
+
|
16
|
+
*) Bugfix: in backend usage accounting.
|
17
|
+
|
18
|
+
|
2
19
|
Changes with nginx 1.2.7 12 Feb 2013
|
3
20
|
|
4
21
|
*) Change: now if the "include" directive with mask is used on Unix
|
data/vendor/nginx/CHANGES.ru
CHANGED
@@ -1,4 +1,21 @@
|
|
1
1
|
|
2
|
+
Изменения в nginx 1.2.8 02.04.2013
|
3
|
+
|
4
|
+
*) Исправление: при использовании директивы "ssl_session_cache shared"
|
5
|
+
новые сессии могли не сохраняться, если заканчивалось место в
|
6
|
+
разделяемой памяти.
|
7
|
+
Спасибо Piotr Sikora.
|
8
|
+
|
9
|
+
*) Исправление: ответы могли зависать, если использовались подзапросы и
|
10
|
+
при обработке подзапроса происходила DNS-ошибка.
|
11
|
+
Спасибо Lanshun Zhou.
|
12
|
+
|
13
|
+
*) Исправление: в модуле ngx_http_mp4_module.
|
14
|
+
Спасибо Gernot Vormayr.
|
15
|
+
|
16
|
+
*) Исправление: в процедуре учёта использования бэкендов.
|
17
|
+
|
18
|
+
|
2
19
|
Изменения в nginx 1.2.7 12.02.2013
|
3
20
|
|
4
21
|
*) Изменение: теперь при использовании директивы include с маской на
|
@@ -6,11 +6,12 @@
|
|
6
6
|
cat << END >> $NGX_MAKEFILE
|
7
7
|
|
8
8
|
$NGX_OBJS/src/http/modules/perl/blib/arch/auto/nginx/nginx.so: \
|
9
|
+
\$(CORE_DEPS) \$(HTTP_DEPS) \
|
9
10
|
src/http/modules/perl/nginx.pm \
|
10
11
|
src/http/modules/perl/nginx.xs \
|
11
12
|
src/http/modules/perl/ngx_http_perl_module.h \
|
12
13
|
$NGX_OBJS/src/http/modules/perl/Makefile
|
13
|
-
cp
|
14
|
+
cp src/http/modules/perl/nginx.* $NGX_OBJS/src/http/modules/perl/
|
14
15
|
|
15
16
|
cd $NGX_OBJS/src/http/modules/perl && \$(MAKE)
|
16
17
|
|
@@ -594,6 +594,10 @@ ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv)
|
|
594
594
|
var = ngx_alloc(sizeof(NGINX_VAR)
|
595
595
|
+ cycle->listening.nelts * (NGX_INT32_LEN + 1) + 2,
|
596
596
|
cycle->log);
|
597
|
+
if (var == NULL) {
|
598
|
+
ngx_free(env);
|
599
|
+
return NGX_INVALID_PID;
|
600
|
+
}
|
597
601
|
|
598
602
|
p = ngx_cpymem(var, NGINX_VAR "=", sizeof(NGINX_VAR));
|
599
603
|
|
@@ -633,7 +637,7 @@ ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv)
|
|
633
637
|
|
634
638
|
ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
|
635
639
|
|
636
|
-
if (ngx_rename_file(ccf->pid.data, ccf->oldpid.data)
|
640
|
+
if (ngx_rename_file(ccf->pid.data, ccf->oldpid.data) == NGX_FILE_ERROR) {
|
637
641
|
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
638
642
|
ngx_rename_file_n " %s to %s failed "
|
639
643
|
"before executing new binary process \"%s\"",
|
@@ -648,7 +652,9 @@ ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv)
|
|
648
652
|
pid = ngx_execute(cycle, &ctx);
|
649
653
|
|
650
654
|
if (pid == NGX_INVALID_PID) {
|
651
|
-
if (ngx_rename_file(ccf->oldpid.data, ccf->pid.data)
|
655
|
+
if (ngx_rename_file(ccf->oldpid.data, ccf->pid.data)
|
656
|
+
== NGX_FILE_ERROR)
|
657
|
+
{
|
652
658
|
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
653
659
|
ngx_rename_file_n " %s back to %s failed after "
|
654
660
|
"an attempt to execute new binary process \"%s\"",
|
@@ -133,7 +133,7 @@ ngx_conf_parse(ngx_conf_t *cf, ngx_str_t *filename)
|
|
133
133
|
|
134
134
|
cf->conf_file = &conf_file;
|
135
135
|
|
136
|
-
if (ngx_fd_info(fd, &cf->conf_file->file.info) ==
|
136
|
+
if (ngx_fd_info(fd, &cf->conf_file->file.info) == NGX_FILE_ERROR) {
|
137
137
|
ngx_log_error(NGX_LOG_EMERG, cf->log, ngx_errno,
|
138
138
|
ngx_fd_info_n " \"%s\" failed", filename->data);
|
139
139
|
}
|
@@ -412,7 +412,7 @@ ngx_open_listening_sockets(ngx_cycle_t *cycle)
|
|
412
412
|
}
|
413
413
|
|
414
414
|
if (ngx_test_config) {
|
415
|
-
if (ngx_delete_file(name) ==
|
415
|
+
if (ngx_delete_file(name) == NGX_FILE_ERROR) {
|
416
416
|
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
|
417
417
|
ngx_delete_file_n " %s failed", name);
|
418
418
|
}
|
@@ -739,7 +739,7 @@ ngx_close_listening_sockets(ngx_cycle_t *cycle)
|
|
739
739
|
{
|
740
740
|
u_char *name = ls[i].addr_text.data + sizeof("unix:") - 1;
|
741
741
|
|
742
|
-
if (ngx_delete_file(name) ==
|
742
|
+
if (ngx_delete_file(name) == NGX_FILE_ERROR) {
|
743
743
|
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_socket_errno,
|
744
744
|
ngx_delete_file_n " %s failed", name);
|
745
745
|
}
|
@@ -679,7 +679,7 @@ old_shm_zone_done:
|
|
679
679
|
ngx_log_error(NGX_LOG_WARN, cycle->log, 0,
|
680
680
|
"deleting socket %s", name);
|
681
681
|
|
682
|
-
if (ngx_delete_file(name) ==
|
682
|
+
if (ngx_delete_file(name) == NGX_FILE_ERROR) {
|
683
683
|
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_socket_errno,
|
684
684
|
ngx_delete_file_n " %s failed", name);
|
685
685
|
}
|
@@ -1716,8 +1716,18 @@ ngx_ssl_new_session(ngx_ssl_conn_t *ssl_conn, ngx_ssl_session_t *sess)
|
|
1716
1716
|
}
|
1717
1717
|
|
1718
1718
|
sess_id = ngx_slab_alloc_locked(shpool, sizeof(ngx_ssl_sess_id_t));
|
1719
|
+
|
1719
1720
|
if (sess_id == NULL) {
|
1720
|
-
|
1721
|
+
|
1722
|
+
/* drop the oldest non-expired session and try once more */
|
1723
|
+
|
1724
|
+
ngx_ssl_expire_sessions(cache, shpool, 0);
|
1725
|
+
|
1726
|
+
sess_id = ngx_slab_alloc_locked(shpool, sizeof(ngx_ssl_sess_id_t));
|
1727
|
+
|
1728
|
+
if (sess_id == NULL) {
|
1729
|
+
goto failed;
|
1730
|
+
}
|
1721
1731
|
}
|
1722
1732
|
|
1723
1733
|
#if (NGX_PTR_SIZE == 8)
|
@@ -1727,8 +1737,18 @@ ngx_ssl_new_session(ngx_ssl_conn_t *ssl_conn, ngx_ssl_session_t *sess)
|
|
1727
1737
|
#else
|
1728
1738
|
|
1729
1739
|
id = ngx_slab_alloc_locked(shpool, sess->session_id_length);
|
1740
|
+
|
1730
1741
|
if (id == NULL) {
|
1731
|
-
|
1742
|
+
|
1743
|
+
/* drop the oldest non-expired session and try once more */
|
1744
|
+
|
1745
|
+
ngx_ssl_expire_sessions(cache, shpool, 0);
|
1746
|
+
|
1747
|
+
id = ngx_slab_alloc_locked(shpool, sess->session_id_length);
|
1748
|
+
|
1749
|
+
if (id == NULL) {
|
1750
|
+
goto failed;
|
1751
|
+
}
|
1732
1752
|
}
|
1733
1753
|
|
1734
1754
|
#endif
|
@@ -489,8 +489,11 @@ ngx_http_autoindex_handler(ngx_http_request_t *r)
|
|
489
489
|
}
|
490
490
|
|
491
491
|
b->last = ngx_cpymem(b->last, "</a>", sizeof("</a>") - 1);
|
492
|
-
|
493
|
-
|
492
|
+
|
493
|
+
if (NGX_HTTP_AUTOINDEX_NAME_LEN - len > 0) {
|
494
|
+
ngx_memset(b->last, ' ', NGX_HTTP_AUTOINDEX_NAME_LEN - len);
|
495
|
+
b->last += NGX_HTTP_AUTOINDEX_NAME_LEN - len;
|
496
|
+
}
|
494
497
|
}
|
495
498
|
|
496
499
|
*b->last++ = ' ';
|
@@ -85,12 +85,12 @@ ngx_module_t ngx_http_index_module = {
|
|
85
85
|
|
86
86
|
/*
|
87
87
|
* Try to open/test the first index file before the test of directory
|
88
|
-
* existence because valid requests should
|
89
|
-
* If
|
90
|
-
* be
|
88
|
+
* existence because valid requests should prevail over invalid ones.
|
89
|
+
* If open()/stat() of a file will fail then stat() of a directory
|
90
|
+
* should be faster because kernel may have already cached some data.
|
91
91
|
* Besides, Win32 may return ERROR_PATH_NOT_FOUND (NGX_ENOTDIR) at once.
|
92
|
-
* Unix has ENOTDIR error
|
93
|
-
* it only indicates that path
|
92
|
+
* Unix has ENOTDIR error; however, it's less helpful than Win32's one:
|
93
|
+
* it only indicates that path points to a regular file, not a directory.
|
94
94
|
*/
|
95
95
|
|
96
96
|
static ngx_int_t
|
@@ -750,6 +750,13 @@ ngx_http_mp4_process(ngx_http_mp4_file_t *mp4)
|
|
750
750
|
|
751
751
|
*prev = &mp4->mdat_atom;
|
752
752
|
|
753
|
+
if (start_offset > mp4->mdat_data.buf->file_last) {
|
754
|
+
ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
|
755
|
+
"start time is out mp4 mdat atom in \"%s\"",
|
756
|
+
mp4->file.name.data);
|
757
|
+
return NGX_ERROR;
|
758
|
+
}
|
759
|
+
|
753
760
|
adjustment = mp4->ftyp_size + mp4->moov_size
|
754
761
|
+ ngx_http_mp4_update_mdat_atom(mp4, start_offset)
|
755
762
|
- start_offset;
|
@@ -218,7 +218,7 @@ ngx_http_split_clients(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
|
|
218
218
|
part->percent = 0;
|
219
219
|
|
220
220
|
} else {
|
221
|
-
if (value[0].data[value[0].len - 1] != '%') {
|
221
|
+
if (value[0].len == 0 || value[0].data[value[0].len - 1] != '%') {
|
222
222
|
goto invalid;
|
223
223
|
}
|
224
224
|
|
@@ -37,8 +37,6 @@ typedef struct {
|
|
37
37
|
ngx_event_save_peer_session_pt original_save_session;
|
38
38
|
#endif
|
39
39
|
|
40
|
-
ngx_uint_t failed; /* unsigned:1 */
|
41
|
-
|
42
40
|
} ngx_http_upstream_keepalive_peer_data_t;
|
43
41
|
|
44
42
|
|
@@ -220,8 +218,6 @@ ngx_http_upstream_get_keepalive_peer(ngx_peer_connection_t *pc, void *data)
|
|
220
218
|
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, pc->log, 0,
|
221
219
|
"get keepalive peer");
|
222
220
|
|
223
|
-
kp->failed = 0;
|
224
|
-
|
225
221
|
/* ask balancer */
|
226
222
|
|
227
223
|
rc = kp->original_get_peer(pc, kp->data);
|
@@ -282,18 +278,12 @@ ngx_http_upstream_free_keepalive_peer(ngx_peer_connection_t *pc, void *data,
|
|
282
278
|
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, pc->log, 0,
|
283
279
|
"free keepalive peer");
|
284
280
|
|
285
|
-
/* remember failed state - peer.free() may be called more than once */
|
286
|
-
|
287
|
-
if (state & NGX_PEER_FAILED) {
|
288
|
-
kp->failed = 1;
|
289
|
-
}
|
290
|
-
|
291
281
|
/* cache valid connections */
|
292
282
|
|
293
283
|
u = kp->upstream;
|
294
284
|
c = pc->connection;
|
295
285
|
|
296
|
-
if (
|
286
|
+
if (state & NGX_PEER_FAILED
|
297
287
|
|| c == NULL
|
298
288
|
|| c->read->eof
|
299
289
|
|| c->read->error
|
@@ -94,7 +94,6 @@ void ngx_http_split_args(ngx_http_request_t *r, ngx_str_t *uri,
|
|
94
94
|
ngx_str_t *args);
|
95
95
|
|
96
96
|
|
97
|
-
ngx_int_t ngx_http_find_server_conf(ngx_http_request_t *r);
|
98
97
|
void ngx_http_update_location_config(ngx_http_request_t *r);
|
99
98
|
void ngx_http_handler(ngx_http_request_t *r);
|
100
99
|
void ngx_http_run_posted_requests(ngx_connection_t *c);
|
@@ -865,11 +865,13 @@ ngx_http_upstream_cache_send(ngx_http_request_t *r, ngx_http_upstream_t *u)
|
|
865
865
|
static void
|
866
866
|
ngx_http_upstream_resolve_handler(ngx_resolver_ctx_t *ctx)
|
867
867
|
{
|
868
|
+
ngx_connection_t *c;
|
868
869
|
ngx_http_request_t *r;
|
869
870
|
ngx_http_upstream_t *u;
|
870
871
|
ngx_http_upstream_resolved_t *ur;
|
871
872
|
|
872
873
|
r = ctx->data;
|
874
|
+
c = r->connection;
|
873
875
|
|
874
876
|
u = r->upstream;
|
875
877
|
ur = u->resolved;
|
@@ -881,7 +883,7 @@ ngx_http_upstream_resolve_handler(ngx_resolver_ctx_t *ctx)
|
|
881
883
|
ngx_resolver_strerror(ctx->state));
|
882
884
|
|
883
885
|
ngx_http_upstream_finalize_request(r, u, NGX_HTTP_BAD_GATEWAY);
|
884
|
-
|
886
|
+
goto failed;
|
885
887
|
}
|
886
888
|
|
887
889
|
ur->naddrs = ctx->naddrs;
|
@@ -906,13 +908,17 @@ ngx_http_upstream_resolve_handler(ngx_resolver_ctx_t *ctx)
|
|
906
908
|
if (ngx_http_upstream_create_round_robin_peer(r, ur) != NGX_OK) {
|
907
909
|
ngx_http_upstream_finalize_request(r, u,
|
908
910
|
NGX_HTTP_INTERNAL_SERVER_ERROR);
|
909
|
-
|
911
|
+
goto failed;
|
910
912
|
}
|
911
913
|
|
912
914
|
ngx_resolve_name_done(ctx);
|
913
915
|
ur->ctx = NULL;
|
914
916
|
|
915
917
|
ngx_http_upstream_connect(r, u);
|
918
|
+
|
919
|
+
failed:
|
920
|
+
|
921
|
+
ngx_http_run_posted_requests(c);
|
916
922
|
}
|
917
923
|
|
918
924
|
|
@@ -2840,14 +2846,16 @@ ngx_http_upstream_next(ngx_http_request_t *r, ngx_http_upstream_t *u,
|
|
2840
2846
|
ngx_http_busy_unlock(u->conf->busy_lock, &u->busy_lock);
|
2841
2847
|
#endif
|
2842
2848
|
|
2843
|
-
if (
|
2844
|
-
|
2845
|
-
|
2846
|
-
|
2847
|
-
|
2849
|
+
if (u->peer.sockaddr) {
|
2850
|
+
|
2851
|
+
if (ft_type == NGX_HTTP_UPSTREAM_FT_HTTP_404) {
|
2852
|
+
state = NGX_PEER_NEXT;
|
2853
|
+
} else {
|
2854
|
+
state = NGX_PEER_FAILED;
|
2855
|
+
}
|
2848
2856
|
|
2849
|
-
if (ft_type != NGX_HTTP_UPSTREAM_FT_NOLIVE) {
|
2850
2857
|
u->peer.free(&u->peer, u->peer.data, state);
|
2858
|
+
u->peer.sockaddr = NULL;
|
2851
2859
|
}
|
2852
2860
|
|
2853
2861
|
if (ft_type == NGX_HTTP_UPSTREAM_FT_TIMEOUT) {
|
@@ -3007,8 +3015,9 @@ ngx_http_upstream_finalize_request(ngx_http_request_t *r,
|
|
3007
3015
|
|
3008
3016
|
u->finalize_request(r, rc);
|
3009
3017
|
|
3010
|
-
if (u->peer.free) {
|
3018
|
+
if (u->peer.free && u->peer.sockaddr) {
|
3011
3019
|
u->peer.free(&u->peer, u->peer.data, 0);
|
3020
|
+
u->peer.sockaddr = NULL;
|
3012
3021
|
}
|
3013
3022
|
|
3014
3023
|
if (u->peer.connection) {
|
@@ -584,10 +584,6 @@ ngx_http_upstream_free_round_robin_peer(ngx_peer_connection_t *pc, void *data,
|
|
584
584
|
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, pc->log, 0,
|
585
585
|
"free rr peer %ui %ui", pc->tries, state);
|
586
586
|
|
587
|
-
if (state == 0 && pc->tries == 0) {
|
588
|
-
return;
|
589
|
-
}
|
590
|
-
|
591
587
|
/* TODO: NGX_PEER_KEEPALIVE */
|
592
588
|
|
593
589
|
if (rrp->peers->single) {
|
@@ -57,9 +57,6 @@ ngx_int_t ngx_http_variable_unknown_header(ngx_http_variable_value_t *v,
|
|
57
57
|
ngx_str_t *var, ngx_list_part_t *part, size_t prefix);
|
58
58
|
|
59
59
|
|
60
|
-
#define ngx_http_clear_variable(r, index) r->variables0[index].text.data = NULL;
|
61
|
-
|
62
|
-
|
63
60
|
#if (NGX_PCRE)
|
64
61
|
|
65
62
|
typedef struct {
|
@@ -647,7 +647,7 @@ ngx_reap_children(ngx_cycle_t *cycle)
|
|
647
647
|
|
648
648
|
if (ngx_rename_file((char *) ccf->oldpid.data,
|
649
649
|
(char *) ccf->pid.data)
|
650
|
-
|
650
|
+
== NGX_FILE_ERROR)
|
651
651
|
{
|
652
652
|
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
653
653
|
ngx_rename_file_n " %s back to %s failed "
|
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.8.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|