Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/event/ngx_event_pipe.c')
-rw-r--r--src/event/ngx_event_pipe.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/event/ngx_event_pipe.c b/src/event/ngx_event_pipe.c
index ca18d7cae..c13d2ea5a 100644
--- a/src/event/ngx_event_pipe.c
+++ b/src/event/ngx_event_pipe.c
@@ -423,7 +423,7 @@ ngx_event_pipe_write_to_downstream(ngx_event_pipe_t *p)
size_t bsize;
ngx_int_t rc;
ngx_uint_t flush, prev_last_shadow;
- ngx_chain_t *out, **ll, *cl;
+ ngx_chain_t *out, **ll, *cl, file;
ngx_connection_t *downstream;
downstream = p->downstream;
@@ -488,6 +488,18 @@ ngx_event_pipe_write_to_downstream(ngx_event_pipe_t *p)
p->in = NULL;
}
+ if (p->cacheable && p->buf_to_file) {
+
+ file.buf = p->buf_to_file;
+ file.next = NULL;
+
+ if (ngx_write_chain_to_temp_file(p->temp_file, &file)
+ == NGX_ERROR)
+ {
+ return NGX_ABORT;
+ }
+ }
+
ngx_log_debug0(NGX_LOG_DEBUG_EVENT, p->log, 0,
"pipe write downstream done");