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

Unified Diff: net/http/http_util_icu.cc

Issue 68213017: Fix HTTP protocol scheme debugging checks for WebSockets (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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 | « net/http/http_auth_cache.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_util_icu.cc
diff --git a/net/http/http_util_icu.cc b/net/http/http_util_icu.cc
index 4f38f84d75bac2bc52f005885f454a69ab5b1b2e..00726ef9bc2a82b001cc4a136166aedb403f92e3 100644
--- a/net/http/http_util_icu.cc
+++ b/net/http/http_util_icu.cc
@@ -14,7 +14,8 @@ namespace net {
// static
std::string HttpUtil::PathForRequest(const GURL& url) {
- DCHECK(url.is_valid() && url.SchemeIsHTTPOrHTTPS());
+ DCHECK(url.is_valid() && (url.SchemeIsHTTPOrHTTPS() ||
+ url.SchemeIs("ws") || url.SchemeIs("wss")));
tyoshino (SeeGerritForStatus) 2013/11/15 04:17:16 how about a static method for url.SchemeIs("ws") |
if (url.has_query())
return url.path() + "?" + url.query();
return url.path();
@@ -23,8 +24,8 @@ std::string HttpUtil::PathForRequest(const GURL& url) {
// static
std::string HttpUtil::SpecForRequest(const GURL& url) {
// We may get ftp scheme when fetching ftp resources through proxy.
- DCHECK(url.is_valid() && (url.SchemeIsHTTPOrHTTPS() ||
- url.SchemeIs("ftp")));
+ DCHECK(url.is_valid() && (url.SchemeIsHTTPOrHTTPS() || url.SchemeIs("ftp") ||
+ url.SchemeIs("ws") || url.SchemeIs("wss")));
return SimplifyUrlForRequest(url).spec();
}
« no previous file with comments | « net/http/http_auth_cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698