summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/http/http_network_transaction.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 796eec9..c391dae 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -490,12 +490,13 @@ int HttpNetworkTransaction::DoConnect() {
}
int HttpNetworkTransaction::DoConnectComplete(int result) {
+ if (IsCertificateError(result))
+ result = HandleCertificateError(result);
+
if (result == OK) {
next_state_ = STATE_WRITE_HEADERS;
if (using_tunnel_)
establishing_tunnel_ = true;
- } else if (IsCertificateError(result)) {
- result = HandleCertificateError(result);
} else {
result = ReconsiderProxyAfterError(result);
}
@@ -513,11 +514,11 @@ int HttpNetworkTransaction::DoSSLConnectOverTunnel() {
}
int HttpNetworkTransaction::DoSSLConnectOverTunnelComplete(int result) {
- if (result == OK) {
- next_state_ = STATE_WRITE_HEADERS;
- } else if (IsCertificateError(result)) {
+ if (IsCertificateError(result))
result = HandleCertificateError(result);
- }
+
+ if (result == OK)
+ next_state_ = STATE_WRITE_HEADERS;
return result;
}