From 30f18d15a0ad844633647bd234e4b8db6a9fd255 Mon Sep 17 00:00:00 2001 From: qicosmos Date: Thu, 7 Nov 2024 11:51:25 +0800 Subject: [PATCH] fix --- include/cinatra/http_parser.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/cinatra/http_parser.hpp b/include/cinatra/http_parser.hpp index 543198d4..76a967f4 100644 --- a/include/cinatra/http_parser.hpp +++ b/include/cinatra/http_parser.hpp @@ -47,7 +47,7 @@ class http_parser { } if (header_len_ < 0) [[unlikely]] { CINATRA_LOG_WARNING << "parse http head failed"; - if (size == CINATRA_MAX_HTTP_HEADER_FIELD_SIZE) { + if (num_headers_ == CINATRA_MAX_HTTP_HEADER_FIELD_SIZE) { CINATRA_LOG_ERROR << "the field of http head is out of max limit " << CINATRA_MAX_HTTP_HEADER_FIELD_SIZE << ", you can define macro " @@ -75,7 +75,7 @@ class http_parser { if (header_len_ < 0) [[unlikely]] { CINATRA_LOG_WARNING << "parse http head failed"; - if (size == CINATRA_MAX_HTTP_HEADER_FIELD_SIZE) { + if (num_headers_ == CINATRA_MAX_HTTP_HEADER_FIELD_SIZE) { CINATRA_LOG_ERROR << "the field of http head is out of max limit " << CINATRA_MAX_HTTP_HEADER_FIELD_SIZE << ", you can define macro "