diff --git a/netwerk/protocol/http/nsHttpConnection.cpp b/netwerk/protocol/http/nsHttpConnection.cpp index 3769d7193073..76eadd72cf25 100644 --- a/netwerk/protocol/http/nsHttpConnection.cpp +++ b/netwerk/protocol/http/nsHttpConnection.cpp @@ -150,6 +150,18 @@ nsHttpConnection::Activate(nsAHttpTransaction *trans, PRUint8 caps) NS_ENSURE_ARG_POINTER(trans); NS_ENSURE_TRUE(!mTransaction, NS_ERROR_IN_PROGRESS); + // Update security callbacks + nsCOMPtr callbacks; + nsCOMPtr callbackTarget; + trans->GetSecurityCallbacks(getter_AddRefs(callbacks), + getter_AddRefs(callbackTarget)); + if (callbacks != mCallbacks) { + mCallbacks.swap(callbacks); + if (callbacks) + NS_ProxyRelease(mCallbackTarget, callbacks); + mCallbackTarget = callbackTarget; + } + // take ownership of the transaction mTransaction = trans;