Fix bug where detection for chunked

This commit is contained in:
Nick Krichevsky 2018-09-03 15:48:38 -04:00
parent 2153f7c9b3
commit 17d9767394

View file

@ -102,7 +102,7 @@ static struct socket_read_info get_read_info(const struct http_header *headers)
struct socket_read_info info = {STRATEGY_EOF, -1};
while (header_cursor != NULL) {
if (headercmp(header_cursor, HEADER_TRANSFER_ENCODING) == 0 &&
case_insensitive_strcmp(header_cursor->value, ENCODING_TYPE_CHUNKED)) {
case_insensitive_strcmp(header_cursor->value, ENCODING_TYPE_CHUNKED) == 0) {
info.strategy = STRATEGY_CHUNKED;
} else if (headercmp(header_cursor, HEADER_CONTENT_LENGTH) == 0
&& info.strategy != STRATEGY_CHUNKED) {