Processing inconsistent proxied response length.

Keepalive connection is disabled if upstream response length
differs from specified in the "Content-Length" field value.
This commit is contained in:
Igor Sysoev
2019-11-14 16:40:02 +03:00
parent ddde9c23cf
commit 02e197e978
4 changed files with 32 additions and 3 deletions

View File

@@ -112,6 +112,7 @@ typedef struct {
nxt_sockaddr_t *sockaddr;
nxt_list_t *fields;
nxt_buf_t *body;
nxt_off_t remainder;
nxt_http_status_t status:16;
nxt_http_protocol_t protocol:8; /* 2 bits */
@@ -170,6 +171,7 @@ struct nxt_http_request_s {
nxt_http_protocol_t protocol:8; /* 2 bits */
uint8_t logged; /* 1 bit */
uint8_t header_sent; /* 1 bit */
uint8_t inconsistent; /* 1 bit */
uint8_t error; /* 1 bit */
uint8_t websocket_handshake; /* 1 bit */
};