| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - /* auto-generated on 2023-09-05 16:55:45 -0400. Do not edit! */ | ||
| 1 | + /* auto-generated on 2023-09-19 16:48:25 -0400. Do not edit! */ | ||
| 2 | 2 | /* begin file src/ada.cpp */ | |
| 3 | 3 | #include "ada.h" | |
| 4 | 4 | /* begin file src/checkers.cpp */ | |
@@ -11864,7 +11864,7 @@ bool url::set_host_or_hostname(const std::string_view input) { | |||
| 11864 | 11864 | } | |
| 11865 | 11865 | ||
| 11866 | 11866 | // Let host be the result of host parsing host_view with url is not special. | |
| 11867 | - if (host_view.empty()) { | ||
| 11867 | + if (host_view.empty() && !is_special()) { | ||
| 11868 | 11868 | host = ""; | |
| 11869 | 11869 | return true; | |
| 11870 | 11870 | } | |
@@ -13625,13 +13625,12 @@ bool url_aggregator::set_host_or_hostname(const std::string_view input) { | |||
| 13625 | 13625 | // empty string, and either url includes credentials or url's port is | |
| 13626 | 13626 | // non-null, return. | |
| 13627 | 13627 | else if (host_view.empty() && | |
| 13628 | - (is_special() || has_credentials() || | ||
| 13629 | - components.port != url_components::omitted)) { | ||
| 13628 | + (is_special() || has_credentials() || has_port())) { | ||
| 13630 | 13629 | return false; | |
| 13631 | 13630 | } | |
| 13632 | 13631 | ||
| 13633 | 13632 | // Let host be the result of host parsing host_view with url is not special. | |
| 13634 | - if (host_view.empty()) { | ||
| 13633 | + if (host_view.empty() && !is_special()) { | ||
| 13635 | 13634 | if (has_hostname()) { | |
| 13636 | 13635 | clear_hostname(); // easy! | |
| 13637 | 13636 | } else if (has_dash_dot()) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - /* auto-generated on 2023-09-05 16:55:45 -0400. Do not edit! */ | ||
| 1 | + /* auto-generated on 2023-09-19 16:48:25 -0400. Do not edit! */ | ||
| 2 | 2 | /* begin file include/ada.h */ | |
| 3 | 3 | /** | |
| 4 | 4 | * @file ada.h | |
@@ -1055,9 +1055,10 @@ inline constexpr bool is_normalized_windows_drive_letter( | |||
| 1055 | 1055 | return input.size() >= 2 && (is_alpha(input[0]) && (input[1] == ':')); | |
| 1056 | 1056 | } | |
| 1057 | 1057 | ||
| 1058 | - ada_really_inline constexpr bool begins_with(std::string_view view, | ||
| 1059 | - std::string_view prefix) { | ||
| 1058 | + ada_really_inline bool begins_with(std::string_view view, | ||
| 1059 | + std::string_view prefix) { | ||
| 1060 | 1060 | // in C++20, you have view.begins_with(prefix) | |
| 1061 | + // std::equal is constexpr in C++20 | ||
| 1061 | 1062 | return view.size() >= prefix.size() && | |
| 1062 | 1063 | std::equal(prefix.begin(), prefix.end(), view.begin()); | |
| 1063 | 1064 | } | |
@@ -5020,10 +5021,10 @@ inline constexpr bool is_normalized_windows_drive_letter( | |||
| 5020 | 5021 | std::string_view input) noexcept; | |
| 5021 | 5022 | ||
| 5022 | 5023 | /** | |
| 5023 | - * @warning Will be removed when Ada supports C++20. | ||
| 5024 | + * @warning Will be removed when Ada requires C++20. | ||
| 5024 | 5025 | */ | |
| 5025 | - ada_really_inline constexpr bool begins_with(std::string_view view, | ||
| 5026 | - std::string_view prefix); | ||
| 5026 | + ada_really_inline bool begins_with(std::string_view view, | ||
| 5027 | + std::string_view prefix); | ||
| 5027 | 5028 | ||
| 5028 | 5029 | /** | |
| 5029 | 5030 | * Returns true if an input is an ipv4 address. | |
@@ -6557,7 +6558,9 @@ inline bool url_aggregator::has_hostname() const noexcept { | |||
| 6557 | 6558 | ||
| 6558 | 6559 | inline bool url_aggregator::has_port() const noexcept { | |
| 6559 | 6560 | ada_log("url_aggregator::has_port"); | |
| 6560 | - return components.pathname_start != components.host_end; | ||
| 6561 | + // A URL cannot have a username/password/port if its host is null or the empty | ||
| 6562 | + // string, or its scheme is "file". | ||
| 6563 | + return has_hostname() && components.pathname_start != components.host_end; | ||
| 6561 | 6564 | } | |
| 6562 | 6565 | ||
| 6563 | 6566 | inline bool url_aggregator::has_dash_dot() const noexcept { | |
@@ -6926,14 +6929,14 @@ inline void url_search_params::sort() { | |||
| 6926 | 6929 | #ifndef ADA_ADA_VERSION_H | |
| 6927 | 6930 | #define ADA_ADA_VERSION_H | |
| 6928 | 6931 | ||
| 6929 | - #define ADA_VERSION "2.6.7" | ||
| 6932 | + #define ADA_VERSION "2.6.8" | ||
| 6930 | 6933 | ||
| 6931 | 6934 | namespace ada { | |
| 6932 | 6935 | ||
| 6933 | 6936 | enum { | |
| 6934 | 6937 | ADA_VERSION_MAJOR = 2, | |
| 6935 | 6938 | ADA_VERSION_MINOR = 6, | |
| 6936 | - ADA_VERSION_REVISION = 7, | ||
| 6939 | + ADA_VERSION_REVISION = 8, | ||
| 6937 | 6940 | }; | |
| 6938 | 6941 | ||
| 6939 | 6942 | } // namespace ada | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,7 +9,7 @@ All dependencies are located within the `deps` directory. | |||
| 9 | 9 | This a list of all the dependencies: | |
| 10 | 10 | ||
| 11 | 11 | * [acorn][] | |
| 12 | - * [ada 2.6.7][] | ||
| 12 | + * [ada 2.6.8][] | ||
| 13 | 13 | * [base64][] | |
| 14 | 14 | * [brotli][] | |
| 15 | 15 | * [c-ares][] | |
@@ -148,7 +148,7 @@ The [acorn](https://github.com/acornjs/acorn) dependency is a JavaScript parser. | |||
| 148 | 148 | [acorn-walk](https://github.com/acornjs/acorn/tree/master/acorn-walk) is | |
| 149 | 149 | an abstract syntax tree walker for the ESTree format. | |
| 150 | 150 | ||
| 151 | - ### ada 2.6.7 | ||
| 151 | + ### ada 2.6.8 | ||
| 152 | 152 | ||
| 153 | 153 | The [ada](https://github.com/ada-url/ada) dependency is a | |
| 154 | 154 | fast and spec-compliant URL parser written in C++. | |
@@ -312,7 +312,7 @@ it comes from the Chromium team's zlib fork which incorporated | |||
| 312 | 312 | performance improvements not currently available in standard zlib. | |
| 313 | 313 | ||
| 314 | 314 | [acorn]: #acorn | |
| 315 | - [ada 2.6.7]: #ada-267 | ||
| 315 | + [ada 2.6.8]: #ada-268 | ||
| 316 | 316 | [base64]: #base64 | |
| 317 | 317 | [brotli]: #brotli | |
| 318 | 318 | [c-ares]: #c-ares | |
| Back | FazBrowse Home | New Git URL |
0 commit comments