Mercurial > hg > nginx
comparison src/http/modules/ngx_http_proxy_module.c @ 7371:8b68d50090e4
Upstream: proxy_socket_keepalive and friends.
The directives enable the use of the SO_KEEPALIVE option on
upstream connections. By default, the value is left unchanged.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 03 Oct 2018 14:08:51 +0300 |
parents | 45e513c3540d |
children | 8981dbb12254 |
comparison
equal
deleted
inserted
replaced
7370:aa1c9f846567 | 7371:8b68d50090e4 |
---|---|
320 { ngx_string("proxy_bind"), | 320 { ngx_string("proxy_bind"), |
321 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE12, | 321 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE12, |
322 ngx_http_upstream_bind_set_slot, | 322 ngx_http_upstream_bind_set_slot, |
323 NGX_HTTP_LOC_CONF_OFFSET, | 323 NGX_HTTP_LOC_CONF_OFFSET, |
324 offsetof(ngx_http_proxy_loc_conf_t, upstream.local), | 324 offsetof(ngx_http_proxy_loc_conf_t, upstream.local), |
325 NULL }, | |
326 | |
327 { ngx_string("proxy_socket_keepalive"), | |
328 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, | |
329 ngx_conf_set_flag_slot, | |
330 NGX_HTTP_LOC_CONF_OFFSET, | |
331 offsetof(ngx_http_proxy_loc_conf_t, upstream.socket_keepalive), | |
325 NULL }, | 332 NULL }, |
326 | 333 |
327 { ngx_string("proxy_connect_timeout"), | 334 { ngx_string("proxy_connect_timeout"), |
328 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, | 335 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, |
329 ngx_conf_set_msec_slot, | 336 ngx_conf_set_msec_slot, |
2831 conf->upstream.request_buffering = NGX_CONF_UNSET; | 2838 conf->upstream.request_buffering = NGX_CONF_UNSET; |
2832 conf->upstream.ignore_client_abort = NGX_CONF_UNSET; | 2839 conf->upstream.ignore_client_abort = NGX_CONF_UNSET; |
2833 conf->upstream.force_ranges = NGX_CONF_UNSET; | 2840 conf->upstream.force_ranges = NGX_CONF_UNSET; |
2834 | 2841 |
2835 conf->upstream.local = NGX_CONF_UNSET_PTR; | 2842 conf->upstream.local = NGX_CONF_UNSET_PTR; |
2843 conf->upstream.socket_keepalive = NGX_CONF_UNSET; | |
2836 | 2844 |
2837 conf->upstream.connect_timeout = NGX_CONF_UNSET_MSEC; | 2845 conf->upstream.connect_timeout = NGX_CONF_UNSET_MSEC; |
2838 conf->upstream.send_timeout = NGX_CONF_UNSET_MSEC; | 2846 conf->upstream.send_timeout = NGX_CONF_UNSET_MSEC; |
2839 conf->upstream.read_timeout = NGX_CONF_UNSET_MSEC; | 2847 conf->upstream.read_timeout = NGX_CONF_UNSET_MSEC; |
2840 conf->upstream.next_upstream_timeout = NGX_CONF_UNSET_MSEC; | 2848 conf->upstream.next_upstream_timeout = NGX_CONF_UNSET_MSEC; |
2951 prev->upstream.force_ranges, 0); | 2959 prev->upstream.force_ranges, 0); |
2952 | 2960 |
2953 ngx_conf_merge_ptr_value(conf->upstream.local, | 2961 ngx_conf_merge_ptr_value(conf->upstream.local, |
2954 prev->upstream.local, NULL); | 2962 prev->upstream.local, NULL); |
2955 | 2963 |
2964 ngx_conf_merge_value(conf->upstream.socket_keepalive, | |
2965 prev->upstream.socket_keepalive, 0); | |
2966 | |
2956 ngx_conf_merge_msec_value(conf->upstream.connect_timeout, | 2967 ngx_conf_merge_msec_value(conf->upstream.connect_timeout, |
2957 prev->upstream.connect_timeout, 60000); | 2968 prev->upstream.connect_timeout, 60000); |
2958 | 2969 |
2959 ngx_conf_merge_msec_value(conf->upstream.send_timeout, | 2970 ngx_conf_merge_msec_value(conf->upstream.send_timeout, |
2960 prev->upstream.send_timeout, 60000); | 2971 prev->upstream.send_timeout, 60000); |