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.
- checksums.yaml +4 -4
- data/bin/nginxtra +1 -1
- data/bin/nginxtra_rails +1 -1
- data/lib/nginxtra/version.rb +1 -1
- data/vendor/nginx/CHANGES +363 -25
- data/vendor/nginx/CHANGES.ru +365 -21
- data/vendor/nginx/LICENSE +2 -2
- data/vendor/nginx/auto/cc/conf +32 -0
- data/vendor/nginx/auto/cc/gcc +1 -1
- data/vendor/nginx/auto/cc/icc +2 -2
- data/vendor/nginx/auto/cc/msvc +29 -8
- data/vendor/nginx/auto/cc/name +2 -25
- data/vendor/nginx/auto/cc/sunc +3 -0
- data/vendor/nginx/auto/endianness +7 -2
- data/vendor/nginx/auto/install +60 -26
- data/vendor/nginx/auto/lib/conf +4 -4
- data/vendor/nginx/auto/lib/geoip/conf +6 -1
- data/vendor/nginx/auto/lib/libgd/conf +6 -1
- data/vendor/nginx/auto/lib/libxslt/conf +11 -2
- data/vendor/nginx/auto/lib/make +1 -1
- data/vendor/nginx/auto/lib/md5/conf +2 -2
- data/vendor/nginx/auto/lib/md5/make +2 -2
- data/vendor/nginx/auto/lib/openssl/conf +52 -3
- data/vendor/nginx/auto/lib/openssl/make +1 -1
- data/vendor/nginx/auto/lib/pcre/conf +2 -2
- data/vendor/nginx/auto/lib/pcre/make +2 -2
- data/vendor/nginx/auto/lib/perl/conf +6 -3
- data/vendor/nginx/auto/lib/perl/make +4 -1
- data/vendor/nginx/auto/lib/sha1/conf +2 -2
- data/vendor/nginx/auto/lib/sha1/make +2 -2
- data/vendor/nginx/auto/lib/zlib/conf +2 -2
- data/vendor/nginx/auto/lib/zlib/make +2 -2
- data/vendor/nginx/auto/make +281 -16
- data/vendor/nginx/auto/module +122 -0
- data/vendor/nginx/auto/modules +909 -178
- data/vendor/nginx/auto/options +81 -19
- data/vendor/nginx/auto/os/conf +9 -0
- data/vendor/nginx/auto/os/darwin +3 -0
- data/vendor/nginx/auto/os/freebsd +0 -20
- data/vendor/nginx/auto/os/linux +0 -12
- data/vendor/nginx/auto/os/win32 +5 -1
- data/vendor/nginx/auto/sources +11 -311
- data/vendor/nginx/auto/summary +1 -0
- data/vendor/nginx/auto/types/sizeof +5 -3
- data/vendor/nginx/auto/types/typedef +9 -4
- data/vendor/nginx/auto/types/uintptr_t +7 -2
- data/vendor/nginx/auto/unix +72 -12
- data/vendor/nginx/conf/fastcgi.conf +1 -0
- data/vendor/nginx/conf/fastcgi_params +1 -0
- data/vendor/nginx/conf/scgi_params +1 -0
- data/vendor/nginx/conf/uwsgi_params +1 -0
- data/vendor/nginx/configure +1 -1
- data/vendor/nginx/contrib/vim/syntax/nginx.vim +2 -2
- data/vendor/nginx/man/nginx.8 +6 -2
- data/vendor/nginx/src/core/nginx.c +281 -114
- data/vendor/nginx/src/core/nginx.h +2 -2
- data/vendor/nginx/src/core/ngx_conf_file.c +54 -13
- data/vendor/nginx/src/core/ngx_conf_file.h +8 -52
- data/vendor/nginx/src/core/ngx_config.h +0 -5
- data/vendor/nginx/src/core/ngx_connection.c +270 -37
- data/vendor/nginx/src/core/ngx_connection.h +35 -12
- data/vendor/nginx/src/core/ngx_core.h +4 -0
- data/vendor/nginx/src/core/ngx_crypt.c +2 -2
- data/vendor/nginx/src/core/ngx_cycle.c +72 -25
- data/vendor/nginx/src/core/ngx_cycle.h +28 -39
- data/vendor/nginx/src/core/ngx_file.c +14 -5
- data/vendor/nginx/src/core/ngx_file.h +2 -0
- data/vendor/nginx/src/core/ngx_hash.c +13 -1
- data/vendor/nginx/src/core/ngx_inet.c +20 -18
- data/vendor/nginx/src/core/ngx_log.c +12 -12
- data/vendor/nginx/src/core/ngx_log.h +13 -6
- data/vendor/nginx/src/core/ngx_module.c +360 -0
- data/vendor/nginx/src/core/ngx_module.h +307 -0
- data/vendor/nginx/src/core/ngx_open_file_cache.c +2 -2
- data/vendor/nginx/src/core/ngx_output_chain.c +8 -4
- data/vendor/nginx/src/core/ngx_palloc.c +42 -44
- data/vendor/nginx/src/{http/ngx_http_parse_time.c → core/ngx_parse_time.c} +2 -3
- data/vendor/nginx/src/core/ngx_parse_time.h +22 -0
- data/vendor/nginx/src/core/ngx_proxy_protocol.c +50 -1
- data/vendor/nginx/src/core/ngx_proxy_protocol.h +3 -1
- data/vendor/nginx/src/core/ngx_regex.c +1 -38
- data/vendor/nginx/src/core/ngx_resolver.c +1814 -320
- data/vendor/nginx/src/core/ngx_resolver.h +67 -10
- data/vendor/nginx/src/core/ngx_rwlock.c +120 -0
- data/vendor/nginx/src/core/ngx_rwlock.h +21 -0
- data/vendor/nginx/src/core/ngx_slab.c +6 -5
- data/vendor/nginx/src/core/ngx_string.c +1 -1
- data/vendor/nginx/src/core/ngx_syslog.c +11 -3
- data/vendor/nginx/src/core/ngx_syslog.h +2 -1
- data/vendor/nginx/src/core/ngx_thread_pool.c +4 -0
- data/vendor/nginx/src/core/ngx_times.c +2 -2
- data/vendor/nginx/src/event/modules/ngx_devpoll_module.c +3 -1
- data/vendor/nginx/src/event/modules/ngx_epoll_module.c +5 -2
- data/vendor/nginx/src/event/modules/ngx_eventport_module.c +5 -5
- data/vendor/nginx/src/event/modules/ngx_kqueue_module.c +15 -8
- data/vendor/nginx/src/event/modules/ngx_poll_module.c +0 -10
- data/vendor/nginx/src/event/modules/ngx_select_module.c +0 -10
- data/vendor/nginx/src/event/ngx_event.c +60 -103
- data/vendor/nginx/src/event/ngx_event.h +22 -26
- data/vendor/nginx/src/event/ngx_event_accept.c +414 -88
- data/vendor/nginx/src/event/ngx_event_connect.c +27 -18
- data/vendor/nginx/src/event/ngx_event_connect.h +1 -0
- data/vendor/nginx/src/event/ngx_event_openssl.c +65 -25
- data/vendor/nginx/src/event/ngx_event_openssl.h +17 -0
- data/vendor/nginx/src/event/ngx_event_openssl_stapling.c +73 -7
- data/vendor/nginx/src/event/ngx_event_pipe.c +85 -27
- data/vendor/nginx/src/event/ngx_event_pipe.h +10 -0
- data/vendor/nginx/src/http/modules/ngx_http_auth_basic_module.c +1 -1
- data/vendor/nginx/src/http/modules/ngx_http_auth_request_module.c +2 -2
- data/vendor/nginx/src/http/modules/ngx_http_chunked_filter_module.c +2 -2
- data/vendor/nginx/src/http/modules/ngx_http_dav_module.c +6 -6
- data/vendor/nginx/src/http/modules/ngx_http_fastcgi_module.c +17 -11
- data/vendor/nginx/src/http/modules/ngx_http_gzip_filter_module.c +2 -2
- data/vendor/nginx/src/http/modules/ngx_http_headers_filter_module.c +9 -9
- data/vendor/nginx/src/http/modules/ngx_http_image_filter_module.c +2 -2
- data/vendor/nginx/src/http/modules/ngx_http_limit_conn_module.c +2 -2
- data/vendor/nginx/src/http/modules/ngx_http_limit_req_module.c +0 -7
- data/vendor/nginx/src/http/modules/ngx_http_map_module.c +6 -6
- data/vendor/nginx/src/http/modules/ngx_http_memcached_module.c +2 -1
- data/vendor/nginx/src/http/modules/ngx_http_mp4_module.c +13 -13
- data/vendor/nginx/src/http/modules/ngx_http_not_modified_filter_module.c +2 -2
- data/vendor/nginx/src/http/modules/ngx_http_proxy_module.c +26 -21
- data/vendor/nginx/src/http/modules/ngx_http_random_index_module.c +1 -1
- data/vendor/nginx/src/http/modules/ngx_http_range_filter_module.c +26 -8
- data/vendor/nginx/src/http/modules/ngx_http_realip_module.c +73 -3
- data/vendor/nginx/src/http/modules/ngx_http_referer_module.c +1 -1
- data/vendor/nginx/src/http/modules/ngx_http_rewrite_module.c +6 -6
- data/vendor/nginx/src/http/modules/ngx_http_scgi_module.c +5 -3
- data/vendor/nginx/src/http/modules/ngx_http_slice_filter_module.c +526 -0
- data/vendor/nginx/src/http/modules/ngx_http_ssi_filter_module.c +7 -7
- data/vendor/nginx/src/http/modules/ngx_http_ssl_module.c +19 -16
- data/vendor/nginx/src/http/modules/ngx_http_static_module.c +1 -1
- data/vendor/nginx/src/http/modules/ngx_http_stub_status_module.c +1 -1
- data/vendor/nginx/src/http/modules/ngx_http_sub_filter_module.c +373 -173
- data/vendor/nginx/src/http/modules/ngx_http_upstream_hash_module.c +72 -46
- data/vendor/nginx/src/http/modules/ngx_http_upstream_ip_hash_module.c +18 -30
- data/vendor/nginx/src/http/modules/ngx_http_upstream_keepalive_module.c +50 -39
- data/vendor/nginx/src/http/modules/ngx_http_upstream_least_conn_module.c +38 -129
- data/vendor/nginx/src/http/modules/ngx_http_upstream_zone_module.c +246 -0
- data/vendor/nginx/src/http/modules/ngx_http_uwsgi_module.c +6 -5
- data/vendor/nginx/src/http/modules/perl/nginx.xs +9 -9
- data/vendor/nginx/src/http/ngx_http.c +46 -43
- data/vendor/nginx/src/http/ngx_http.h +4 -9
- data/vendor/nginx/src/http/ngx_http_cache.h +4 -0
- data/vendor/nginx/src/http/ngx_http_copy_filter_module.c +13 -5
- data/vendor/nginx/src/http/ngx_http_core_module.c +92 -91
- data/vendor/nginx/src/http/ngx_http_core_module.h +12 -8
- data/vendor/nginx/src/http/ngx_http_file_cache.c +61 -10
- data/vendor/nginx/src/http/ngx_http_request.c +37 -50
- data/vendor/nginx/src/http/ngx_http_request.h +10 -15
- data/vendor/nginx/src/http/ngx_http_request_body.c +64 -88
- data/vendor/nginx/src/http/ngx_http_script.c +3 -3
- data/vendor/nginx/src/http/ngx_http_special_response.c +1 -4
- data/vendor/nginx/src/http/ngx_http_upstream.c +245 -109
- data/vendor/nginx/src/http/ngx_http_upstream.h +11 -5
- data/vendor/nginx/src/http/ngx_http_upstream_round_robin.c +212 -65
- data/vendor/nginx/src/http/ngx_http_upstream_round_robin.h +66 -5
- data/vendor/nginx/src/http/ngx_http_variables.c +28 -15
- data/vendor/nginx/src/http/ngx_http_write_filter_module.c +1 -1
- data/vendor/nginx/src/http/v2/ngx_http_v2.c +4349 -0
- data/vendor/nginx/src/http/v2/ngx_http_v2.h +337 -0
- data/vendor/nginx/src/http/v2/ngx_http_v2_filter_module.c +1391 -0
- data/vendor/nginx/src/http/v2/ngx_http_v2_huff_decode.c +2714 -0
- data/vendor/nginx/src/http/v2/ngx_http_v2_huff_encode.c +254 -0
- data/vendor/nginx/src/http/v2/ngx_http_v2_module.c +469 -0
- data/vendor/nginx/src/http/{ngx_http_spdy_module.h → v2/ngx_http_v2_module.h} +10 -9
- data/vendor/nginx/src/http/v2/ngx_http_v2_table.c +349 -0
- data/vendor/nginx/src/mail/ngx_mail.c +49 -82
- data/vendor/nginx/src/mail/ngx_mail.h +16 -23
- data/vendor/nginx/src/mail/ngx_mail_auth_http_module.c +1 -1
- data/vendor/nginx/src/mail/ngx_mail_core_module.c +60 -34
- data/vendor/nginx/src/mail/ngx_mail_handler.c +17 -12
- data/vendor/nginx/src/mail/ngx_mail_proxy_module.c +1 -14
- data/vendor/nginx/src/mail/ngx_mail_smtp_handler.c +1 -1
- data/vendor/nginx/src/mail/ngx_mail_ssl_module.c +5 -5
- data/vendor/nginx/src/os/unix/ngx_atomic.h +10 -10
- data/vendor/nginx/src/os/unix/ngx_channel.h +4 -4
- data/vendor/nginx/src/os/unix/ngx_darwin_config.h +2 -0
- data/vendor/nginx/src/os/unix/ngx_darwin_init.c +1 -0
- data/vendor/nginx/src/os/unix/ngx_dlopen.c +28 -0
- data/vendor/nginx/src/os/unix/ngx_dlopen.h +31 -0
- data/vendor/nginx/src/os/unix/ngx_errno.h +1 -0
- data/vendor/nginx/src/os/unix/ngx_file_aio_read.c +1 -1
- data/vendor/nginx/src/os/unix/ngx_files.c +313 -80
- data/vendor/nginx/src/os/unix/ngx_files.h +5 -2
- data/vendor/nginx/src/os/unix/ngx_freebsd_config.h +3 -1
- data/vendor/nginx/src/os/unix/ngx_freebsd_init.c +1 -0
- data/vendor/nginx/src/os/unix/ngx_freebsd_sendfile_chain.c +13 -0
- data/vendor/nginx/src/os/unix/ngx_linux.h +0 -2
- data/vendor/nginx/src/os/unix/ngx_linux_aio_read.c +1 -1
- data/vendor/nginx/src/os/unix/ngx_linux_config.h +2 -6
- data/vendor/nginx/src/os/unix/ngx_linux_init.c +1 -33
- data/vendor/nginx/src/os/unix/ngx_linux_sendfile_chain.c +55 -12
- data/vendor/nginx/src/os/unix/ngx_os.h +3 -9
- data/vendor/nginx/src/os/unix/ngx_posix_config.h +14 -1
- data/vendor/nginx/src/os/unix/ngx_posix_init.c +2 -1
- data/vendor/nginx/src/os/unix/ngx_process.c +1 -1
- data/vendor/nginx/src/os/unix/ngx_process_cycle.c +25 -51
- data/vendor/nginx/src/os/unix/ngx_process_cycle.h +1 -0
- data/vendor/nginx/src/os/unix/ngx_readv_chain.c +24 -28
- data/vendor/nginx/src/os/unix/ngx_recv.c +30 -79
- data/vendor/nginx/src/os/unix/ngx_send.c +1 -1
- data/vendor/nginx/src/os/unix/ngx_setaffinity.c +14 -30
- data/vendor/nginx/src/os/unix/ngx_setaffinity.h +15 -1
- data/vendor/nginx/src/os/unix/ngx_solaris_config.h +2 -0
- data/vendor/nginx/src/os/unix/ngx_solaris_init.c +1 -0
- data/vendor/nginx/src/os/unix/ngx_solaris_sendfilev_chain.c +23 -0
- data/vendor/nginx/src/os/unix/ngx_sunpro_amd64.il +3 -3
- data/vendor/nginx/src/os/unix/ngx_sunpro_x86.il +3 -3
- data/vendor/nginx/src/os/unix/ngx_udp_recv.c +5 -48
- data/vendor/nginx/src/os/unix/ngx_udp_send.c +56 -0
- data/vendor/nginx/src/stream/ngx_stream.c +564 -0
- data/vendor/nginx/src/stream/ngx_stream.h +212 -0
- data/vendor/nginx/src/stream/ngx_stream_access_module.c +451 -0
- data/vendor/nginx/src/stream/ngx_stream_core_module.c +562 -0
- data/vendor/nginx/src/stream/ngx_stream_handler.c +344 -0
- data/vendor/nginx/src/stream/ngx_stream_limit_conn_module.c +632 -0
- data/vendor/nginx/src/stream/ngx_stream_proxy_module.c +1674 -0
- data/vendor/nginx/src/stream/ngx_stream_ssl_module.c +460 -0
- data/vendor/nginx/src/stream/ngx_stream_ssl_module.h +49 -0
- data/vendor/nginx/src/stream/ngx_stream_upstream.c +464 -0
- data/vendor/nginx/src/stream/ngx_stream_upstream.h +107 -0
- data/vendor/nginx/src/stream/ngx_stream_upstream_hash_module.c +656 -0
- data/vendor/nginx/src/stream/ngx_stream_upstream_least_conn_module.c +307 -0
- data/vendor/nginx/src/stream/ngx_stream_upstream_round_robin.c +702 -0
- data/vendor/nginx/src/stream/ngx_stream_upstream_round_robin.h +139 -0
- data/vendor/nginx/src/stream/ngx_stream_upstream_zone_module.c +242 -0
- metadata +39 -15
- data/vendor/nginx/src/event/modules/ngx_aio_module.c +0 -171
- data/vendor/nginx/src/event/modules/ngx_rtsig_module.c +0 -735
- data/vendor/nginx/src/http/ngx_http_spdy.c +0 -3701
- data/vendor/nginx/src/http/ngx_http_spdy.h +0 -261
- data/vendor/nginx/src/http/ngx_http_spdy_filter_module.c +0 -1222
- data/vendor/nginx/src/http/ngx_http_spdy_module.c +0 -408
- data/vendor/nginx/src/os/unix/ngx_aio_read.c +0 -109
- data/vendor/nginx/src/os/unix/ngx_aio_read_chain.c +0 -78
- data/vendor/nginx/src/os/unix/ngx_aio_write.c +0 -109
- data/vendor/nginx/src/os/unix/ngx_aio_write_chain.c +0 -100
@@ -840,6 +840,9 @@ ngx_epoll_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, ngx_uint_t flags)
|
|
840
840
|
}
|
841
841
|
|
842
842
|
wev->ready = 1;
|
843
|
+
#if (NGX_THREADS)
|
844
|
+
wev->complete = 1;
|
845
|
+
#endif
|
843
846
|
|
844
847
|
if (flags & NGX_POST_EVENTS) {
|
845
848
|
ngx_post_event(wev, &ngx_posted_events);
|
@@ -899,7 +902,7 @@ ngx_epoll_eventfd_handler(ngx_event_t *ev)
|
|
899
902
|
events = io_getevents(ngx_aio_ctx, 1, 64, event, &ts);
|
900
903
|
|
901
904
|
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, ev->log, 0,
|
902
|
-
"io_getevents: %
|
905
|
+
"io_getevents: %d", events);
|
903
906
|
|
904
907
|
if (events > 0) {
|
905
908
|
ready -= events;
|
@@ -907,7 +910,7 @@ ngx_epoll_eventfd_handler(ngx_event_t *ev)
|
|
907
910
|
for (i = 0; i < events; i++) {
|
908
911
|
|
909
912
|
ngx_log_debug4(NGX_LOG_DEBUG_EVENT, ev->log, 0,
|
910
|
-
"io_event: %
|
913
|
+
"io_event: %XL %XL %L %L",
|
911
914
|
event[i].data, event[i].obj,
|
912
915
|
event[i].res, event[i].res2);
|
913
916
|
|
@@ -49,7 +49,7 @@ typedef struct port_notify {
|
|
49
49
|
void *portnfy_user; /* user defined */
|
50
50
|
} port_notify_t;
|
51
51
|
|
52
|
-
#if (__FreeBSD_version < 700005)
|
52
|
+
#if (__FreeBSD__ && __FreeBSD_version < 700005) || (NGX_DARWIN)
|
53
53
|
|
54
54
|
typedef struct itimerspec { /* definition per POSIX.4 */
|
55
55
|
struct timespec it_interval;/* timer period */
|
@@ -526,18 +526,18 @@ ngx_eventport_process_events(ngx_cycle_t *cycle, ngx_msec_t timer,
|
|
526
526
|
|
527
527
|
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
528
528
|
"eventport: fd:%d, ev:%04Xd",
|
529
|
-
event_list[i].portev_object, revents);
|
529
|
+
(int) event_list[i].portev_object, revents);
|
530
530
|
|
531
531
|
if (revents & (POLLERR|POLLHUP|POLLNVAL)) {
|
532
532
|
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
533
533
|
"port_getn() error fd:%d ev:%04Xd",
|
534
|
-
event_list[i].portev_object, revents);
|
534
|
+
(int) event_list[i].portev_object, revents);
|
535
535
|
}
|
536
536
|
|
537
537
|
if (revents & ~(POLLIN|POLLOUT|POLLERR|POLLHUP|POLLNVAL)) {
|
538
538
|
ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
|
539
539
|
"strange port_getn() events fd:%d ev:%04Xd",
|
540
|
-
event_list[i].portev_object, revents);
|
540
|
+
(int) event_list[i].portev_object, revents);
|
541
541
|
}
|
542
542
|
|
543
543
|
if ((revents & (POLLERR|POLLHUP|POLLNVAL))
|
@@ -615,7 +615,7 @@ ngx_eventport_process_events(ngx_cycle_t *cycle, ngx_msec_t timer,
|
|
615
615
|
default:
|
616
616
|
ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
|
617
617
|
"unexpected eventport object %d",
|
618
|
-
event_list[i].portev_object);
|
618
|
+
(int) event_list[i].portev_object);
|
619
619
|
continue;
|
620
620
|
}
|
621
621
|
}
|
@@ -579,7 +579,7 @@ ngx_kqueue_process_events(ngx_cycle_t *cycle, ngx_msec_t timer,
|
|
579
579
|
if (event_list[i].flags & EV_ERROR) {
|
580
580
|
ngx_log_error(NGX_LOG_ALERT, cycle->log, event_list[i].data,
|
581
581
|
"kevent() error on %d filter:%d flags:%04Xd",
|
582
|
-
event_list[i].ident, event_list[i].filter,
|
582
|
+
(int) event_list[i].ident, event_list[i].filter,
|
583
583
|
event_list[i].flags);
|
584
584
|
continue;
|
585
585
|
}
|
@@ -676,13 +676,20 @@ ngx_kqueue_process_events(ngx_cycle_t *cycle, ngx_msec_t timer,
|
|
676
676
|
static ngx_inline void
|
677
677
|
ngx_kqueue_dump_event(ngx_log_t *log, struct kevent *kev)
|
678
678
|
{
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
679
|
+
if (kev->ident > 0x8000000 && kev->ident != (unsigned) -1) {
|
680
|
+
ngx_log_debug6(NGX_LOG_DEBUG_EVENT, log, 0,
|
681
|
+
"kevent: %p: ft:%d fl:%04Xd ff:%08Xd d:%d ud:%p",
|
682
|
+
(void *) kev->ident, kev->filter,
|
683
|
+
kev->flags, kev->fflags,
|
684
|
+
(int) kev->data, kev->udata);
|
685
|
+
|
686
|
+
} else {
|
687
|
+
ngx_log_debug6(NGX_LOG_DEBUG_EVENT, log, 0,
|
688
|
+
"kevent: %d: ft:%d fl:%04Xd ff:%08Xd d:%d ud:%p",
|
689
|
+
(int) kev->ident, kev->filter,
|
690
|
+
kev->flags, kev->fflags,
|
691
|
+
(int) kev->data, kev->udata);
|
692
|
+
}
|
686
693
|
}
|
687
694
|
|
688
695
|
|
@@ -413,15 +413,5 @@ ngx_poll_init_conf(ngx_cycle_t *cycle, void *conf)
|
|
413
413
|
return NGX_CONF_OK;
|
414
414
|
}
|
415
415
|
|
416
|
-
#if (NGX_OLD_THREADS)
|
417
|
-
|
418
|
-
ngx_log_error(NGX_LOG_EMERG, cycle->log, 0,
|
419
|
-
"poll() is not supported in the threaded mode");
|
420
|
-
return NGX_CONF_ERROR;
|
421
|
-
|
422
|
-
#else
|
423
|
-
|
424
416
|
return NGX_CONF_OK;
|
425
|
-
|
426
|
-
#endif
|
427
417
|
}
|
@@ -419,15 +419,5 @@ ngx_select_init_conf(ngx_cycle_t *cycle, void *conf)
|
|
419
419
|
return NGX_CONF_ERROR;
|
420
420
|
}
|
421
421
|
|
422
|
-
#if (NGX_OLD_THREADS)
|
423
|
-
|
424
|
-
ngx_log_error(NGX_LOG_EMERG, cycle->log, 0,
|
425
|
-
"select() is not supported in the threaded mode");
|
426
|
-
return NGX_CONF_ERROR;
|
427
|
-
|
428
|
-
#else
|
429
|
-
|
430
422
|
return NGX_CONF_OK;
|
431
|
-
|
432
|
-
#endif
|
433
423
|
}
|
@@ -17,7 +17,6 @@ extern ngx_module_t ngx_kqueue_module;
|
|
17
17
|
extern ngx_module_t ngx_eventport_module;
|
18
18
|
extern ngx_module_t ngx_devpoll_module;
|
19
19
|
extern ngx_module_t ngx_epoll_module;
|
20
|
-
extern ngx_module_t ngx_rtsig_module;
|
21
20
|
extern ngx_module_t ngx_select_module;
|
22
21
|
|
23
22
|
|
@@ -127,13 +126,6 @@ static ngx_command_t ngx_event_core_commands[] = {
|
|
127
126
|
0,
|
128
127
|
NULL },
|
129
128
|
|
130
|
-
{ ngx_string("connections"),
|
131
|
-
NGX_EVENT_CONF|NGX_CONF_TAKE1,
|
132
|
-
ngx_event_connections,
|
133
|
-
0,
|
134
|
-
0,
|
135
|
-
NULL },
|
136
|
-
|
137
129
|
{ ngx_string("use"),
|
138
130
|
NGX_EVENT_CONF|NGX_CONF_TAKE1,
|
139
131
|
ngx_event_use,
|
@@ -212,7 +204,9 @@ ngx_process_events_and_timers(ngx_cycle_t *cycle)
|
|
212
204
|
timer = ngx_event_find_timer();
|
213
205
|
flags = NGX_UPDATE_TIME;
|
214
206
|
|
215
|
-
#if (
|
207
|
+
#if (NGX_WIN32)
|
208
|
+
|
209
|
+
/* handle signals from master in case of network inactivity */
|
216
210
|
|
217
211
|
if (timer == NGX_TIMER_INFINITE || timer > 500) {
|
218
212
|
timer = 500;
|
@@ -328,7 +322,7 @@ ngx_handle_read_event(ngx_event_t *rev, ngx_uint_t flags)
|
|
328
322
|
}
|
329
323
|
}
|
330
324
|
|
331
|
-
/*
|
325
|
+
/* iocp */
|
332
326
|
|
333
327
|
return NGX_OK;
|
334
328
|
}
|
@@ -407,7 +401,7 @@ ngx_handle_write_event(ngx_event_t *wev, size_t lowat)
|
|
407
401
|
}
|
408
402
|
}
|
409
403
|
|
410
|
-
/*
|
404
|
+
/* iocp */
|
411
405
|
|
412
406
|
return NGX_OK;
|
413
407
|
}
|
@@ -506,7 +500,7 @@ ngx_event_module_init(ngx_cycle_t *cycle)
|
|
506
500
|
#endif
|
507
501
|
|
508
502
|
shm.size = size;
|
509
|
-
shm.name.len = sizeof("nginx_shared_zone");
|
503
|
+
shm.name.len = sizeof("nginx_shared_zone") - 1;
|
510
504
|
shm.name.data = (u_char *) "nginx_shared_zone";
|
511
505
|
shm.log = cycle->log;
|
512
506
|
|
@@ -531,7 +525,7 @@ ngx_event_module_init(ngx_cycle_t *cycle)
|
|
531
525
|
(void) ngx_atomic_cmp_set(ngx_connection_counter, 0, 1);
|
532
526
|
|
533
527
|
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
534
|
-
"counter: %p, %
|
528
|
+
"counter: %p, %uA",
|
535
529
|
ngx_connection_counter, *ngx_connection_counter);
|
536
530
|
|
537
531
|
ngx_temp_number = (ngx_atomic_t *) (shared + 2 * cl);
|
@@ -612,16 +606,16 @@ ngx_event_process_init(ngx_cycle_t *cycle)
|
|
612
606
|
return NGX_ERROR;
|
613
607
|
}
|
614
608
|
|
615
|
-
for (m = 0;
|
616
|
-
if (
|
609
|
+
for (m = 0; cycle->modules[m]; m++) {
|
610
|
+
if (cycle->modules[m]->type != NGX_EVENT_MODULE) {
|
617
611
|
continue;
|
618
612
|
}
|
619
613
|
|
620
|
-
if (
|
614
|
+
if (cycle->modules[m]->ctx_index != ecf->use) {
|
621
615
|
continue;
|
622
616
|
}
|
623
617
|
|
624
|
-
module =
|
618
|
+
module = cycle->modules[m]->ctx;
|
625
619
|
|
626
620
|
if (module->actions.init(cycle, ngx_timer_resolution) != NGX_OK) {
|
627
621
|
/* fatal */
|
@@ -676,6 +670,15 @@ ngx_event_process_init(ngx_cycle_t *cycle)
|
|
676
670
|
}
|
677
671
|
}
|
678
672
|
|
673
|
+
#else
|
674
|
+
|
675
|
+
if (ngx_timer_resolution && !(ngx_event_flags & NGX_USE_TIMER_EVENT)) {
|
676
|
+
ngx_log_error(NGX_LOG_WARN, cycle->log, 0,
|
677
|
+
"the \"timer_resolution\" directive is not supported "
|
678
|
+
"with the configured event method, ignored");
|
679
|
+
ngx_timer_resolution = 0;
|
680
|
+
}
|
681
|
+
|
679
682
|
#endif
|
680
683
|
|
681
684
|
cycle->connections =
|
@@ -731,12 +734,19 @@ ngx_event_process_init(ngx_cycle_t *cycle)
|
|
731
734
|
ls = cycle->listening.elts;
|
732
735
|
for (i = 0; i < cycle->listening.nelts; i++) {
|
733
736
|
|
737
|
+
#if (NGX_HAVE_REUSEPORT)
|
738
|
+
if (ls[i].reuseport && ls[i].worker != ngx_worker) {
|
739
|
+
continue;
|
740
|
+
}
|
741
|
+
#endif
|
742
|
+
|
734
743
|
c = ngx_get_connection(ls[i].fd, cycle->log);
|
735
744
|
|
736
745
|
if (c == NULL) {
|
737
746
|
return NGX_ERROR;
|
738
747
|
}
|
739
748
|
|
749
|
+
c->type = ls[i].type;
|
740
750
|
c->log = &ls[i].log;
|
741
751
|
|
742
752
|
c->listening = &ls[i];
|
@@ -809,21 +819,20 @@ ngx_event_process_init(ngx_cycle_t *cycle)
|
|
809
819
|
|
810
820
|
#else
|
811
821
|
|
812
|
-
rev->handler = ngx_event_accept
|
822
|
+
rev->handler = (c->type == SOCK_STREAM) ? ngx_event_accept
|
823
|
+
: ngx_event_recvmsg;
|
813
824
|
|
814
|
-
if (ngx_use_accept_mutex
|
825
|
+
if (ngx_use_accept_mutex
|
826
|
+
#if (NGX_HAVE_REUSEPORT)
|
827
|
+
&& !ls[i].reuseport
|
828
|
+
#endif
|
829
|
+
)
|
830
|
+
{
|
815
831
|
continue;
|
816
832
|
}
|
817
833
|
|
818
|
-
if (
|
819
|
-
|
820
|
-
return NGX_ERROR;
|
821
|
-
}
|
822
|
-
|
823
|
-
} else {
|
824
|
-
if (ngx_add_event(rev, NGX_READ_EVENT, 0) == NGX_ERROR) {
|
825
|
-
return NGX_ERROR;
|
826
|
-
}
|
834
|
+
if (ngx_add_event(rev, NGX_READ_EVENT, 0) == NGX_ERROR) {
|
835
|
+
return NGX_ERROR;
|
827
836
|
}
|
828
837
|
|
829
838
|
#endif
|
@@ -884,14 +893,7 @@ ngx_events_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|
884
893
|
|
885
894
|
/* count the number of the event modules and set up their indices */
|
886
895
|
|
887
|
-
ngx_event_max_module =
|
888
|
-
for (i = 0; ngx_modules[i]; i++) {
|
889
|
-
if (ngx_modules[i]->type != NGX_EVENT_MODULE) {
|
890
|
-
continue;
|
891
|
-
}
|
892
|
-
|
893
|
-
ngx_modules[i]->ctx_index = ngx_event_max_module++;
|
894
|
-
}
|
896
|
+
ngx_event_max_module = ngx_count_modules(cf->cycle, NGX_EVENT_MODULE);
|
895
897
|
|
896
898
|
ctx = ngx_pcalloc(cf->pool, sizeof(void *));
|
897
899
|
if (ctx == NULL) {
|
@@ -905,16 +907,17 @@ ngx_events_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|
905
907
|
|
906
908
|
*(void **) conf = ctx;
|
907
909
|
|
908
|
-
for (i = 0;
|
909
|
-
if (
|
910
|
+
for (i = 0; cf->cycle->modules[i]; i++) {
|
911
|
+
if (cf->cycle->modules[i]->type != NGX_EVENT_MODULE) {
|
910
912
|
continue;
|
911
913
|
}
|
912
914
|
|
913
|
-
m =
|
915
|
+
m = cf->cycle->modules[i]->ctx;
|
914
916
|
|
915
917
|
if (m->create_conf) {
|
916
|
-
(*ctx)[
|
917
|
-
|
918
|
+
(*ctx)[cf->cycle->modules[i]->ctx_index] =
|
919
|
+
m->create_conf(cf->cycle);
|
920
|
+
if ((*ctx)[cf->cycle->modules[i]->ctx_index] == NULL) {
|
918
921
|
return NGX_CONF_ERROR;
|
919
922
|
}
|
920
923
|
}
|
@@ -929,18 +932,20 @@ ngx_events_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|
929
932
|
|
930
933
|
*cf = pcf;
|
931
934
|
|
932
|
-
if (rv != NGX_CONF_OK)
|
935
|
+
if (rv != NGX_CONF_OK) {
|
933
936
|
return rv;
|
937
|
+
}
|
934
938
|
|
935
|
-
for (i = 0;
|
936
|
-
if (
|
939
|
+
for (i = 0; cf->cycle->modules[i]; i++) {
|
940
|
+
if (cf->cycle->modules[i]->type != NGX_EVENT_MODULE) {
|
937
941
|
continue;
|
938
942
|
}
|
939
943
|
|
940
|
-
m =
|
944
|
+
m = cf->cycle->modules[i]->ctx;
|
941
945
|
|
942
946
|
if (m->init_conf) {
|
943
|
-
rv = m->init_conf(cf->cycle,
|
947
|
+
rv = m->init_conf(cf->cycle,
|
948
|
+
(*ctx)[cf->cycle->modules[i]->ctx_index]);
|
944
949
|
if (rv != NGX_CONF_OK) {
|
945
950
|
return rv;
|
946
951
|
}
|
@@ -962,12 +967,6 @@ ngx_event_connections(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|
962
967
|
return "is duplicate";
|
963
968
|
}
|
964
969
|
|
965
|
-
if (ngx_strcmp(cmd->name.data, "connections") == 0) {
|
966
|
-
ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
|
967
|
-
"the \"connections\" directive is deprecated, "
|
968
|
-
"use the \"worker_connections\" directive instead");
|
969
|
-
}
|
970
|
-
|
971
970
|
value = cf->args->elts;
|
972
971
|
ecf->connections = ngx_atoi(value[1].data, value[1].len);
|
973
972
|
if (ecf->connections == (ngx_uint_t) NGX_ERROR) {
|
@@ -1007,15 +1006,15 @@ ngx_event_use(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|
1007
1006
|
}
|
1008
1007
|
|
1009
1008
|
|
1010
|
-
for (m = 0;
|
1011
|
-
if (
|
1009
|
+
for (m = 0; cf->cycle->modules[m]; m++) {
|
1010
|
+
if (cf->cycle->modules[m]->type != NGX_EVENT_MODULE) {
|
1012
1011
|
continue;
|
1013
1012
|
}
|
1014
1013
|
|
1015
|
-
module =
|
1014
|
+
module = cf->cycle->modules[m]->ctx;
|
1016
1015
|
if (module->name->len == value[1].len) {
|
1017
1016
|
if (ngx_strcmp(module->name->data, value[1].data) == 0) {
|
1018
|
-
ecf->use =
|
1017
|
+
ecf->use = cf->cycle->modules[m]->ctx_index;
|
1019
1018
|
ecf->name = module->name->data;
|
1020
1019
|
|
1021
1020
|
if (ngx_process == NGX_PROCESS_SINGLE
|
@@ -1188,10 +1187,6 @@ ngx_event_core_init_conf(ngx_cycle_t *cycle, void *conf)
|
|
1188
1187
|
|
1189
1188
|
#if (NGX_HAVE_EPOLL) && !(NGX_TEST_BUILD_EPOLL)
|
1190
1189
|
int fd;
|
1191
|
-
#endif
|
1192
|
-
#if (NGX_HAVE_RTSIG)
|
1193
|
-
ngx_uint_t rtsig;
|
1194
|
-
ngx_core_conf_t *ccf;
|
1195
1190
|
#endif
|
1196
1191
|
ngx_int_t i;
|
1197
1192
|
ngx_module_t *module;
|
@@ -1213,19 +1208,7 @@ ngx_event_core_init_conf(ngx_cycle_t *cycle, void *conf)
|
|
1213
1208
|
|
1214
1209
|
#endif
|
1215
1210
|
|
1216
|
-
#if (
|
1217
|
-
|
1218
|
-
if (module == NULL) {
|
1219
|
-
module = &ngx_rtsig_module;
|
1220
|
-
rtsig = 1;
|
1221
|
-
|
1222
|
-
} else {
|
1223
|
-
rtsig = 0;
|
1224
|
-
}
|
1225
|
-
|
1226
|
-
#endif
|
1227
|
-
|
1228
|
-
#if (NGX_HAVE_DEVPOLL)
|
1211
|
+
#if (NGX_HAVE_DEVPOLL) && !(NGX_TEST_BUILD_DEVPOLL)
|
1229
1212
|
|
1230
1213
|
module = &ngx_devpoll_module;
|
1231
1214
|
|
@@ -1246,20 +1229,20 @@ ngx_event_core_init_conf(ngx_cycle_t *cycle, void *conf)
|
|
1246
1229
|
#endif
|
1247
1230
|
|
1248
1231
|
if (module == NULL) {
|
1249
|
-
for (i = 0;
|
1232
|
+
for (i = 0; cycle->modules[i]; i++) {
|
1250
1233
|
|
1251
|
-
if (
|
1234
|
+
if (cycle->modules[i]->type != NGX_EVENT_MODULE) {
|
1252
1235
|
continue;
|
1253
1236
|
}
|
1254
1237
|
|
1255
|
-
event_module =
|
1238
|
+
event_module = cycle->modules[i]->ctx;
|
1256
1239
|
|
1257
1240
|
if (ngx_strcmp(event_module->name->data, event_core_name.data) == 0)
|
1258
1241
|
{
|
1259
1242
|
continue;
|
1260
1243
|
}
|
1261
1244
|
|
1262
|
-
module =
|
1245
|
+
module = cycle->modules[i];
|
1263
1246
|
break;
|
1264
1247
|
}
|
1265
1248
|
}
|
@@ -1281,31 +1264,5 @@ ngx_event_core_init_conf(ngx_cycle_t *cycle, void *conf)
|
|
1281
1264
|
ngx_conf_init_value(ecf->accept_mutex, 1);
|
1282
1265
|
ngx_conf_init_msec_value(ecf->accept_mutex_delay, 500);
|
1283
1266
|
|
1284
|
-
|
1285
|
-
#if (NGX_HAVE_RTSIG)
|
1286
|
-
|
1287
|
-
if (!rtsig) {
|
1288
|
-
return NGX_CONF_OK;
|
1289
|
-
}
|
1290
|
-
|
1291
|
-
if (ecf->accept_mutex) {
|
1292
|
-
return NGX_CONF_OK;
|
1293
|
-
}
|
1294
|
-
|
1295
|
-
ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
|
1296
|
-
|
1297
|
-
if (ccf->worker_processes == 0) {
|
1298
|
-
return NGX_CONF_OK;
|
1299
|
-
}
|
1300
|
-
|
1301
|
-
ngx_log_error(NGX_LOG_EMERG, cycle->log, 0,
|
1302
|
-
"the \"rtsig\" method requires \"accept_mutex\" to be on");
|
1303
|
-
|
1304
|
-
return NGX_CONF_ERROR;
|
1305
|
-
|
1306
|
-
#else
|
1307
|
-
|
1308
1267
|
return NGX_CONF_OK;
|
1309
|
-
|
1310
|
-
#endif
|
1311
1268
|
}
|