diff options
Diffstat (limited to 'src/http/modules/proxy')
-rw-r--r-- | src/http/modules/proxy/ngx_http_proxy_handler.c | 10 | ||||
-rw-r--r-- | src/http/modules/proxy/ngx_http_proxy_handler.h | 1 | ||||
-rw-r--r-- | src/http/modules/proxy/ngx_http_proxy_upstream.c | 6 |
3 files changed, 4 insertions, 13 deletions
diff --git a/src/http/modules/proxy/ngx_http_proxy_handler.c b/src/http/modules/proxy/ngx_http_proxy_handler.c index 8f0336a9b..0dba23f9b 100644 --- a/src/http/modules/proxy/ngx_http_proxy_handler.c +++ b/src/http/modules/proxy/ngx_http_proxy_handler.c @@ -60,13 +60,6 @@ static ngx_command_t ngx_http_proxy_commands[] = { 0, NULL }, - { ngx_string("proxy_request_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_proxy_loc_conf_t, request_buffer_size), - NULL }, - { ngx_string("proxy_connect_timeout"), NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, ngx_conf_set_msec_slot, @@ -781,7 +774,6 @@ static void *ngx_http_proxy_create_loc_conf(ngx_conf_t *cf) */ - conf->request_buffer_size = NGX_CONF_UNSET_SIZE; conf->connect_timeout = NGX_CONF_UNSET_MSEC; conf->send_timeout = NGX_CONF_UNSET_MSEC; @@ -822,8 +814,6 @@ static char *ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *prev = parent; ngx_http_proxy_loc_conf_t *conf = child; - ngx_conf_merge_size_value(conf->request_buffer_size, - prev->request_buffer_size, 8192); ngx_conf_merge_msec_value(conf->connect_timeout, prev->connect_timeout, 60000); ngx_conf_merge_msec_value(conf->send_timeout, prev->send_timeout, 30000); diff --git a/src/http/modules/proxy/ngx_http_proxy_handler.h b/src/http/modules/proxy/ngx_http_proxy_handler.h index d204cac59..853aa7617 100644 --- a/src/http/modules/proxy/ngx_http_proxy_handler.h +++ b/src/http/modules/proxy/ngx_http_proxy_handler.h @@ -48,7 +48,6 @@ typedef struct { typedef struct { - size_t request_buffer_size; size_t header_buffer_size; size_t busy_buffers_size; size_t max_temp_file_size; diff --git a/src/http/modules/proxy/ngx_http_proxy_upstream.c b/src/http/modules/proxy/ngx_http_proxy_upstream.c index 00a078009..bd4befd76 100644 --- a/src/http/modules/proxy/ngx_http_proxy_upstream.c +++ b/src/http/modules/proxy/ngx_http_proxy_upstream.c @@ -86,7 +86,6 @@ int ngx_http_proxy_request_upstream(ngx_http_proxy_ctx_t *p) tf->warn = "a client request body is buffered to a temporary file"; /* tf->persistent = 0; */ - rb->buf_size = p->lcf->request_buffer_size; rb->handler = ngx_http_proxy_init_upstream; rb->data = p; /* rb->bufs = NULL; */ @@ -1179,7 +1178,10 @@ static void ngx_http_proxy_send_response(ngx_http_proxy_ctx_t *p) ep->temp_file->file.log = r->connection->log; ep->temp_file->path = p->lcf->temp_path; ep->temp_file->pool = r->pool; - if (!p->cachable) { + + if (p->cachable) { + ep->temp_file->persistent = 1; + } else { ep->temp_file->warn = "an upstream response is buffered " "to a temporary file"; } |