bug 1040930 - part 3 https is a transaction property not a connection property r=hurley

--HG--
extra : rebase_source : dff8ea4b4e6f55f9e8dff99700400890b4492a31
This commit is contained in:
Patrick McManus 2014-07-17 20:52:23 -04:00
parent 959e69cf86
commit c82fa2b550

View File

@ -976,12 +976,15 @@ nsHttpConnection::OnHeadersAvailable(nsAHttpTransaction *trans,
MOZ_ASSERT(!mUsingSpdyVersion,
"SPDY NPN Complete while using proxy connect stream");
mProxyConnectStream = nullptr;
bool isHttps =
mTransaction ? mTransaction->ConnectionInfo()->EndToEndSSL() :
mConnInfo->EndToEndSSL();
if (responseStatus == 200) {
LOG(("proxy CONNECT succeeded! endtoendssl=%s\n",
mConnInfo->EndToEndSSL() ? "true" :"false"));
LOG(("proxy CONNECT succeeded! endtoendssl=%d\n", isHttps));
*reset = true;
nsresult rv;
if (mConnInfo->EndToEndSSL()) {
if (isHttps) {
if (mConnInfo->UsingHttpsProxy()) {
LOG(("%p new TLSFilterTransaction %s %d\n",
this, mConnInfo->Host(), mConnInfo->Port()));
@ -998,8 +1001,7 @@ nsHttpConnection::OnHeadersAvailable(nsAHttpTransaction *trans,
MOZ_ASSERT(NS_SUCCEEDED(rv), "mSocketOut->AsyncWait failed");
}
else {
LOG(("proxy CONNECT failed! endtoendssl=%s\n",
mConnInfo->EndToEndSSL() ? "true" :"false"));
LOG(("proxy CONNECT failed! endtoendssl=%d\n", isHttps));
mTransaction->SetProxyConnectFailed();
}
}