aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_scgi_module.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2011-09-30 11:53:27 +0000
committerMaxim Dounin <mdounin@mdounin.ru>2011-09-30 11:53:27 +0000
commit3aba7688559b27374d7dfc262d5aef7bbaf6d98d (patch)
tree28a3f1dc3dd6e54cb42275859de89c2adfd0307a /src/http/modules/ngx_http_scgi_module.c
parentf3ae6a6102256421bc0739ba4816fdd17ceda106 (diff)
downloadnginx-3aba7688559b27374d7dfc262d5aef7bbaf6d98d.tar.gz
nginx-3aba7688559b27374d7dfc262d5aef7bbaf6d98d.zip
Added uwsgi_buffering and scgi_buffering directives.
Patch by Peter Smit.
Diffstat (limited to 'src/http/modules/ngx_http_scgi_module.c')
-rw-r--r--src/http/modules/ngx_http_scgi_module.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_scgi_module.c b/src/http/modules/ngx_http_scgi_module.c
index a4230a956..393edde24 100644
--- a/src/http/modules/ngx_http_scgi_module.c
+++ b/src/http/modules/ngx_http_scgi_module.c
@@ -96,6 +96,13 @@ static ngx_command_t ngx_http_scgi_commands[] = {
offsetof(ngx_http_scgi_loc_conf_t, upstream.store_access),
NULL },
+ { ngx_string("scgi_buffering"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
+ ngx_conf_set_flag_slot,
+ NGX_HTTP_LOC_CONF_OFFSET,
+ offsetof(ngx_http_scgi_loc_conf_t, upstream.buffering),
+ NULL },
+
{ ngx_string("scgi_ignore_client_abort"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
ngx_conf_set_flag_slot,
@@ -412,7 +419,7 @@ ngx_http_scgi_handler(ngx_http_request_t *r)
u->abort_request = ngx_http_scgi_abort_request;
u->finalize_request = ngx_http_scgi_finalize_request;
- u->buffering = 1;
+ u->buffering = scf->upstream.buffering;
u->pipe = ngx_pcalloc(r->pool, sizeof(ngx_event_pipe_t));
if (u->pipe == NULL) {
@@ -1038,6 +1045,8 @@ ngx_http_scgi_create_loc_conf(ngx_conf_t *cf)
/* "scgi_cyclic_temp_file" is disabled */
conf->upstream.cyclic_temp_file = 0;
+ conf->upstream.change_buffering = 1;
+
ngx_str_set(&conf->upstream.module, "scgi");
return conf;