| 1133 | } |
| 1134 | |
| 1135 | static inline CompiledRegexPtr getCompiledRegex(const std::string & expression) |
| 1136 | { |
| 1137 | auto compiled_regex = std::make_shared<const re2::RE2>(expression); |
| 1138 | |
| 1139 | if (!compiled_regex->ok()) |
| 1140 | throw Exception( |
| 1141 | "Cannot compile re2: " + expression + " for http handling rule, error: " + compiled_regex->error() |
| 1142 | + ". Look at https://github.com/google/re2/wiki/Syntax for reference.", |
| 1143 | ErrorCodes::CANNOT_COMPILE_REGEXP); |
| 1144 | |
| 1145 | return compiled_regex; |
| 1146 | } |
| 1147 | |
| 1148 | HTTPRequestHandlerFactoryPtr createPredefinedHandlerFactory(IServer & server, const std::string & config_prefix) |
| 1149 | { |
no test coverage detected