diff --git a/include/cinatra/http_parser.hpp b/include/cinatra/http_parser.hpp index 79b3cc7a..04322cee 100644 --- a/include/cinatra/http_parser.hpp +++ b/include/cinatra/http_parser.hpp @@ -101,6 +101,9 @@ class http_parser { } full_url_ = url_; + if (!queries_.empty()) { + queries_.clear(); + } if (has_query) { size_t pos = url_.find('?'); parse_query(url_.substr(pos + 1, url_len - pos - 1)); diff --git a/include/cinatra/picohttpparser.h b/include/cinatra/picohttpparser.h index 310044b3..d57377a5 100644 --- a/include/cinatra/picohttpparser.h +++ b/include/cinatra/picohttpparser.h @@ -884,7 +884,7 @@ static const char *parse_headers(const char *buf, const char *buf_end, // has connection has_connection = true; char ch = *value; - if (ch == 'U') { + if (ch == 'U' || ch == 'u') { // has upgrade has_upgrade = true; }