Latest update - 7220

This commit is contained in:
Hakase
2018-03-01 00:28:39 +09:00
parent 9f0588e695
commit 6d59db9f8e
7 changed files with 107 additions and 188 deletions
+21
View File
@@ -399,6 +399,13 @@ static ngx_command_t ngx_http_core_commands[] = {
offsetof(ngx_http_core_loc_conf_t, sendfile_max_chunk),
NULL },
{ ngx_string("subrequest_output_buffer_size"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_conf_set_size_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_core_loc_conf_t, subrequest_output_buffer_size),
NULL },
{ ngx_string("aio"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_http_core_set_aio,
@@ -2244,6 +2251,12 @@ ngx_http_subrequest(ngx_http_request_t *r,
return NGX_ERROR;
}
if (r->subrequest_in_memory) {
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
"nested in-memory subrequest \"%V\"", uri);
return NGX_ERROR;
}
sr = ngx_pcalloc(r->pool, sizeof(ngx_http_request_t));
if (sr == NULL) {
return NGX_ERROR;
@@ -2328,6 +2341,10 @@ ngx_http_subrequest(ngx_http_request_t *r,
sr->log_handler = r->log_handler;
if (sr->subrequest_in_memory) {
sr->filter_need_in_memory = 1;
}
if (!sr->background) {
if (c->data == r && r->postponed == NULL) {
c->data = sr;
@@ -3366,6 +3383,7 @@ ngx_http_core_create_loc_conf(ngx_conf_t *cf)
clcf->internal = NGX_CONF_UNSET;
clcf->sendfile = NGX_CONF_UNSET;
clcf->sendfile_max_chunk = NGX_CONF_UNSET_SIZE;
clcf->subrequest_output_buffer_size = NGX_CONF_UNSET_SIZE;
clcf->aio = NGX_CONF_UNSET;
clcf->aio_write = NGX_CONF_UNSET;
#if (NGX_THREADS)
@@ -3588,6 +3606,9 @@ ngx_http_core_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0);
ngx_conf_merge_size_value(conf->sendfile_max_chunk,
prev->sendfile_max_chunk, 0);
ngx_conf_merge_size_value(conf->subrequest_output_buffer_size,
prev->subrequest_output_buffer_size,
(size_t) ngx_pagesize);
ngx_conf_merge_value(conf->aio, prev->aio, NGX_HTTP_AIO_OFF);
ngx_conf_merge_value(conf->aio_write, prev->aio_write, 0);
#if (NGX_THREADS)