bool AppControlInfo::Match(const AppControlInfo& info) const {
if (info.GetOperation() != GetOperation()) return false;
- if (info.GetUri() == GetUri() && info.GetMime() == GetMime()) return true;
+ if (info.GetUri() != GetUri()) return false;
- if (info.GetUri() == GetUri()) {
- if (info.GetMime() == "NULL" && info.GetMimeSubtype() == "%") {
+ if (info.GetMime() == GetMime()) return true;
+
+ if (info.GetMime() != "NULL") {
+ if (info.GetMimeSubtype() != "%") {
std::string mime = info.GetMimeType() + "/*";
if (GetMime() == mime) return true;
}
- if (info.GetMime() == "NULL" && info.GetMimeType() == "%")
+ if (info.GetMimeType() != "%")
if (GetMime() == "*/*") return true;
}