Index: src/url_canon_stdurl.cc |
=================================================================== |
--- src/url_canon_stdurl.cc (revision 107) |
+++ src/url_canon_stdurl.cc (working copy) |
@@ -66,10 +66,13 @@ |
&new_parsed->username, |
&new_parsed->password); |
- // Host: always write if we have an authority (may be empty). |
success &= CanonicalizeHost(source.host, parsed.host, |
output, &new_parsed->host); |
+ // Host must not be empty for standard URLs. |
+ if (!parsed.host.is_nonempty()) |
+ success = false; |
+ |
// Port: the port canonicalizer will handle the colon. |
int default_port = DefaultPortForScheme( |
&output->data()[new_parsed->scheme.begin], new_parsed->scheme.len); |