# HG changeset patch # User Maxim Dounin # Date 1314381728 -14400 # Node ID 5ef365a8403f2df67749687d84640c6b8ee4da18 # Parent ac0a7fd4de491e64d42f218691b681f7b3fa931b Make sure to set p->read once we are done. It's required to flush cache header into temp file in case of empty response. Not flushing (and hence not creating temp file) will cause segmentation fault later in file cache code. diff --git a/src/event/ngx_event_pipe.c b/src/event/ngx_event_pipe.c --- a/src/event/ngx_event_pipe.c +++ b/src/event/ngx_event_pipe.c @@ -414,6 +414,7 @@ ngx_event_pipe_read_upstream(ngx_event_p if (p->length == 0) { p->upstream_done = 1; + p->read = 1; } if ((p->upstream_eof || p->upstream_error) && p->free_raw_bufs) {