From dbb27765706e2d2f35b0af57c317b58d2d9d6ec9 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 1 Apr 2004 16:20:53 +0000 Subject: nginx-0.0.3-2004-04-01-20:20:53 import --- src/http/modules/proxy/ngx_http_proxy_upstream.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/http/modules/proxy/ngx_http_proxy_upstream.c') 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"; } -- cgit