| 724 | } |
| 725 | |
| 726 | bool |
| 727 | ControlBase::CheckModifiers(HttpRequestData *request_data) |
| 728 | { |
| 729 | if (!request_data->hdr) { |
| 730 | // we use the same request_data for Socks as well (only IpMatcher) |
| 731 | // we just return false here |
| 732 | return true; |
| 733 | } |
| 734 | |
| 735 | // If the incoming request has no tag but the entry does, or both |
| 736 | // have tags that do not match, then we do NOT have a match. |
| 737 | if (!request_data->tag && findModOfType(Modifier::MOD_TAG)) { |
| 738 | return false; |
| 739 | } |
| 740 | |
| 741 | for (auto &cur_mod : _mods) { |
| 742 | if (cur_mod && !cur_mod->check(request_data)) { |
| 743 | return false; |
| 744 | } |
| 745 | } |
| 746 | |
| 747 | return true; |
| 748 | } |
| 749 | |
| 750 | enum mod_errors { |
| 751 | ME_UNKNOWN, |