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

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: Created 6 years, 1 month 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') | url/url_util_unittest.cc » ('J')
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..49a20643b0ea1c91d64b5a0fcedc4cd5febba89d 100644
--- a/url/url_util.cc
+++ b/url/url_util.cc
@@ -245,8 +245,11 @@ bool DoResolveRelative(const char* base_spec,
// 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);
+ RawCanonOutputT<char> full_spec;
+ full_spec.Append(output->data(), output->length());
+ output->set_length(0);
+ DoCanonicalize(full_spec.data(), full_spec.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') | url/url_util_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698