comparison src/http/ngx_http_upstream.h @ 7679:05e42236e95b

FastCGI: protection from responses with wrong length. Previous behaviour was to pass everything to the client, but this seems to be suboptimal and causes issues (ticket #1695). Fix is to drop extra data instead, as it naturally happens in most clients. Additionally, we now also issue a warning if the response is too short, and make sure the fact it is truncated is propagated to the client. The u->error flag is introduced to make it possible to propagate the error to the client in case of unbuffered proxying. For responses to HEAD requests there is an exception: we do allow both responses without body and responses with body matching the Content-Length header.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 06 Jul 2020 18:36:23 +0300
parents bffcc5af1d72
children 3ab8e1e2f0f7
comparison
equal deleted inserted replaced
7678:bffcc5af1d72 7679:05e42236e95b
389 #endif 389 #endif
390 390
391 unsigned buffering:1; 391 unsigned buffering:1;
392 unsigned keepalive:1; 392 unsigned keepalive:1;
393 unsigned upgrade:1; 393 unsigned upgrade:1;
394 unsigned error:1;
394 395
395 unsigned request_sent:1; 396 unsigned request_sent:1;
396 unsigned request_body_sent:1; 397 unsigned request_body_sent:1;
397 unsigned request_body_blocked:1; 398 unsigned request_body_blocked:1;
398 unsigned header_sent:1; 399 unsigned header_sent:1;