mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1272594 - Remove special cookie policy handling within InternalRequest (r=bkelly)
This commit is contained in:
parent
23f36915e8
commit
99eda5a50b
@ -442,25 +442,7 @@ InternalRequest::MapChannelToRequestCredentials(nsIChannel* aChannel)
|
||||
nsCOMPtr<nsILoadInfo> loadInfo;
|
||||
MOZ_ALWAYS_SUCCEEDS(aChannel->GetLoadInfo(getter_AddRefs(loadInfo)));
|
||||
|
||||
|
||||
// TODO: Remove following code after stylesheet and image support cookie policy
|
||||
if (loadInfo->GetSecurityMode() == nsILoadInfo::SEC_NORMAL) {
|
||||
uint32_t loadFlags;
|
||||
aChannel->GetLoadFlags(&loadFlags);
|
||||
|
||||
if (loadFlags & nsIRequest::LOAD_ANONYMOUS) {
|
||||
return RequestCredentials::Omit;
|
||||
} else {
|
||||
bool includeCrossOrigin;
|
||||
nsCOMPtr<nsIHttpChannelInternal> internalChannel = do_QueryInterface(aChannel);
|
||||
|
||||
internalChannel->GetCorsIncludeCredentials(&includeCrossOrigin);
|
||||
if (includeCrossOrigin) {
|
||||
return RequestCredentials::Include;
|
||||
}
|
||||
}
|
||||
return RequestCredentials::Same_origin;
|
||||
}
|
||||
MOZ_DIAGNOSTIC_ASSERT(loadInfo->GetSecurityMode() != nsILoadInfo::SEC_NORMAL);
|
||||
|
||||
uint32_t cookiePolicy = loadInfo->GetCookiePolicy();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user