Mercurial > hg > nginx
comparison src/event/ngx_event_pipe.c @ 2592:3a8a53c0c42f
a prelimiary proxy cache support
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 23 Mar 2009 13:14:51 +0000 |
parents | 722b5aff05ae |
children | 90422d071d3f |
comparison
equal
deleted
inserted
replaced
2591:7162ac8d564f | 2592:3a8a53c0c42f |
---|---|
421 { | 421 { |
422 u_char *prev; | 422 u_char *prev; |
423 size_t bsize; | 423 size_t bsize; |
424 ngx_int_t rc; | 424 ngx_int_t rc; |
425 ngx_uint_t flush, prev_last_shadow; | 425 ngx_uint_t flush, prev_last_shadow; |
426 ngx_chain_t *out, **ll, *cl; | 426 ngx_chain_t *out, **ll, *cl, file; |
427 ngx_connection_t *downstream; | 427 ngx_connection_t *downstream; |
428 | 428 |
429 downstream = p->downstream; | 429 downstream = p->downstream; |
430 | 430 |
431 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, p->log, 0, | 431 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, p->log, 0, |
484 p->downstream_error = 1; | 484 p->downstream_error = 1; |
485 return ngx_event_pipe_drain_chains(p); | 485 return ngx_event_pipe_drain_chains(p); |
486 } | 486 } |
487 | 487 |
488 p->in = NULL; | 488 p->in = NULL; |
489 } | |
490 | |
491 if (p->cacheable && p->buf_to_file) { | |
492 | |
493 file.buf = p->buf_to_file; | |
494 file.next = NULL; | |
495 | |
496 if (ngx_write_chain_to_temp_file(p->temp_file, &file) | |
497 == NGX_ERROR) | |
498 { | |
499 return NGX_ABORT; | |
500 } | |
489 } | 501 } |
490 | 502 |
491 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, p->log, 0, | 503 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, p->log, 0, |
492 "pipe write downstream done"); | 504 "pipe write downstream done"); |
493 | 505 |