Chromium Code Reviews| Index: net/http/http_stream_factory_impl_job.cc |
| diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc |
| index 2cd3bcbe0b6c7cf73b0129896405537a9a92cfcb..382e79c9ed30b5f7c6d43c95b780cd3ab2d44527 100644 |
| --- a/net/http/http_stream_factory_impl_job.cc |
| +++ b/net/http/http_stream_factory_impl_job.cc |
| @@ -1164,8 +1164,17 @@ int HttpStreamFactoryImpl::Job::DoCreateStream() { |
| if (connection_->socket() && !connection_->is_reused()) |
| SetSocketMotivation(); |
| - if (!using_spdy_) { |
| + if (!using_spdy_) |
| DCHECK(!IsSpdyAlternative()); |
| + |
| + if (!using_spdy_ || |
| + // While websockets over HTTP/2 are not supported, it is still valid to |
|
Bence
2017/01/24 22:54:19
Please move this comment one line above (or below)
baranovich
2017/01/25 09:10:51
Done.
|
| + // have websockets tunneled through HTTP/2 proxy (via CONNECT). If |
| + // websockets are secure (wss://), ProxyClientSocket with established |
| + // tunnel is wrapped with yet another socket (SSLClientSocket), and |
| + // |using_spdy_| will be false, but for ws: scheme, ProxyClientSocket is |
| + // not wrapped into anything. |
| + (using_spdy_ && proxy_info_.is_https() && delegate_->for_websockets())) { |
| // We may get ftp scheme when fetching ftp resources through proxy. |
| bool using_proxy = (proxy_info_.is_http() || proxy_info_.is_https()) && |
| (request_info_.url.SchemeIs(url::kHttpScheme) || |