23 std::is_same_v<url_aggregator, result_type>;
73 helpers::remove_ascii_tab_or_newline(
tmp_buffer);
81 helpers::trim_c0_whitespace(
url_data);
129 ada_log(
"SCHEME the scheme should be ",
137 if (!
url.parse_scheme_with_colon(
192 ada_log(
"NO_SCHEME validation error");
201 ada_log(
"NO_SCHEME opaque base with fragment");
209 url.update_base_pathname(
base_url->get_pathname());
215 url.update_base_search(
s.empty() ? std::string_view(
"?") :
s);
224 ada_log(
"NO_SCHEME non-file relative path");
229 ada_log(
"NO_SCHEME file base type");
262 : helpers::find_authority_delimiter(
view);
272 url.password +=
"%40";
274 url.append_base_password(
"%40");
278 url.username +=
"%40";
280 url.append_base_username(
"%40");
295 url.username += unicode::percent_encode(
299 url.append_base_username(unicode::percent_encode(
305 url.username += unicode::percent_encode(
308 url.password += unicode::percent_encode(
312 url.append_base_username(unicode::percent_encode(
315 url.append_base_password(unicode::percent_encode(
323 url.password += unicode::percent_encode(
326 url.append_base_password(unicode::percent_encode(
361 ada_log(
"SPECIAL_RELATIVE_OR_AUTHORITY ",
406 "RELATIVE_SCHEME if c is U+002F (/), then set state to relative "
414 "RELATIVE_SCHEME if url is special and c is U+005C, validation "
415 "error, set state to relative slash state");
418 ada_log(
"RELATIVE_SCHEME otherwise");
435 url.update_host_to_base_host(
base_url->get_hostname());
436 url.update_base_port(
base_url->retrieve_base_port());
439 url.update_base_pathname(
base_url->get_pathname());
445 url.update_base_search(
s.empty() ? std::string_view(
"?") :
s);
463 helpers::shorten_path(
url.path,
url.type);
466 if (helpers::shorten_path(path,
url.type)) {
467 url.update_base_pathname(std::move(std::string(path)));
509 url.update_host_to_base_host(
base_url->get_hostname());
510 url.update_base_port(
base_url->retrieve_base_port());
520 ada_log(
"SPECIAL_AUTHORITY_SLASHES ",
533 ada_log(
"SPECIAL_AUTHORITY_IGNORE_SLASHES ",
560 ada_log(
"QUERY update_base_search completed ");
609 url.update_base_hostname(
"");
628 if (
location != std::string_view::npos) {
639 if (
view.ends_with(
' ')) {
641 std::string(
view.substr(0,
view.size() - 1)) +
"%20";
642 url.update_base_pathname(unicode::percent_encode(
645 url.update_base_pathname(unicode::percent_encode(
672 url.update_base_pathname(
"/");
723 helpers::parse_prepared_path(
view,
url.type,
url.path);
725 url.consume_prepared_path(
view);
738 ada_log(
"FILE_SLASH c is U+002F or U+005C");
743 ada_log(
"FILE_SLASH otherwise");
752 url.update_host_to_base_host(
base_url->get_host());
758 if (!
base_url->get_pathname().empty()) {
764 if (
loc != std::string_view::npos) {
773 url.append_base_pathname(
803 url.update_base_hostname(
"");
818 if (
url.host.has_value() &&
url.host.value() ==
"localhost") {
823 url.update_base_hostname(
"");
837 url.set_protocol_as_file();
842 url.update_base_hostname(
"");
848 ada_log(
"FILE c is U+002F or U+005C");
862 url.update_host_to_base_host(
base_url->get_hostname());
863 url.update_base_pathname(
base_url->get_pathname());
869 url.update_base_search(
s.empty() ? std::string_view(
"?") :
s);
887 helpers::shorten_path(
url.path,
url.type);
890 if (helpers::shorten_path(path,
url.type)) {
891 url.update_base_pathname(std::move(std::string(path)));
898 url.clear_pathname();