diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp index 029190e09923..9b9bbff2fe69 100644 --- a/netwerk/protocol/http/nsHttpChannel.cpp +++ b/netwerk/protocol/http/nsHttpChannel.cpp @@ -585,8 +585,8 @@ nsresult nsHttpChannel::OnBeforeConnect() { this, getter_AddRefs(resultPrincipal)); } OriginAttributes originAttributes; - if (!StoragePrincipalHelper::GetOriginAttributes( - this, originAttributes, StoragePrincipalHelper::eRegularPrincipal)) { + if (!StoragePrincipalHelper::GetOriginAttributesForNetworkState( + this, originAttributes)) { return NS_ERROR_FAILURE; } @@ -2183,8 +2183,11 @@ nsresult nsHttpChannel::ProcessSingleSecurityHeader( // Process header will now discard the headers itself if the channel // wasn't secure (whereas before it had to be checked manually) OriginAttributes originAttributes; - StoragePrincipalHelper::GetOriginAttributes( - this, originAttributes, StoragePrincipalHelper::eRegularPrincipal); + if (NS_WARN_IF(!StoragePrincipalHelper::GetOriginAttributesForNetworkState( + this, originAttributes))) { + return NS_ERROR_FAILURE; + } + uint32_t failureResult; uint32_t headerSource = nsISiteSecurityService::SOURCE_ORGANIC_REQUEST; rv = sss->ProcessHeader(aType, mURI, securityHeader, aSecInfo, aFlags,