| 15759 | } |
| 15760 | |
| 15761 | tl::expected<std::string, errors> url_pattern_init::process_protocol( |
| 15762 | std::string_view value, process_type type) { |
| 15763 | ada_log("process_protocol=", value, " [", type, "]"); |
| 15764 | // Let strippedValue be the given value with a single trailing U+003A (:) |
| 15765 | // removed, if any. |
| 15766 | if (value.ends_with(":")) { |
| 15767 | value.remove_suffix(1); |
| 15768 | } |
| 15769 | // If type is "pattern" then return strippedValue. |
| 15770 | if (type == process_type::pattern) { |
| 15771 | return std::string(value); |
| 15772 | } |
| 15773 | // Return the result of running canonicalize a protocol given strippedValue. |
| 15774 | return url_pattern_helpers::canonicalize_protocol(value); |
| 15775 | } |
| 15776 | |
| 15777 | tl::expected<std::string, errors> url_pattern_init::process_username( |
| 15778 | std::string_view value, process_type type) { |
nothing calls this directly
no test coverage detected