Latest update - 7505
This commit is contained in:
@@ -493,7 +493,7 @@ static ngx_command_t ngx_http_core_commands[] = {
|
||||
{ ngx_string("limit_rate"),
|
||||
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
|
||||
|NGX_CONF_TAKE1,
|
||||
ngx_conf_set_size_slot,
|
||||
ngx_http_set_complex_value_size_slot,
|
||||
NGX_HTTP_LOC_CONF_OFFSET,
|
||||
offsetof(ngx_http_core_loc_conf_t, limit_rate),
|
||||
NULL },
|
||||
@@ -501,7 +501,7 @@ static ngx_command_t ngx_http_core_commands[] = {
|
||||
{ ngx_string("limit_rate_after"),
|
||||
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
|
||||
|NGX_CONF_TAKE1,
|
||||
ngx_conf_set_size_slot,
|
||||
ngx_http_set_complex_value_size_slot,
|
||||
NGX_HTTP_LOC_CONF_OFFSET,
|
||||
offsetof(ngx_http_core_loc_conf_t, limit_rate_after),
|
||||
NULL },
|
||||
@@ -1295,10 +1295,6 @@ ngx_http_update_location_config(ngx_http_request_t *r)
|
||||
r->connection->tcp_nopush = NGX_TCP_NOPUSH_DISABLED;
|
||||
}
|
||||
|
||||
if (r->limit_rate == 0) {
|
||||
r->limit_rate = clcf->limit_rate;
|
||||
}
|
||||
|
||||
if (clcf->handler) {
|
||||
r->content_handler = clcf->handler;
|
||||
}
|
||||
@@ -3401,6 +3397,8 @@ ngx_http_core_create_loc_conf(ngx_conf_t *cf)
|
||||
* clcf->exact_match = 0;
|
||||
* clcf->auto_redirect = 0;
|
||||
* clcf->alias = 0;
|
||||
* clcf->limit_rate = NULL;
|
||||
* clcf->limit_rate_after = NULL;
|
||||
* clcf->gzip_proxied = 0;
|
||||
* clcf->keepalive_disable = 0;
|
||||
*/
|
||||
@@ -3433,8 +3431,6 @@ ngx_http_core_create_loc_conf(ngx_conf_t *cf)
|
||||
clcf->send_timeout = NGX_CONF_UNSET_MSEC;
|
||||
clcf->send_lowat = NGX_CONF_UNSET_SIZE;
|
||||
clcf->postpone_output = NGX_CONF_UNSET_SIZE;
|
||||
clcf->limit_rate = NGX_CONF_UNSET_SIZE;
|
||||
clcf->limit_rate_after = NGX_CONF_UNSET_SIZE;
|
||||
clcf->keepalive_timeout = NGX_CONF_UNSET_MSEC;
|
||||
clcf->keepalive_header = NGX_CONF_UNSET;
|
||||
clcf->keepalive_requests = NGX_CONF_UNSET_UINT;
|
||||
@@ -3665,9 +3661,15 @@ ngx_http_core_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
|
||||
ngx_conf_merge_size_value(conf->send_lowat, prev->send_lowat, 0);
|
||||
ngx_conf_merge_size_value(conf->postpone_output, prev->postpone_output,
|
||||
1460);
|
||||
ngx_conf_merge_size_value(conf->limit_rate, prev->limit_rate, 0);
|
||||
ngx_conf_merge_size_value(conf->limit_rate_after, prev->limit_rate_after,
|
||||
0);
|
||||
|
||||
if (conf->limit_rate == NULL) {
|
||||
conf->limit_rate = prev->limit_rate;
|
||||
}
|
||||
|
||||
if (conf->limit_rate_after == NULL) {
|
||||
conf->limit_rate_after = prev->limit_rate_after;
|
||||
}
|
||||
|
||||
ngx_conf_merge_msec_value(conf->keepalive_timeout,
|
||||
prev->keepalive_timeout, 75000);
|
||||
ngx_conf_merge_sec_value(conf->keepalive_header,
|
||||
|
||||
Reference in New Issue
Block a user