]> git.kaiwu.me - nginx.git/commit
Upstream: p->downstream_error instead of closing connection.
authorMaxim Dounin <mdounin@mdounin.ru>
Fri, 4 Jul 2014 16:47:16 +0000 (20:47 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Fri, 4 Jul 2014 16:47:16 +0000 (20:47 +0400)
commit4a75e1a63c5cf3d278c7d7e50e012391b44b5e3c
tree39a1f85f9e6adb12193619eb0f8275d45f237fdb
parent3c2b5e88abbe6ff7e65b95708894208dd2828288
Upstream: p->downstream_error instead of closing connection.

Previously, nginx closed client connection in cases when a response body
from upstream was needed to be cached or stored but shouldn't be sent to
the client.  While this is normal for HTTP, it is unacceptable for SPDY.

Fix is to use instead the p->downstream_error flag to prevent nginx from
sending anything downstream.  To make this work, the event pipe code was
modified to properly cache empty responses with the flag set.
src/event/ngx_event_pipe.c
src/http/ngx_http_upstream.c