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

Unified Diff: third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp

Issue 2447293002: Don't call lower() on KURL protocol/host (Closed)
Patch Set: add canonicalization layout test Created 4 years, 2 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
Index: third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp
diff --git a/third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp b/third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp
index 812fc30e30b514a4a417bfda0d8d7f36cfe80fba..2fdb2f4ff729301da51be50e2d8b633ea40deb32 100644
--- a/third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp
@@ -69,7 +69,9 @@ bool isPortAllowedForScheme(const KURL& url) {
// through non-network schemes that don't go over the network.
if (!url.hasPort())
return true;
- String protocol = url.protocol().isNull() ? "" : url.protocol().lower();
+ String protocol = url.protocol();
+ if (protocol.isNull())
+ protocol = emptyString();
unsigned short effectivePort = url.port();
if (!effectivePort)
effectivePort = defaultPortForProtocol(protocol);

Powered by Google App Engine
This is Rietveld 408576698