| 8416 | } |
| 8417 | |
| 8418 | void url_aggregator::update_host_to_base_host( |
| 8419 | const std::string_view input) noexcept { |
| 8420 | ada_log("url_aggregator::update_host_to_base_host ", input); |
| 8421 | ADA_ASSERT_TRUE(validate()); |
| 8422 | ADA_ASSERT_TRUE(!helpers::overlaps(input, buffer)); |
| 8423 | if (type != ada::scheme::type::FILE) { |
| 8424 | // Let host be the result of host parsing host_view with url is not special. |
| 8425 | if (input.empty() && !is_special()) { |
| 8426 | if (has_hostname()) { |
| 8427 | clear_hostname(); |
| 8428 | } else if (has_dash_dot()) { |
| 8429 | add_authority_slashes_if_needed(); |
| 8430 | delete_dash_dot(); |
| 8431 | } |
| 8432 | return; |
| 8433 | } |
| 8434 | } |
| 8435 | update_base_hostname(input); |
| 8436 | ADA_ASSERT_TRUE(validate()); |
| 8437 | return; |
| 8438 | } |
| 8439 | } // namespace ada |
| 8440 | |
| 8441 | #endif // ADA_URL_AGGREGATOR_INL_H |
no test coverage detected