Skip to content

Commit

Permalink
fix regInit isCase param bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kivenchen committed Jun 2, 2020
1 parent 0e51e8d commit 580fb3e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/httpproxy/HttpRouter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ bool RouterHost::initHost(const string& serverName)
break;
case EHT_REGMATCH:
_host = serverName.substr(1);
if (!regInit(_host, regInit, _reg))
if (!regInit(_host, false, _reg))
{
TLOGERROR("init regex fail:" << serverName << "|" << _host << endl);
return false;
Expand Down Expand Up @@ -390,7 +390,6 @@ bool RouterHost::matchPath(const string &p, RouterResult& result)
return it->second->match(p, result);
}

bool ret = false;
for (auto t = _startWithPath.begin(); t != _startWithPath.end(); ++t)
{
if ((*t)->match(p, result))
Expand Down Expand Up @@ -505,7 +504,6 @@ bool RouterAgent::reload(const vector<RouterParam> &param)
bool HttpRouter::parse(const string& host, const string& path, RouterResult& result)
{
TC_ThreadRLock r(_rwLock);
bool ret = false;
// 1、全匹配
TLOGDEBUG(host << "|" << path << endl);
auto it = _fullHost.find(host);
Expand Down Expand Up @@ -553,4 +551,4 @@ bool HttpRouter::parse(const string& host, const string& path, RouterResult& res
}

return false;
}
}

0 comments on commit 580fb3e

Please sign in to comment.