@@ -729,23 +729,16 @@ std::string generate_segment_wildcard_regexp(
729729}
730730
731731bool protocol_component_matches_special_scheme (
732- ada:: url_pattern_component& component) {
732+ url_pattern_component& component) {
733733 auto regex = component.get_regexp ();
734734 ada_log (" protocol_component_matches_special_scheme regex: " , regex);
735- try {
736- std::regex rx (regex.data (), regex.size ());
737- std::cmatch cmatch;
738- return std::regex_match (" http" , cmatch, rx) ||
739- std::regex_match (" https" , cmatch, rx) ||
740- std::regex_match (" ws" , cmatch, rx) ||
741- std::regex_match (" wss" , cmatch, rx) ||
742- std::regex_match (" ftp" , cmatch, rx);
743- } catch (...) {
744- // You probably want to log this error.
745- ada_log (" Error while matching protocol component with special scheme" );
746- ada_log (" Regex Input: " , regex);
747- return false ;
748- }
735+ std::regex rx (regex.data (), regex.size ());
736+ std::cmatch cmatch;
737+ return std::regex_match (" http" , cmatch, rx) ||
738+ std::regex_match (" https" , cmatch, rx) ||
739+ std::regex_match (" ws" , cmatch, rx) ||
740+ std::regex_match (" wss" , cmatch, rx) ||
741+ std::regex_match (" ftp" , cmatch, rx);
749742}
750743
751744} // namespace url_pattern_helpers
0 commit comments