diff --git a/src/transaction.cc b/src/transaction.cc index 96f9c21b34..1cb380b764 100644 --- a/src/transaction.cc +++ b/src/transaction.cc @@ -522,14 +522,14 @@ 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 if (scheme != std::string::npos && fullDomain == true) { // Assuming we found a colon make sure its followed - size_t netloc = m_uri_decoded.find("//", scheme) + 2; - if (netloc == std::string::npos || (netloc != scheme + 2)) { + size_t netloc = m_uri_decoded.find("//", scheme) + 2;// + if (netloc == std::string::npos || (netloc != scheme + 2)) { //(netloc == std::string::npos) will be false forever, for +2 in size_t netloc = m_uri_decoded.find("//", scheme) + 2 fullDomain = false; } if (netloc != std::string::npos && fullDomain == true) {