mirror of
https://github.com/nginx/nginx.git
synced 2026-10-25 13:32:27 +00:00
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.
This commit is contained in:
parent
891b43db32
commit
060b92451b
1 changed files with 1 additions and 1 deletions
|
|
@ -1591,7 +1591,7 @@ ngx_http_upstream_process_header(ngx_http_request_t *r, ngx_http_upstream_t *u)
|
|||
|
||||
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");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue