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 "