Klaus Demo nginx / f1dbcf6
Stream: renamed rate limiting directives. The directive proxy_downstream_limit_rate is now called proxy_upload_rate. The directive proxy_upstream_limit_rate is now called proxy_download_rate. Roman Arutyunyan 6 years ago
1 changed file(s) with 14 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
1717 ngx_msec_t timeout;
1818 ngx_msec_t next_upstream_timeout;
1919 size_t downstream_buf_size;
20 size_t downstream_limit_rate;
20 size_t upload_rate;
2121 size_t upstream_buf_size;
22 size_t upstream_limit_rate;
22 size_t download_rate;
2323 ngx_uint_t next_upstream_tries;
2424 ngx_flag_t next_upstream;
2525 ngx_flag_t proxy_protocol;
133133 offsetof(ngx_stream_proxy_srv_conf_t, downstream_buf_size),
134134 NULL },
135135
136 { ngx_string("proxy_downstream_limit_rate"),
136 { ngx_string("proxy_upload_rate"),
137137 NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_TAKE1,
138138 ngx_conf_set_size_slot,
139139 NGX_STREAM_SRV_CONF_OFFSET,
140 offsetof(ngx_stream_proxy_srv_conf_t, downstream_limit_rate),
140 offsetof(ngx_stream_proxy_srv_conf_t, upload_rate),
141141 NULL },
142142
143143 { ngx_string("proxy_upstream_buffer"),
147147 offsetof(ngx_stream_proxy_srv_conf_t, upstream_buf_size),
148148 NULL },
149149
150 { ngx_string("proxy_upstream_limit_rate"),
150 { ngx_string("proxy_download_rate"),
151151 NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_TAKE1,
152152 ngx_conf_set_size_slot,
153153 NGX_STREAM_SRV_CONF_OFFSET,
154 offsetof(ngx_stream_proxy_srv_conf_t, upstream_limit_rate),
154 offsetof(ngx_stream_proxy_srv_conf_t, download_rate),
155155 NULL },
156156
157157 { ngx_string("proxy_next_upstream"),
10091009 src = pc;
10101010 dst = c;
10111011 b = &u->upstream_buf;
1012 limit_rate = pscf->upstream_limit_rate;
1012 limit_rate = pscf->download_rate;
10131013 received = &u->received;
10141014
10151015 } else {
10161016 src = c;
10171017 dst = pc;
10181018 b = &u->downstream_buf;
1019 limit_rate = pscf->downstream_limit_rate;
1019 limit_rate = pscf->upload_rate;
10201020 received = &s->received;
10211021 }
10221022
12951295 conf->timeout = NGX_CONF_UNSET_MSEC;
12961296 conf->next_upstream_timeout = NGX_CONF_UNSET_MSEC;
12971297 conf->downstream_buf_size = NGX_CONF_UNSET_SIZE;
1298 conf->downstream_limit_rate = NGX_CONF_UNSET_SIZE;
1298 conf->upload_rate = NGX_CONF_UNSET_SIZE;
12991299 conf->upstream_buf_size = NGX_CONF_UNSET_SIZE;
1300 conf->upstream_limit_rate = NGX_CONF_UNSET_SIZE;
1300 conf->download_rate = NGX_CONF_UNSET_SIZE;
13011301 conf->next_upstream_tries = NGX_CONF_UNSET_UINT;
13021302 conf->next_upstream = NGX_CONF_UNSET;
13031303 conf->proxy_protocol = NGX_CONF_UNSET;
13341334 ngx_conf_merge_size_value(conf->downstream_buf_size,
13351335 prev->downstream_buf_size, 16384);
13361336
1337 ngx_conf_merge_size_value(conf->downstream_limit_rate,
1338 prev->downstream_limit_rate, 0);
1337 ngx_conf_merge_size_value(conf->upload_rate,
1338 prev->upload_rate, 0);
13391339
13401340 ngx_conf_merge_size_value(conf->upstream_buf_size,
13411341 prev->upstream_buf_size, 16384);
13421342
1343 ngx_conf_merge_size_value(conf->upstream_limit_rate,
1344 prev->upstream_limit_rate, 0);
1343 ngx_conf_merge_size_value(conf->download_rate,
1344 prev->download_rate, 0);
13451345
13461346 ngx_conf_merge_uint_value(conf->next_upstream_tries,
13471347 prev->next_upstream_tries, 0);