Bug 1671720: HTTPS-Only Mode: Query if channel is auth only if we can query nsIHttpChannelInternal. r=dragana

Differential Revision: https://phabricator.services.mozilla.com/D93910
This commit is contained in:
Christoph Kerschbaumer 2020-10-19 09:05:12 +00:00
Родитель 307c6e1733
Коммит 390f3eecff
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -424,7 +424,8 @@ TestHTTPAnswerRunnable::OnStartRequest(nsIRequest* aRequest) {
// to upgrade is already in progress or if the channel is an auth channel. // to upgrade is already in progress or if the channel is an auth channel.
// If it is in progress or Auth is in progress, then all good, if not // If it is in progress or Auth is in progress, then all good, if not
// then let's cancel that channel so we can dispaly the exception page. // then let's cancel that channel so we can dispaly the exception page.
nsCOMPtr<nsIChannel> httpsOnlyChannel = mDocumentLoadListener->GetChannel(); nsCOMPtr<nsIChannel> docChannel = mDocumentLoadListener->GetChannel();
nsCOMPtr<nsIHttpChannel> httpsOnlyChannel = do_QueryInterface(docChannel);
if (httpsOnlyChannel) { if (httpsOnlyChannel) {
nsCOMPtr<nsILoadInfo> loadInfo = httpsOnlyChannel->LoadInfo(); nsCOMPtr<nsILoadInfo> loadInfo = httpsOnlyChannel->LoadInfo();
uint32_t topLevelLoadInProgress = uint32_t topLevelLoadInProgress =