diff --git a/include/tscore/ParseRules.h b/include/tscore/ParseRules.h index 9299b411c94..07bf1116e11 100644 --- a/include/tscore/ParseRules.h +++ b/include/tscore/ParseRules.h @@ -542,7 +542,7 @@ inline CTypeResult ParseRules::is_token(char c) { #ifndef COMPILE_PARSE_RULES - return (parseRulesCType[static_cast(c)] & is_token_BIT); + return (parseRulesCType[(unsigned char)c] & is_token_BIT); #else return (is_char(c) && !(is_ctl(c) || is_tspecials(c))); #endif @@ -712,7 +712,7 @@ ParseRules::is_http_field_name(char c) #ifndef COMPILE_PARSE_RULES return (parseRulesCType[static_cast(c)] & is_http_field_name_BIT); #else - if (!is_char(c) || is_control(c) || (is_mime_sep(c) && c != '@') || c == '=' || c == ':') { + if (!is_char(c) || is_control(c) || is_mime_sep(c) || c == '=' || c == ':') { return false; } return true;