summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-30 00:26:17 +0000
committerwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-30 00:26:17 +0000
commit771d0c2bc9b3b8a33b4de10997efcbb8097451ab (patch)
treea3b8f9c7a45437790ea8fa39b7b374089686afdb
parent71b12a598e2733cee7c809871f4c1152a6296ea0 (diff)
downloadchromium_src-771d0c2bc9b3b8a33b4de10997efcbb8097451ab.zip
chromium_src-771d0c2bc9b3b8a33b4de10997efcbb8097451ab.tar.gz
chromium_src-771d0c2bc9b3b8a33b4de10997efcbb8097451ab.tar.bz2
When an SSL connect is completed, we need to call
HandleCertificateError first, because it may change 'result' to 'OK' if the load flags say we should ignore that certificate error, and we want to take the 'result == OK' code path when that happens. R=rvargas BUG=2703 Review URL: http://codereview.chromium.org/4340 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2705 0039d316-1c4b-4281-b951-d872f2087c98
-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;
}