aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_core_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2006-04-14 09:53:38 +0000
committerIgor Sysoev <igor@sysoev.ru>2006-04-14 09:53:38 +0000
commit8a2b2fb4fbd1801a5fb70d86384f2c6fd13c32c3 (patch)
treec0f7531cdc57da852f65d2d02bf11888bba63fe6 /src/http/ngx_http_core_module.c
parent2b1b55d025e0444978e1fcf4580217eb391860e0 (diff)
downloadnginx-release-0.3.38.tar.gz
nginx-release-0.3.38.zip
nginx-0.3.38-RELEASE importrelease-0.3.38
*) Feature: the ngx_http_dav_module. *) Change: the ngx_http_perl_module optimizations. Thanks to Sergey Skvortsov. *) Feature: the ngx_http_perl_module supports the $r->request_body_file method. *) Feature: the "client_body_in_file_only" directive. *) Workaround: now on disk overflow nginx tries to write access logs once a second only. Thanks to Anton Yuzhaninov and Maxim Dounin. *) Bugfix: now the "limit_rate" directive more precisely limits rate if rate is more than 100 Kbyte/s. Thanks to ForJest. *) Bugfix: now the IMAP/POP3 proxy escapes the "\r" and "\n" symbols in login and password to pass authorization server. Thanks to Maxim Dounin.
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r--src/http/ngx_http_core_module.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 62e172b62..6a08c4b32 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -268,6 +268,13 @@ static ngx_command_t ngx_http_core_commands[] = {
offsetof(ngx_http_core_loc_conf_t, client_body_temp_path),
(void *) ngx_garbage_collector_temp_handler },
+ { ngx_string("client_body_in_file_only"),
+ 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_core_loc_conf_t, client_body_in_file_only),
+ NULL },
+
{ ngx_string("sendfile"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
ngx_conf_set_flag_slot,
@@ -743,6 +750,11 @@ ngx_http_update_location_config(ngx_http_request_t *r)
r->connection->sendfile = 0;
}
+ if (clcf->client_body_in_file_only) {
+ r->request_body_in_file_only = 1;
+ r->request_body_in_persistent_file = 1;
+ }
+
if (r->keepalive && clcf->keepalive_timeout == 0) {
r->keepalive = 0;
}
@@ -1987,6 +1999,7 @@ ngx_http_core_create_loc_conf(ngx_conf_t *cf)
lcf->client_body_timeout = NGX_CONF_UNSET_MSEC;
lcf->satisfy_any = NGX_CONF_UNSET;
lcf->internal = NGX_CONF_UNSET;
+ lcf->client_body_in_file_only = NGX_CONF_UNSET;
lcf->sendfile = NGX_CONF_UNSET;
lcf->tcp_nopush = NGX_CONF_UNSET;
lcf->tcp_nodelay = NGX_CONF_UNSET;
@@ -2151,6 +2164,8 @@ ngx_http_core_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_conf_merge_value(conf->satisfy_any, prev->satisfy_any, 0);
ngx_conf_merge_value(conf->internal, prev->internal, 0);
+ ngx_conf_merge_value(conf->client_body_in_file_only,
+ prev->client_body_in_file_only, 0);
ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0);
ngx_conf_merge_value(conf->tcp_nopush, prev->tcp_nopush, 0);
ngx_conf_merge_value(conf->tcp_nodelay, prev->tcp_nodelay, 0);