| Index: net/http/http_network_transaction.cc
|
| diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
|
| index 5dc01ca6bee1a07b8f4bc301928fa0f5062fe0a0..6006ccc65d492dcc3aa800671a5c74b565ff72ee 100644
|
| --- a/net/http/http_network_transaction.cc
|
| +++ b/net/http/http_network_transaction.cc
|
| @@ -799,10 +799,17 @@ int HttpNetworkTransaction::DoSSLConnect() {
|
| int HttpNetworkTransaction::DoSSLConnectComplete(int result) {
|
| SSLClientSocket* ssl_socket =
|
| reinterpret_cast<SSLClientSocket*>(connection_->socket());
|
| +
|
| + SSLClientSocket::NextProtoStatus status =
|
| + SSLClientSocket::kNextProtoUnsupported;
|
| std::string proto;
|
| - SSLClientSocket::NextProtoStatus status = ssl_socket->GetNextProto(&proto);
|
| + // GetNextProto will fail and and trigger a NOTREACHED if we pass in a socket
|
| + // that hasn't had SSL_ImportFD called on it. If we get a certificate error
|
| + // here, then we know that we called SSL_ImportFD.
|
| + if (result == OK || IsCertificateError(result))
|
| + status = ssl_socket->GetNextProto(&proto);
|
| static const char kSpdyProto[] = "spdy";
|
| - const bool use_spdy = (status != SSLClientSocket::kNextProtoUnsupported &&
|
| + const bool use_spdy = (status == SSLClientSocket::kNextProtoNegotiated &&
|
| proto == kSpdyProto);
|
|
|
| if (IsCertificateError(result)) {
|
|
|