| 7603 | } |
| 7604 | |
| 7605 | inline void url_aggregator::append_base_pathname(const std::string_view input) { |
| 7606 | ada_log("url_aggregator::append_base_pathname ", input, " ", to_string(), |
| 7607 | "\n", to_diagram()); |
| 7608 | ADA_ASSERT_TRUE(validate()); |
| 7609 | ADA_ASSERT_TRUE(!helpers::overlaps(input, buffer)); |
| 7610 | #if ADA_DEVELOPMENT_CHECKS |
| 7611 | // computing the expected password. |
| 7612 | std::string path_expected(get_pathname()); |
| 7613 | path_expected.append(input); |
| 7614 | #endif // ADA_DEVELOPMENT_CHECKS |
| 7615 | uint32_t ending_index = uint32_t(buffer.size()); |
| 7616 | if (components.search_start != url_components::omitted) { |
| 7617 | ending_index = components.search_start; |
| 7618 | } else if (components.hash_start != url_components::omitted) { |
| 7619 | ending_index = components.hash_start; |
| 7620 | } |
| 7621 | buffer.insert(ending_index, input); |
| 7622 | |
| 7623 | if (components.search_start != url_components::omitted) { |
| 7624 | components.search_start += uint32_t(input.size()); |
| 7625 | } |
| 7626 | if (components.hash_start != url_components::omitted) { |
| 7627 | components.hash_start += uint32_t(input.size()); |
| 7628 | } |
| 7629 | #if ADA_DEVELOPMENT_CHECKS |
| 7630 | std::string path_after = std::string(get_pathname()); |
| 7631 | ADA_ASSERT_EQUAL( |
| 7632 | path_expected, path_after, |
| 7633 | "append_base_pathname problem after inserting " + std::string(input)); |
| 7634 | #endif // ADA_DEVELOPMENT_CHECKS |
| 7635 | ADA_ASSERT_TRUE(validate()); |
| 7636 | } |
| 7637 | |
| 7638 | inline void url_aggregator::update_base_username(const std::string_view input) { |
| 7639 | ada_log("url_aggregator::update_base_username '", input, "' ", to_string(), |