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_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/base64url.h" | |
11 #include "base/bind.h" | 12 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 13 #include "base/bind_helpers.h" |
13 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
14 #include "base/format_macros.h" | 15 #include "base/format_macros.h" |
15 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
16 #include "base/metrics/field_trial.h" | 17 #include "base/metrics/field_trial.h" |
17 #include "base/metrics/histogram_macros.h" | 18 #include "base/metrics/histogram_macros.h" |
18 #include "base/metrics/sparse_histogram.h" | 19 #include "base/metrics/sparse_histogram.h" |
19 #include "base/profiler/scoped_tracker.h" | 20 #include "base/profiler/scoped_tracker.h" |
20 #include "base/stl_util.h" | 21 #include "base/stl_util.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 #include "net/socket/socks_client_socket_pool.h" | 56 #include "net/socket/socks_client_socket_pool.h" |
56 #include "net/socket/ssl_client_socket.h" | 57 #include "net/socket/ssl_client_socket.h" |
57 #include "net/socket/ssl_client_socket_pool.h" | 58 #include "net/socket/ssl_client_socket_pool.h" |
58 #include "net/socket/transport_client_socket_pool.h" | 59 #include "net/socket/transport_client_socket_pool.h" |
59 #include "net/spdy/spdy_http_stream.h" | 60 #include "net/spdy/spdy_http_stream.h" |
60 #include "net/spdy/spdy_session.h" | 61 #include "net/spdy/spdy_session.h" |
61 #include "net/spdy/spdy_session_pool.h" | 62 #include "net/spdy/spdy_session_pool.h" |
62 #include "net/ssl/ssl_cert_request_info.h" | 63 #include "net/ssl/ssl_cert_request_info.h" |
63 #include "net/ssl/ssl_connection_status_flags.h" | 64 #include "net/ssl/ssl_connection_status_flags.h" |
64 #include "net/ssl/ssl_private_key.h" | 65 #include "net/ssl/ssl_private_key.h" |
66 #include "net/ssl/token_binding.h" | |
65 #include "url/gurl.h" | 67 #include "url/gurl.h" |
66 #include "url/url_canon.h" | 68 #include "url/url_canon.h" |
67 | 69 |
68 namespace net { | 70 namespace net { |
69 | 71 |
70 namespace { | 72 namespace { |
71 | 73 |
72 void ProcessAlternativeServices(HttpNetworkSession* session, | 74 void ProcessAlternativeServices(HttpNetworkSession* session, |
73 const HttpResponseHeaders& headers, | 75 const HttpResponseHeaders& headers, |
74 const HostPortPair& http_host_port_pair) { | 76 const HostPortPair& http_host_port_pair) { |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
194 proxy_ssl_config_.rev_checking_enabled = false; | 196 proxy_ssl_config_.rev_checking_enabled = false; |
195 } | 197 } |
196 | 198 |
197 if (request_->load_flags & LOAD_PREFETCH) | 199 if (request_->load_flags & LOAD_PREFETCH) |
198 response_.unused_since_prefetch = true; | 200 response_.unused_since_prefetch = true; |
199 | 201 |
200 // Channel ID is disabled if privacy mode is enabled for this request. | 202 // Channel ID is disabled if privacy mode is enabled for this request. |
201 if (request_->privacy_mode == PRIVACY_MODE_ENABLED) | 203 if (request_->privacy_mode == PRIVACY_MODE_ENABLED) |
202 server_ssl_config_.channel_id_enabled = false; | 204 server_ssl_config_.channel_id_enabled = false; |
203 | 205 |
206 if (session_->params().enable_token_binding && | |
207 session_->params().channel_id_service) { | |
208 server_ssl_config_.token_binding_params.push_back(TB_PARAM_ECDSAP256); | |
209 } | |
210 | |
204 next_state_ = STATE_NOTIFY_BEFORE_CREATE_STREAM; | 211 next_state_ = STATE_NOTIFY_BEFORE_CREATE_STREAM; |
205 int rv = DoLoop(OK); | 212 int rv = DoLoop(OK); |
206 if (rv == ERR_IO_PENDING) | 213 if (rv == ERR_IO_PENDING) |
207 callback_ = callback; | 214 callback_ = callback; |
208 return rv; | 215 return rv; |
209 } | 216 } |
210 | 217 |
211 int HttpNetworkTransaction::RestartIgnoringLastError( | 218 int HttpNetworkTransaction::RestartIgnoringLastError( |
212 const CompletionCallback& callback) { | 219 const CompletionCallback& callback) { |
213 DCHECK(!stream_.get()); | 220 DCHECK(!stream_.get()); |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
632 | 639 |
633 void HttpNetworkTransaction::GetConnectionAttempts( | 640 void HttpNetworkTransaction::GetConnectionAttempts( |
634 ConnectionAttempts* out) const { | 641 ConnectionAttempts* out) const { |
635 *out = connection_attempts_; | 642 *out = connection_attempts_; |
636 } | 643 } |
637 | 644 |
638 bool HttpNetworkTransaction::IsSecureRequest() const { | 645 bool HttpNetworkTransaction::IsSecureRequest() const { |
639 return request_->url.SchemeIsCryptographic(); | 646 return request_->url.SchemeIsCryptographic(); |
640 } | 647 } |
641 | 648 |
649 bool HttpNetworkTransaction::IsTokenBindingEnabled() const { | |
650 if (!IsSecureRequest()) | |
651 return false; | |
652 SSLInfo ssl_info; | |
653 stream_->GetSSLInfo(&ssl_info); | |
654 return ssl_info.token_binding_negotiated && | |
655 ssl_info.token_binding_key_param == TB_PARAM_ECDSAP256 && | |
656 session_->params().channel_id_service; | |
657 } | |
658 | |
659 void HttpNetworkTransaction::RecordTokenBindingSupport() const { | |
660 enum { | |
Mark P
2016/01/23 05:01:49
Please put the standard comment here that this enu
nharper
2016/01/25 18:54:54
Done.
| |
661 DISABLED = 0, | |
662 CLIENT_ONLY = 1, | |
663 CLIENT_AND_SERVER = 2, | |
664 CLIENT_NO_CHANNEL_ID_SERVICE = 3, | |
665 TOKEN_BINDING_SUPPORT_MAX | |
666 } supported; | |
667 if (!IsSecureRequest()) | |
668 return; | |
669 SSLInfo ssl_info; | |
670 stream_->GetSSLInfo(&ssl_info); | |
671 if (!session_->params().enable_token_binding) { | |
672 supported = DISABLED; | |
673 } else if (!session_->params().channel_id_service) { | |
674 supported = CLIENT_NO_CHANNEL_ID_SERVICE; | |
675 } else if (ssl_info.token_binding_negotiated) { | |
676 supported = CLIENT_AND_SERVER; | |
677 } else { | |
678 supported = CLIENT_ONLY; | |
679 } | |
680 UMA_HISTOGRAM_ENUMERATION("Net.TokenBinding.Support", supported, | |
681 TOKEN_BINDING_SUPPORT_MAX); | |
682 } | |
683 | |
642 bool HttpNetworkTransaction::UsingHttpProxyWithoutTunnel() const { | 684 bool HttpNetworkTransaction::UsingHttpProxyWithoutTunnel() const { |
643 return (proxy_info_.is_http() || proxy_info_.is_https() || | 685 return (proxy_info_.is_http() || proxy_info_.is_https() || |
644 proxy_info_.is_quic()) && | 686 proxy_info_.is_quic()) && |
645 !(request_->url.SchemeIs("https") || request_->url.SchemeIsWSOrWSS()); | 687 !(request_->url.SchemeIs("https") || request_->url.SchemeIsWSOrWSS()); |
646 } | 688 } |
647 | 689 |
648 void HttpNetworkTransaction::DoCallback(int rv) { | 690 void HttpNetworkTransaction::DoCallback(int rv) { |
649 DCHECK_NE(rv, ERR_IO_PENDING); | 691 DCHECK_NE(rv, ERR_IO_PENDING); |
650 DCHECK(!callback_.is_null()); | 692 DCHECK(!callback_.is_null()); |
651 | 693 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
694 case STATE_GENERATE_PROXY_AUTH_TOKEN_COMPLETE: | 736 case STATE_GENERATE_PROXY_AUTH_TOKEN_COMPLETE: |
695 rv = DoGenerateProxyAuthTokenComplete(rv); | 737 rv = DoGenerateProxyAuthTokenComplete(rv); |
696 break; | 738 break; |
697 case STATE_GENERATE_SERVER_AUTH_TOKEN: | 739 case STATE_GENERATE_SERVER_AUTH_TOKEN: |
698 DCHECK_EQ(OK, rv); | 740 DCHECK_EQ(OK, rv); |
699 rv = DoGenerateServerAuthToken(); | 741 rv = DoGenerateServerAuthToken(); |
700 break; | 742 break; |
701 case STATE_GENERATE_SERVER_AUTH_TOKEN_COMPLETE: | 743 case STATE_GENERATE_SERVER_AUTH_TOKEN_COMPLETE: |
702 rv = DoGenerateServerAuthTokenComplete(rv); | 744 rv = DoGenerateServerAuthTokenComplete(rv); |
703 break; | 745 break; |
746 case STATE_GET_TOKEN_BINDING_KEY: | |
747 DCHECK_EQ(OK, rv); | |
748 rv = DoGetTokenBindingKey(); | |
749 break; | |
750 case STATE_GET_TOKEN_BINDING_KEY_COMPLETE: | |
751 rv = DoGetTokenBindingKeyComplete(rv); | |
752 break; | |
704 case STATE_INIT_REQUEST_BODY: | 753 case STATE_INIT_REQUEST_BODY: |
705 DCHECK_EQ(OK, rv); | 754 DCHECK_EQ(OK, rv); |
706 rv = DoInitRequestBody(); | 755 rv = DoInitRequestBody(); |
707 break; | 756 break; |
708 case STATE_INIT_REQUEST_BODY_COMPLETE: | 757 case STATE_INIT_REQUEST_BODY_COMPLETE: |
709 rv = DoInitRequestBodyComplete(rv); | 758 rv = DoInitRequestBodyComplete(rv); |
710 break; | 759 break; |
711 case STATE_BUILD_REQUEST: | 760 case STATE_BUILD_REQUEST: |
712 DCHECK_EQ(OK, rv); | 761 DCHECK_EQ(OK, rv); |
713 net_log_.BeginEvent(NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST); | 762 net_log_.BeginEvent(NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
909 if (!ShouldApplyServerAuth()) | 958 if (!ShouldApplyServerAuth()) |
910 return OK; | 959 return OK; |
911 return auth_controllers_[target]->MaybeGenerateAuthToken(request_, | 960 return auth_controllers_[target]->MaybeGenerateAuthToken(request_, |
912 io_callback_, | 961 io_callback_, |
913 net_log_); | 962 net_log_); |
914 } | 963 } |
915 | 964 |
916 int HttpNetworkTransaction::DoGenerateServerAuthTokenComplete(int rv) { | 965 int HttpNetworkTransaction::DoGenerateServerAuthTokenComplete(int rv) { |
917 DCHECK_NE(ERR_IO_PENDING, rv); | 966 DCHECK_NE(ERR_IO_PENDING, rv); |
918 if (rv == OK) | 967 if (rv == OK) |
919 next_state_ = STATE_INIT_REQUEST_BODY; | 968 next_state_ = STATE_GET_TOKEN_BINDING_KEY; |
920 return rv; | 969 return rv; |
921 } | 970 } |
922 | 971 |
923 void HttpNetworkTransaction::BuildRequestHeaders( | 972 int HttpNetworkTransaction::DoGetTokenBindingKey() { |
973 next_state_ = STATE_GET_TOKEN_BINDING_KEY_COMPLETE; | |
974 if (!IsTokenBindingEnabled()) | |
975 return OK; | |
976 | |
977 net_log_.BeginEvent(NetLog::TYPE_HTTP_TRANSACTION_GET_TOKEN_BINDING_KEY); | |
978 ChannelIDService* channel_id_service = session_->params().channel_id_service; | |
979 return channel_id_service->GetOrCreateChannelID( | |
980 request_->url.host(), &token_binding_key_, io_callback_, | |
981 &token_binding_request_); | |
982 } | |
983 | |
984 int HttpNetworkTransaction::DoGetTokenBindingKeyComplete(int rv) { | |
985 DCHECK_NE(ERR_IO_PENDING, rv); | |
986 next_state_ = STATE_INIT_REQUEST_BODY; | |
987 if (!IsTokenBindingEnabled()) | |
988 return OK; | |
989 | |
990 net_log_.EndEventWithNetErrorCode( | |
991 NetLog::TYPE_HTTP_TRANSACTION_GET_TOKEN_BINDING_KEY, rv); | |
992 return rv; | |
993 } | |
994 | |
995 int HttpNetworkTransaction::BuildRequestHeaders( | |
924 bool using_http_proxy_without_tunnel) { | 996 bool using_http_proxy_without_tunnel) { |
925 request_headers_.SetHeader(HttpRequestHeaders::kHost, | 997 request_headers_.SetHeader(HttpRequestHeaders::kHost, |
926 GetHostAndOptionalPort(request_->url)); | 998 GetHostAndOptionalPort(request_->url)); |
927 | 999 |
928 // For compat with HTTP/1.0 servers and proxies: | 1000 // For compat with HTTP/1.0 servers and proxies: |
929 if (using_http_proxy_without_tunnel) { | 1001 if (using_http_proxy_without_tunnel) { |
930 request_headers_.SetHeader(HttpRequestHeaders::kProxyConnection, | 1002 request_headers_.SetHeader(HttpRequestHeaders::kProxyConnection, |
931 "keep-alive"); | 1003 "keep-alive"); |
932 } else { | 1004 } else { |
933 request_headers_.SetHeader(HttpRequestHeaders::kConnection, "keep-alive"); | 1005 request_headers_.SetHeader(HttpRequestHeaders::kConnection, "keep-alive"); |
(...skipping 12 matching lines...) Expand all Loading... | |
946 } else if (request_->method == "POST" || request_->method == "PUT") { | 1018 } else if (request_->method == "POST" || request_->method == "PUT") { |
947 // An empty POST/PUT request still needs a content length. As for HEAD, | 1019 // An empty POST/PUT request still needs a content length. As for HEAD, |
948 // IE and Safari also add a content length header. Presumably it is to | 1020 // IE and Safari also add a content length header. Presumably it is to |
949 // support sending a HEAD request to an URL that only expects to be sent a | 1021 // support sending a HEAD request to an URL that only expects to be sent a |
950 // POST or some other method that normally would have a message body. | 1022 // POST or some other method that normally would have a message body. |
951 // Firefox (40.0) does not send the header, and RFC 7230 & 7231 | 1023 // Firefox (40.0) does not send the header, and RFC 7230 & 7231 |
952 // specify that it should not be sent due to undefined behavior. | 1024 // specify that it should not be sent due to undefined behavior. |
953 request_headers_.SetHeader(HttpRequestHeaders::kContentLength, "0"); | 1025 request_headers_.SetHeader(HttpRequestHeaders::kContentLength, "0"); |
954 } | 1026 } |
955 | 1027 |
1028 RecordTokenBindingSupport(); | |
1029 if (token_binding_key_) { | |
1030 std::string token_binding_header; | |
1031 int rv = BuildTokenBindingHeader(&token_binding_header); | |
1032 if (rv != OK) | |
1033 return rv; | |
1034 request_headers_.SetHeader(HttpRequestHeaders::kTokenBinding, | |
1035 token_binding_header); | |
1036 } | |
1037 | |
956 // Honor load flags that impact proxy caches. | 1038 // Honor load flags that impact proxy caches. |
957 if (request_->load_flags & LOAD_BYPASS_CACHE) { | 1039 if (request_->load_flags & LOAD_BYPASS_CACHE) { |
958 request_headers_.SetHeader(HttpRequestHeaders::kPragma, "no-cache"); | 1040 request_headers_.SetHeader(HttpRequestHeaders::kPragma, "no-cache"); |
959 request_headers_.SetHeader(HttpRequestHeaders::kCacheControl, "no-cache"); | 1041 request_headers_.SetHeader(HttpRequestHeaders::kCacheControl, "no-cache"); |
960 } else if (request_->load_flags & LOAD_VALIDATE_CACHE) { | 1042 } else if (request_->load_flags & LOAD_VALIDATE_CACHE) { |
961 request_headers_.SetHeader(HttpRequestHeaders::kCacheControl, "max-age=0"); | 1043 request_headers_.SetHeader(HttpRequestHeaders::kCacheControl, "max-age=0"); |
962 } | 1044 } |
963 | 1045 |
964 if (ShouldApplyProxyAuth() && HaveAuth(HttpAuth::AUTH_PROXY)) | 1046 if (ShouldApplyProxyAuth() && HaveAuth(HttpAuth::AUTH_PROXY)) |
965 auth_controllers_[HttpAuth::AUTH_PROXY]->AddAuthorizationHeader( | 1047 auth_controllers_[HttpAuth::AUTH_PROXY]->AddAuthorizationHeader( |
966 &request_headers_); | 1048 &request_headers_); |
967 if (ShouldApplyServerAuth() && HaveAuth(HttpAuth::AUTH_SERVER)) | 1049 if (ShouldApplyServerAuth() && HaveAuth(HttpAuth::AUTH_SERVER)) |
968 auth_controllers_[HttpAuth::AUTH_SERVER]->AddAuthorizationHeader( | 1050 auth_controllers_[HttpAuth::AUTH_SERVER]->AddAuthorizationHeader( |
969 &request_headers_); | 1051 &request_headers_); |
970 | 1052 |
971 request_headers_.MergeFrom(request_->extra_headers); | 1053 request_headers_.MergeFrom(request_->extra_headers); |
972 | 1054 |
973 if (using_http_proxy_without_tunnel && | 1055 if (using_http_proxy_without_tunnel && |
974 !before_proxy_headers_sent_callback_.is_null()) | 1056 !before_proxy_headers_sent_callback_.is_null()) |
975 before_proxy_headers_sent_callback_.Run(proxy_info_, &request_headers_); | 1057 before_proxy_headers_sent_callback_.Run(proxy_info_, &request_headers_); |
976 | 1058 |
977 response_.did_use_http_auth = | 1059 response_.did_use_http_auth = |
978 request_headers_.HasHeader(HttpRequestHeaders::kAuthorization) || | 1060 request_headers_.HasHeader(HttpRequestHeaders::kAuthorization) || |
979 request_headers_.HasHeader(HttpRequestHeaders::kProxyAuthorization); | 1061 request_headers_.HasHeader(HttpRequestHeaders::kProxyAuthorization); |
1062 return OK; | |
1063 } | |
1064 | |
1065 int HttpNetworkTransaction::BuildTokenBindingHeader(std::string* out) { | |
1066 std::vector<uint8_t> signed_ekm; | |
1067 int rv = stream_->GetSignedEKMForTokenBinding(token_binding_key_.get(), | |
1068 &signed_ekm); | |
1069 if (rv != OK) | |
1070 return rv; | |
1071 std::string provided_token_binding; | |
1072 rv = BuildProvidedTokenBinding(token_binding_key_.get(), signed_ekm, | |
1073 &provided_token_binding); | |
1074 if (rv != OK) | |
1075 return rv; | |
1076 std::vector<base::StringPiece> token_bindings; | |
1077 token_bindings.push_back(provided_token_binding); | |
1078 std::string header; | |
1079 rv = BuildTokenBindingMessageFromTokenBindings(token_bindings, &header); | |
1080 if (rv != OK) | |
1081 return rv; | |
1082 base::Base64UrlEncode(header, base::Base64UrlEncodePolicy::INCLUDE_PADDING, | |
1083 out); | |
1084 return OK; | |
980 } | 1085 } |
981 | 1086 |
982 int HttpNetworkTransaction::DoInitRequestBody() { | 1087 int HttpNetworkTransaction::DoInitRequestBody() { |
983 next_state_ = STATE_INIT_REQUEST_BODY_COMPLETE; | 1088 next_state_ = STATE_INIT_REQUEST_BODY_COMPLETE; |
984 int rv = OK; | 1089 int rv = OK; |
985 if (request_->upload_data_stream) | 1090 if (request_->upload_data_stream) |
986 rv = request_->upload_data_stream->Init(io_callback_); | 1091 rv = request_->upload_data_stream->Init(io_callback_); |
987 return rv; | 1092 return rv; |
988 } | 1093 } |
989 | 1094 |
990 int HttpNetworkTransaction::DoInitRequestBodyComplete(int result) { | 1095 int HttpNetworkTransaction::DoInitRequestBodyComplete(int result) { |
991 if (result == OK) | 1096 if (result == OK) |
992 next_state_ = STATE_BUILD_REQUEST; | 1097 next_state_ = STATE_BUILD_REQUEST; |
993 return result; | 1098 return result; |
994 } | 1099 } |
995 | 1100 |
996 int HttpNetworkTransaction::DoBuildRequest() { | 1101 int HttpNetworkTransaction::DoBuildRequest() { |
997 next_state_ = STATE_BUILD_REQUEST_COMPLETE; | 1102 next_state_ = STATE_BUILD_REQUEST_COMPLETE; |
998 headers_valid_ = false; | 1103 headers_valid_ = false; |
999 | 1104 |
1000 // This is constructed lazily (instead of within our Start method), so that | 1105 // This is constructed lazily (instead of within our Start method), so that |
1001 // we have proxy info available. | 1106 // we have proxy info available. |
1002 if (request_headers_.IsEmpty()) { | 1107 if (request_headers_.IsEmpty()) { |
1003 bool using_http_proxy_without_tunnel = UsingHttpProxyWithoutTunnel(); | 1108 bool using_http_proxy_without_tunnel = UsingHttpProxyWithoutTunnel(); |
1004 BuildRequestHeaders(using_http_proxy_without_tunnel); | 1109 return BuildRequestHeaders(using_http_proxy_without_tunnel); |
1005 } | 1110 } |
1006 | 1111 |
1007 return OK; | 1112 return OK; |
1008 } | 1113 } |
1009 | 1114 |
1010 int HttpNetworkTransaction::DoBuildRequestComplete(int result) { | 1115 int HttpNetworkTransaction::DoBuildRequestComplete(int result) { |
1011 if (result == OK) | 1116 if (result == OK) |
1012 next_state_ = STATE_SEND_REQUEST; | 1117 next_state_ = STATE_SEND_REQUEST; |
1013 return result; | 1118 return result; |
1014 } | 1119 } |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1479 pending_auth_target_ = HttpAuth::AUTH_NONE; | 1584 pending_auth_target_ = HttpAuth::AUTH_NONE; |
1480 read_buf_ = NULL; | 1585 read_buf_ = NULL; |
1481 read_buf_len_ = 0; | 1586 read_buf_len_ = 0; |
1482 headers_valid_ = false; | 1587 headers_valid_ = false; |
1483 request_headers_.Clear(); | 1588 request_headers_.Clear(); |
1484 response_ = HttpResponseInfo(); | 1589 response_ = HttpResponseInfo(); |
1485 establishing_tunnel_ = false; | 1590 establishing_tunnel_ = false; |
1486 remote_endpoint_ = IPEndPoint(); | 1591 remote_endpoint_ = IPEndPoint(); |
1487 net_error_details_.quic_broken = false; | 1592 net_error_details_.quic_broken = false; |
1488 net_error_details_.quic_connection_error = QUIC_NO_ERROR; | 1593 net_error_details_.quic_connection_error = QUIC_NO_ERROR; |
1594 token_binding_key_.reset(); | |
1489 } | 1595 } |
1490 | 1596 |
1491 void HttpNetworkTransaction::CacheNetErrorDetailsAndResetStream() { | 1597 void HttpNetworkTransaction::CacheNetErrorDetailsAndResetStream() { |
1492 if (stream_) | 1598 if (stream_) |
1493 stream_->PopulateNetErrorDetails(&net_error_details_); | 1599 stream_->PopulateNetErrorDetails(&net_error_details_); |
1494 stream_.reset(); | 1600 stream_.reset(); |
1495 } | 1601 } |
1496 | 1602 |
1497 void HttpNetworkTransaction::RecordSSLFallbackMetrics(int result) { | 1603 void HttpNetworkTransaction::RecordSSLFallbackMetrics(int result) { |
1498 if (result != OK && result != ERR_SSL_INAPPROPRIATE_FALLBACK) | 1604 if (result != OK && result != ERR_SSL_INAPPROPRIATE_FALLBACK) |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1709 DCHECK(stream_request_); | 1815 DCHECK(stream_request_); |
1710 | 1816 |
1711 // Since the transaction can restart with auth credentials, it may create a | 1817 // Since the transaction can restart with auth credentials, it may create a |
1712 // stream more than once. Accumulate all of the connection attempts across | 1818 // stream more than once. Accumulate all of the connection attempts across |
1713 // those streams by appending them to the vector: | 1819 // those streams by appending them to the vector: |
1714 for (const auto& attempt : stream_request_->connection_attempts()) | 1820 for (const auto& attempt : stream_request_->connection_attempts()) |
1715 connection_attempts_.push_back(attempt); | 1821 connection_attempts_.push_back(attempt); |
1716 } | 1822 } |
1717 | 1823 |
1718 } // namespace net | 1824 } // namespace net |
OLD | NEW |