aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_process_cycle.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2012-10-30 11:14:24 +0000
committerMaxim Dounin <mdounin@mdounin.ru>2012-10-30 11:14:24 +0000
commit8e67fb4226e6357477f32fbdd1443fb2bdd00b69 (patch)
tree9652a94ee8448bd3b1fa77d65711538d119f5fe9 /src/os/unix/ngx_process_cycle.c
parentd310eeef3f25c788546c885434292575fdf67663 (diff)
downloadnginx-8e67fb4226e6357477f32fbdd1443fb2bdd00b69.tar.gz
nginx-8e67fb4226e6357477f32fbdd1443fb2bdd00b69.zip
Event pipe: fixed handling of buf_to_file data.
Input filter might free a buffer if there is no data in it, and in case of first buffer (used for cache header and request header, aka p->buf_to_file) this resulted in cache corruption. Buffer memory was reused to read upstream response before headers were written to disk. Fix is to avoid moving pointers in ngx_event_pipe_add_free_buf() to a buffer start if we were asked to free a buffer used by p->buf_to_file. This fixes occasional cache file corruption, usually resulted in "cache file ... has md5 collision" alerts. Reported by Anatoli Marinov.
Diffstat (limited to 'src/os/unix/ngx_process_cycle.c')
0 files changed, 0 insertions, 0 deletions