summaryrefslogtreecommitdiff
path: root/chromium/url/url_canon_relative.cc
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2013-12-11 21:33:03 +0100
committerAndras Becsi <andras.becsi@digia.com>2013-12-13 12:34:07 +0100
commitf2a33ff9cbc6d19943f1c7fbddd1f23d23975577 (patch)
tree0586a32aa390ade8557dfd6b4897f43a07449578 /chromium/url/url_canon_relative.cc
parent5362912cdb5eea702b68ebe23702468d17c3017a (diff)
downloadqtwebengine-chromium-f2a33ff9cbc6d19943f1c7fbddd1f23d23975577.tar.gz
Update Chromium to branch 1650 (31.0.1650.63)
Change-Id: I57d8c832eaec1eb2364e0a8e7352a6dd354db99f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'chromium/url/url_canon_relative.cc')
-rw-r--r--chromium/url/url_canon_relative.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/chromium/url/url_canon_relative.cc b/chromium/url/url_canon_relative.cc
index 84317f80094..4edd6cedd68 100644
--- a/chromium/url/url_canon_relative.cc
+++ b/chromium/url/url_canon_relative.cc
@@ -475,11 +475,14 @@ bool DoResolveRelativeURL(const char* base_url,
#else
// Other platforms need explicit handling for file: URLs with multiple
// slashes because the generic scheme parsing always extracts a host, but a
- // file: URL only has a host if it has exactly 2 slashes. This also
- // handles the special case where the URL is only slashes, since that
- // doesn't have a host part either.
+ // file: URL only has a host if it has exactly 2 slashes. Even if it does
+ // have a host, we want to use the special host detection logic for file
+ // URLs provided by DoResolveAbsoluteFile(), as opposed to the generic host
+ // detection logic, for consistency with parsing file URLs from scratch.
+ // This also handles the special case where the URL is only slashes,
+ // since that doesn't have a host part either.
if (base_is_file &&
- (num_slashes > 2 || num_slashes == relative_component.len)) {
+ (num_slashes >= 2 || num_slashes == relative_component.len)) {
return DoResolveAbsoluteFile(relative_url, relative_component,
query_converter, output, out_parsed);
}