23 std::is_same<ada::url, result_type>::value;
25 std::is_same<ada::url_aggregator, result_type>::value;
39 if (
user_input.size() > std::numeric_limits<uint32_t>::max()) {
74 if (unicode::has_tabs_or_newline(
user_input)) {
78 helpers::remove_ascii_tab_or_newline(
tmp_buffer);
87 helpers::trim_c0_whitespace(
url_data);
135 ada_log(
"SCHEME the scheme should be ",
143 if (!
url.parse_scheme_with_colon(
198 ada_log(
"NO_SCHEME validation error");
207 ada_log(
"NO_SCHEME opaque base with fragment");
215 url.update_base_pathname(
base_url->get_pathname());
224 ada_log(
"NO_SCHEME non-file relative path");
229 ada_log(
"NO_SCHEME file base type");
263 : helpers::find_authority_delimiter(
view);
273 url.password +=
"%40";
275 url.append_base_password(
"%40");
279 url.username +=
"%40";
281 url.append_base_username(
"%40");
295 url.username += unicode::percent_encode(
298 url.append_base_username(unicode::percent_encode(
303 url.username += unicode::percent_encode(
306 url.password += unicode::percent_encode(
310 url.append_base_username(unicode::percent_encode(
313 url.append_base_password(unicode::percent_encode(
320 url.password += unicode::percent_encode(
323 url.append_base_password(unicode::percent_encode(
356 ada_log(
"SPECIAL_RELATIVE_OR_AUTHORITY ",
401 "RELATIVE_SCHEME if c is U+002F (/), then set state to relative "
409 "RELATIVE_SCHEME if url is special and c is U+005C, validation "
410 "error, set state to relative slash state");
413 ada_log(
"RELATIVE_SCHEME otherwise");
433 url.update_base_port(
base_url->retrieve_base_port());
436 url.update_base_pathname(
base_url->get_pathname());
454 helpers::shorten_path(
url.path,
url.type);
457 if (helpers::shorten_path(path,
url.type)) {
458 url.update_base_pathname(std::string(path));
503 url.update_base_port(
base_url->retrieve_base_port());
513 ada_log(
"SPECIAL_AUTHORITY_SLASHES ",
527 ada_log(
"SPECIAL_AUTHORITY_IGNORE_SLASHES ",
553 ada_log(
"QUERY update_base_search completed ");
602 url.update_base_hostname(
"");
621 if (
location != std::string_view::npos) {
631 url.update_base_pathname(unicode::percent_encode(
658 url.update_base_pathname(
"/");
707 helpers::parse_prepared_path(
view,
url.type,
url.path);
709 url.consume_prepared_path(
view);
721 ada_log(
"FILE_SLASH c is U+002F or U+005C");
726 ada_log(
"FILE_SLASH otherwise");
743 if (!
base_url->get_pathname().empty()) {
749 if (
loc != std::string_view::npos) {
758 url.append_base_pathname(
788 url.update_base_hostname(
"");
803 if (
url.host.has_value() &&
url.host.value() ==
"localhost") {
808 url.update_base_hostname(
"");
823 url.set_protocol_as_file();
828 url.update_base_hostname(
"");
834 ada_log(
"FILE c is U+002F or U+005C");
852 url.update_base_pathname(
base_url->get_pathname());
870 helpers::shorten_path(
url.path,
url.type);
873 if (helpers::shorten_path(path,
url.type)) {
874 url.update_base_pathname(std::string(path));
881 url.clear_pathname();