mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 12:50:09 +00:00
Bug 1172992 - Send security info override from HttpChildChannel to the parent, r=jduell
--HG-- extra : rebase_source : 72df514bb695ccdfc280ef124254da3107905a59
This commit is contained in:
parent
76991ad628
commit
cb0925e6e8
@ -91,6 +91,7 @@ struct HttpChannelOpenArgs
|
||||
OptionalFileDescriptorSet fds;
|
||||
OptionalLoadInfoArgs loadInfo;
|
||||
OptionalHttpResponseHead synthesizedResponseHead;
|
||||
nsCString synthesizedSecurityInfoSerialization;
|
||||
uint32_t cacheKey;
|
||||
nsCString schedulingContextID;
|
||||
};
|
||||
|
@ -1627,6 +1627,11 @@ HttpChannelChild::ContinueAsyncOpen()
|
||||
openArgs.synthesizedResponseHead() = mozilla::void_t();
|
||||
}
|
||||
|
||||
nsCOMPtr<nsISerializable> secInfoSer = do_QueryInterface(mSecurityInfo);
|
||||
if (secInfoSer) {
|
||||
NS_SerializeToString(secInfoSer, openArgs.synthesizedSecurityInfoSerialization());
|
||||
}
|
||||
|
||||
OptionalFileDescriptorSet optionalFDs;
|
||||
|
||||
if (fds.IsEmpty()) {
|
||||
|
@ -120,8 +120,9 @@ HttpChannelParent::Init(const HttpChannelCreationArgs& aArgs)
|
||||
a.thirdPartyFlags(), a.resumeAt(), a.startPos(),
|
||||
a.entityID(), a.chooseApplicationCache(),
|
||||
a.appCacheClientID(), a.allowSpdy(), a.allowAltSvc(), a.fds(),
|
||||
a.loadInfo(), a.synthesizedResponseHead(), a.cacheKey(),
|
||||
a.schedulingContextID());
|
||||
a.loadInfo(), a.synthesizedResponseHead(),
|
||||
a.synthesizedSecurityInfoSerialization(),
|
||||
a.cacheKey(), a.schedulingContextID());
|
||||
}
|
||||
case HttpChannelCreationArgs::THttpChannelConnectArgs:
|
||||
{
|
||||
@ -277,6 +278,7 @@ HttpChannelParent::DoAsyncOpen( const URIParams& aURI,
|
||||
const OptionalFileDescriptorSet& aFds,
|
||||
const OptionalLoadInfoArgs& aLoadInfoArgs,
|
||||
const OptionalHttpResponseHead& aSynthesizedResponseHead,
|
||||
const nsCString& aSecurityInfoSerialization,
|
||||
const uint32_t& aCacheKey,
|
||||
const nsCString& aSchedulingContextID)
|
||||
{
|
||||
@ -390,6 +392,13 @@ HttpChannelParent::DoAsyncOpen( const URIParams& aURI,
|
||||
if (aSynthesizedResponseHead.type() == OptionalHttpResponseHead::TnsHttpResponseHead) {
|
||||
mSynthesizedResponseHead = new nsHttpResponseHead(aSynthesizedResponseHead.get_nsHttpResponseHead());
|
||||
mShouldIntercept = true;
|
||||
|
||||
if (!aSecurityInfoSerialization.IsEmpty()) {
|
||||
nsCOMPtr<nsISupports> secInfo;
|
||||
NS_DeserializeObject(aSecurityInfoSerialization, getter_AddRefs(secInfo));
|
||||
mChannel->OverrideSecurityInfo(secInfo);
|
||||
}
|
||||
|
||||
} else {
|
||||
mChannel->ForceNoIntercept();
|
||||
}
|
||||
|
@ -118,6 +118,7 @@ protected:
|
||||
const OptionalFileDescriptorSet& aFds,
|
||||
const OptionalLoadInfoArgs& aLoadInfoArgs,
|
||||
const OptionalHttpResponseHead& aSynthesizedResponseHead,
|
||||
const nsCString& aSecurityInfoSerialization,
|
||||
const uint32_t& aCacheKey,
|
||||
const nsCString& aSchedulingContextID);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user