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

Side by Side Diff: net/http/http_stream_factory_impl_job.cc

Issue 2299703003: Re-land: Only allow HTTP/0.9 support on default ports. (Closed)
Patch Set: Fix test Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_stream_factory_impl_job.h" 5 #include "net/http/http_stream_factory_impl_job.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1183 bool using_proxy = (proxy_info_.is_http() || proxy_info_.is_https()) && 1183 bool using_proxy = (proxy_info_.is_http() || proxy_info_.is_https()) &&
1184 (request_info_.url.SchemeIs("http") || 1184 (request_info_.url.SchemeIs("http") ||
1185 request_info_.url.SchemeIs("ftp")); 1185 request_info_.url.SchemeIs("ftp"));
1186 if (delegate_->for_websockets()) { 1186 if (delegate_->for_websockets()) {
1187 DCHECK_NE(job_type_, PRECONNECT); 1187 DCHECK_NE(job_type_, PRECONNECT);
1188 DCHECK(delegate_->websocket_handshake_stream_create_helper()); 1188 DCHECK(delegate_->websocket_handshake_stream_create_helper());
1189 websocket_stream_.reset( 1189 websocket_stream_.reset(
1190 delegate_->websocket_handshake_stream_create_helper() 1190 delegate_->websocket_handshake_stream_create_helper()
1191 ->CreateBasicStream(std::move(connection_), using_proxy)); 1191 ->CreateBasicStream(std::move(connection_), using_proxy));
1192 } else { 1192 } else {
1193 stream_.reset(new HttpBasicStream(std::move(connection_), using_proxy)); 1193 stream_.reset(new HttpBasicStream(
1194 std::move(connection_), using_proxy,
1195 session_->params().http_09_on_non_default_ports_enabled));
1194 } 1196 }
1195 return OK; 1197 return OK;
1196 } 1198 }
1197 1199
1198 CHECK(!stream_.get()); 1200 CHECK(!stream_.get());
1199 1201
1200 bool direct = !IsHttpsProxyAndHttpUrl(); 1202 bool direct = !IsHttpsProxyAndHttpUrl();
1201 if (existing_spdy_session_.get()) { 1203 if (existing_spdy_session_.get()) {
1202 // We picked up an existing session, so we don't need our socket. 1204 // We picked up an existing session, so we don't need our socket.
1203 if (connection_->socket()) 1205 if (connection_->socket())
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1624 1626
1625 ConnectionAttempts socket_attempts = connection_->connection_attempts(); 1627 ConnectionAttempts socket_attempts = connection_->connection_attempts();
1626 if (connection_->socket()) { 1628 if (connection_->socket()) {
1627 connection_->socket()->GetConnectionAttempts(&socket_attempts); 1629 connection_->socket()->GetConnectionAttempts(&socket_attempts);
1628 } 1630 }
1629 1631
1630 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); 1632 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts);
1631 } 1633 }
1632 1634
1633 } // namespace net 1635 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_stream_factory_impl_job_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698