]> git.kaiwu.me - nginx.git/commit
Upstream: added check if a response is complete.
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 25 Jul 2013 11:00:12 +0000 (15:00 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 25 Jul 2013 11:00:12 +0000 (15:00 +0400)
commit960d0bfe344d70223fec74079378992897855cc3
tree693f16dba087ac7a7a97fca2015d9aae7c621170
parent416b922bd2c285551d195c1f33a3736775ea45e9
Upstream: added check if a response is complete.

Checks were added to both buffered and unbuffered code paths to detect
and complain if a response is incomplete.  Appropriate error codes are
now passed to ngx_http_upstream_finalize_request().

With this change in unbuffered mode we now use u->length set to -1 as an
indicator that EOF is allowed per protocol and used to indicate response
end (much like its with p->length in buffered mode).  Proxy module was
changed to set u->length to 1 (instead of previously used -1) in case of
chunked transfer encoding used to comply with the above.
src/http/modules/ngx_http_proxy_module.c
src/http/ngx_http_upstream.c