OLD | NEW |
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 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 true /* is a proxy server */); | 810 true /* is a proxy server */); |
811 // Disable revocation checking for HTTPS proxies since the revocation | 811 // Disable revocation checking for HTTPS proxies since the revocation |
812 // requests are probably going to need to go through the proxy too. | 812 // requests are probably going to need to go through the proxy too. |
813 proxy_ssl_config_.rev_checking_enabled = false; | 813 proxy_ssl_config_.rev_checking_enabled = false; |
814 } | 814 } |
815 if (using_ssl_) { | 815 if (using_ssl_) { |
816 InitSSLConfig(origin_, &server_ssl_config_, | 816 InitSSLConfig(origin_, &server_ssl_config_, |
817 false /* not a proxy server */); | 817 false /* not a proxy server */); |
818 } | 818 } |
819 | 819 |
| 820 base::WeakPtr<HttpServerProperties> http_server_properties = |
| 821 session_->http_server_properties(); |
| 822 if (http_server_properties) { |
| 823 http_server_properties->MaybeForceHTTP11(origin_, &server_ssl_config_); |
| 824 if (proxy_info_.is_http() || proxy_info_.is_https()) { |
| 825 http_server_properties->MaybeForceHTTP11( |
| 826 proxy_info_.proxy_server().host_port_pair(), &proxy_ssl_config_); |
| 827 } |
| 828 } |
| 829 |
820 if (IsPreconnecting()) { | 830 if (IsPreconnecting()) { |
821 DCHECK(!stream_factory_->for_websockets_); | 831 DCHECK(!stream_factory_->for_websockets_); |
822 return PreconnectSocketsForHttpRequest( | 832 return PreconnectSocketsForHttpRequest( |
823 origin_url_, | 833 origin_url_, |
824 request_info_.extra_headers, | 834 request_info_.extra_headers, |
825 request_info_.load_flags, | 835 request_info_.load_flags, |
826 priority_, | 836 priority_, |
827 session_, | 837 session_, |
828 proxy_info_, | 838 proxy_info_, |
829 ShouldForceSpdySSL(), | 839 ShouldForceSpdySSL(), |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1463 | 1473 |
1464 if (job_status_ == STATUS_SUCCEEDED && other_job_status_ == STATUS_BROKEN) { | 1474 if (job_status_ == STATUS_SUCCEEDED && other_job_status_ == STATUS_BROKEN) { |
1465 HistogramBrokenAlternateProtocolLocation( | 1475 HistogramBrokenAlternateProtocolLocation( |
1466 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN); | 1476 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN); |
1467 session_->http_server_properties()->SetBrokenAlternateProtocol( | 1477 session_->http_server_properties()->SetBrokenAlternateProtocol( |
1468 HostPortPair::FromURL(request_info_.url)); | 1478 HostPortPair::FromURL(request_info_.url)); |
1469 } | 1479 } |
1470 } | 1480 } |
1471 | 1481 |
1472 } // namespace net | 1482 } // namespace net |
OLD | NEW |