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

Unified Diff: components/cronet/android/java/src/org/chromium/net/HttpUrlRequestFactoryConfig.java

Issue 642913004: Throw IllegalArgumentException from addQuicHint if host is URL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add IsCanonicalizedHostCompliant check to Quic Hint parsing. Created 6 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
« no previous file with comments | « no previous file | components/cronet/android/test/javatests/src/org/chromium/cronet_test_apk/HttpUrlRequestFactoryTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/android/java/src/org/chromium/net/HttpUrlRequestFactoryConfig.java
diff --git a/components/cronet/android/java/src/org/chromium/net/HttpUrlRequestFactoryConfig.java b/components/cronet/android/java/src/org/chromium/net/HttpUrlRequestFactoryConfig.java
index 39c737aed740aa778f217bbb7b1cb2f3a82228d2..e3c510668d09cc8bcacc68cabc39a806a71f674d 100644
--- a/components/cronet/android/java/src/org/chromium/net/HttpUrlRequestFactoryConfig.java
+++ b/components/cronet/android/java/src/org/chromium/net/HttpUrlRequestFactoryConfig.java
@@ -111,6 +111,10 @@ public class HttpUrlRequestFactoryConfig {
public HttpUrlRequestFactoryConfig addQuicHint(String host,
int port,
int alternatePort) {
+ if (host.contains("/")) {
+ throw new IllegalArgumentException("Illegal QUIC Hint Host: " +
+ host);
+ }
try {
JSONArray quicHints = mConfig.optJSONArray(
UrlRequestContextConfig.QUIC_HINTS);
« no previous file with comments | « no previous file | components/cronet/android/test/javatests/src/org/chromium/cronet_test_apk/HttpUrlRequestFactoryTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698