Mercurial > hg > nginx
changeset 4507:e66122a62bde stable-1.0
Merge of r4461: upstream: fixed "too big header" check.
If header filter postponed processing of a header by returning NGX_AGAIN
and not moved u->buffer->pos, previous check incorrectly assumed there
is additional space and did another recv() with zero-size buffer. This
resulted in "upstream prematurely closed connection" error instead
of correct "upstream sent too big header" one.
Patch by Feibo Li.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 05 Mar 2012 12:15:02 +0000 |
parents | 14f8e8a0cc77 |
children | 9f663da02aa7 |
files | src/http/ngx_http_upstream.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c Mon Mar 05 12:10:09 2012 +0000 +++ b/src/http/ngx_http_upstream.c Mon Mar 05 12:15:02 2012 +0000 @@ -1561,7 +1561,7 @@ if (rc == NGX_AGAIN) { - if (u->buffer.pos == u->buffer.end) { + if (u->buffer.last == u->buffer.end) { ngx_log_error(NGX_LOG_ERR, c->log, 0, "upstream sent too big header");