Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Unified Diff: url/url_util.cc

Issue 767713002: DoResolveRelative must not parse mailto schemes as path URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Next attempt Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | url/url_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/url_util.cc
diff --git a/url/url_util.cc b/url/url_util.cc
index 8ab889feff4a5f181ffb65935be758a69605daf5..008a5e48b687dddb0d14f62743ba201763f3d97d 100644
--- a/url/url_util.cc
+++ b/url/url_util.cc
@@ -238,15 +238,16 @@ bool DoResolveRelative(const char* base_spec,
Parsed base_parsed_authority;
ParseStandardURL(base_spec, base_spec_len, &base_parsed_authority);
if (base_parsed_authority.host.is_nonempty()) {
+ RawCanonOutputT<char> temporary_output;
bool did_resolve_succeed =
ResolveRelativeURL(base_spec, base_parsed_authority, false, relative,
- relative_component, charset_converter, output,
- output_parsed);
+ relative_component, charset_converter,
+ &temporary_output, output_parsed);
// The output_parsed is incorrect at this point (because it was built
// based on base_parsed_authority instead of base_parsed) and needs to be
// re-created.
- ParsePathURL(output->data(), output->length(), true,
- output_parsed);
+ DoCanonicalize(temporary_output.data(), temporary_output.length(), true,
+ charset_converter, output, output_parsed);
return did_resolve_succeed;
}
} else if (is_relative) {
« no previous file with comments | « no previous file | url/url_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698