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

Unified Diff: url/url_canon_relative.cc

Issue 2890143002: Set 'whitespace_removed' correctly when resolving relative URLs. (Closed)
Patch Set: Test. Created 3 years, 7 months 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 | « third_party/WebKit/Source/platform/weborigin/KURLTest.cpp ('k') | 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_canon_relative.cc
diff --git a/url/url_canon_relative.cc b/url/url_canon_relative.cc
index 851368d8d4847a10ccdd12fa6b807e70822326cb..2ee61db24b7dfd642b66eb5e230b264d0a138b82 100644
--- a/url/url_canon_relative.cc
+++ b/url/url_canon_relative.cc
@@ -441,8 +441,13 @@ bool DoResolveRelativeURL(const char* base_url,
CharsetConverter* query_converter,
CanonOutput* output,
Parsed* out_parsed) {
- // Starting point for our output parsed. We'll fix what we change.
+ // |base_parsed| is the starting point for our output. Since we may have
+ // removed whitespace from |relative_url| before entering this method, we'll
+ // carry over the |whitespace_removed| flag.
+ bool whitespace_removed = out_parsed->whitespace_removed;
*out_parsed = base_parsed;
+ if (whitespace_removed)
+ out_parsed->whitespace_removed = true;
// Sanity check: the input should have a host or we'll break badly below.
// We can only resolve relative URLs with base URLs that have hosts and
« no previous file with comments | « third_party/WebKit/Source/platform/weborigin/KURLTest.cpp ('k') | url/url_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698