impossible scheme

This commit is contained in:
cheng.hm 2022-04-21 01:30:03 -07:00
parent ced56c5b08
commit df7c2aac64

View File

@ -522,7 +522,7 @@ int Transaction::processURI(const char *uri, const char *method,
if (!m_uri_decoded.empty() && m_uri_decoded.at(0) != '/') {
bool fullDomain = true;
size_t scheme = m_uri_decoded.find(":")+1;
if (scheme == std::string::npos) {
if (scheme == std::string::npos) { //impossible case, for +1 in size_t scheme = m_uri_decoded.find(":")+1
fullDomain = false;
}
// Searching with a pos of -1 is undefined we also shortcut