diff --git a/src/net/http_interceptor.cpp b/src/net/http_interceptor.cpp index 9296351..8e54bfc 100644 --- a/src/net/http_interceptor.cpp +++ b/src/net/http_interceptor.cpp @@ -81,13 +81,12 @@ bool network::http::interceptor::trigger(const std::string& url, network::http:: for (size_t i = 0; i < m_list.size(); i++) { if (std::regex_match(url.c_str(), m_list[i].regex)) { - bool result = m_list[i].callback(rp, m_list[i].pattern, m_list[i].extra); - if (result == false) { -#if HTTP_INTERCEPTOR_PRINT == 1 - ylib::log->warn("[" + rp->exec_msec() + " ms] false url:" + url + "\t" + " express:" + info->express_string + " ip:" + rp->request()->remote_ipaddress(true), "interceptor"); -#endif + if (m_list[i].callback(rp, m_list[i].pattern, m_list[i].extra)== false) { +//#if HTTP_INTERCEPTORRINT == 1 + //std::cout<<"[trigger] false url:" << url << "\t" << " express:" << m_list[i].pattern << std::endl; +//#endif + return false; } - return result; } } return true;