]> git.kaiwu.me - nginx.git/commit
Event pipe: process data after recv_chain() errors.
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 1 Sep 2016 15:29:55 +0000 (18:29 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 1 Sep 2016 15:29:55 +0000 (18:29 +0300)
commit4e8a73adaa7b5bddeba01daf1965d66a897f066d
tree926699f94a85e2114cf5ce5a9ad743332bb26996
parentc6ba4aae38af53a378a57fd196fe32ccb3b4131d
Event pipe: process data after recv_chain() errors.

When c->recv_chain() returns an error, it is possible that we already
have some data previously read, e.g., in preread buffer.  And in some
cases it may be even a complete response.  Changed c->recv_chain() error
handling to process the data, much like it is already done if kevent
reports about an error.

This change, in particular, fixes processing of small responses
when an upstream fails to properly close a connection with lingering and
therefore the connection is reset, but the response is already fully
obtained by nginx (see ticket #1037).
src/event/ngx_event_pipe.c