Chromium Code Reviews| Index: url/url_canon_relative.cc |
| diff --git a/url/url_canon_relative.cc b/url/url_canon_relative.cc |
| index c2e94e418529dd6cde73f2c6a92c225405eb4150..e34ea2fa2495dc6acbb301644dca4b04b3738762 100644 |
| --- a/url/url_canon_relative.cc |
| +++ b/url/url_canon_relative.cc |
| @@ -75,6 +75,10 @@ bool DoIsRelativeURL(const char* base, |
| TrimURL(url, &begin, &url_len); |
| if (begin >= url_len) { |
| // Empty URLs are relative, but do nothing. |
| + if (!is_base_hierarchical) { |
|
brettw
2015/11/30 17:46:18
We should get a test for this case in url_canon_un
ramya.v
2015/12/01 07:37:03
Done.
|
| + // Don't allow relative URLs if the base scheme doesn't support it. |
| + return false; |
| + } |
| *relative_component = Component(begin, 0); |
| *is_relative = true; |
| return true; |