diff options
author | Cronet Mainline Eng <cronet-mainline-eng+copybara@google.com> | 2024-06-01 00:34:53 +0900 |
---|---|---|
committer | Motomu Utsumi <motomuman@google.com> | 2024-06-01 01:09:19 +0900 |
commit | b66ce594f84a102bf71c3e2754d9c0bfdd620b85 (patch) | |
tree | f9fe122e9fb8b203a1cfc6955deb5e84ad4f341a /url/url_canon_internal.cc | |
parent | 168f7e285114554eb2ac9bc22343cca461355b50 (diff) | |
download | cronet-b66ce594f84a102bf71c3e2754d9c0bfdd620b85.tar.gz |
Import Cronet version 123.0.6312.40
FolderOrigin-RevId: /tmp/copybara-origin/src
Change-Id: Ie1ecf4a8ee6c6263302f0e88e86baa49a8052442
Diffstat (limited to 'url/url_canon_internal.cc')
-rw-r--r-- | url/url_canon_internal.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/url/url_canon_internal.cc b/url/url_canon_internal.cc index 5e1bcdd0e..f060d0683 100644 --- a/url/url_canon_internal.cc +++ b/url/url_canon_internal.cc @@ -19,6 +19,7 @@ #include "base/bits.h" #include "base/numerics/safe_conversions.h" #include "base/strings/utf_string_conversion_utils.h" +#include "url/url_features.h" namespace url { @@ -383,11 +384,15 @@ void SetupOverrideComponents(const char* base, DoOverrideComponent(repl_source.password, repl_parsed.password, &source->password, &parsed->password); - // Our host should be empty if not present, so override the default setup. DoOverrideComponent(repl_source.host, repl_parsed.host, &source->host, &parsed->host); - if (parsed->host.len == -1) - parsed->host.len = 0; + if (!url::IsUsingStandardCompliantNonSpecialSchemeURLParsing()) { + // For backward compatibility, the following is probably required while the + // flag is disabled by default. + if (parsed->host.len == -1) { + parsed->host.len = 0; + } + } DoOverrideComponent(repl_source.port, repl_parsed.port, &source->port, &parsed->port); |