Merge in GetSecurityInfo fix from the main branch
git-svn-id: svn://10.0.0.236/branches/linkclickfix_tmp_branch@65572 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1066,7 +1066,7 @@ nsHTTPChannel::CacheReceivedResponse(nsIStreamListener *aListener,
|
||||
|
||||
// ruslan/hack: don't cache secure connections for now
|
||||
nsCOMPtr<nsISupports> securityInfo;
|
||||
if (GetSecurityInfo (getter_AddRefs (securityInfo)) && securityInfo)
|
||||
if (NS_SUCCEEDED (GetSecurityInfo (getter_AddRefs (securityInfo))) && securityInfo)
|
||||
return NS_OK;
|
||||
|
||||
// If the current response is itself from the cache rather than the network
|
||||
@@ -1471,6 +1471,12 @@ nsresult nsHTTPChannel::ResponseCompleted(nsIStreamListener *aListener,
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
{
|
||||
// ruslan: grab the security info before the transport disappears
|
||||
nsCOMPtr<nsISupports> secInfo;
|
||||
GetSecurityInfo (getter_AddRefs (secInfo)); // this will store it
|
||||
}
|
||||
|
||||
//
|
||||
// First:
|
||||
//
|
||||
@@ -2136,13 +2142,20 @@ nsHTTPChannel::GetSecurityInfo (nsISupports * *aSecurityInfo)
|
||||
if (!aSecurityInfo)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
nsCOMPtr<nsIChannel> trans;
|
||||
|
||||
if (mRequest)
|
||||
{
|
||||
nsCOMPtr<nsIChannel> trans;
|
||||
|
||||
mRequest -> GetTransport (getter_AddRefs (trans));
|
||||
if (trans)
|
||||
return trans -> GetSecurityInfo (aSecurityInfo);
|
||||
trans -> GetSecurityInfo (getter_AddRefs (mSecurityInfo));
|
||||
|
||||
if (mSecurityInfo)
|
||||
{
|
||||
*aSecurityInfo = mSecurityInfo;
|
||||
NS_ADDREF (*aSecurityInfo);
|
||||
}
|
||||
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -174,6 +174,7 @@ protected:
|
||||
|
||||
PRBool mPipeliningAllowed;
|
||||
nsHTTPPipelinedRequest* mPipelinedRequest;
|
||||
nsCOMPtr<nsISupports> mSecurityInfo;
|
||||
};
|
||||
|
||||
#endif /* _nsHTTPChannel_h_ */
|
||||
|
||||
Reference in New Issue
Block a user