/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// HttpLog.h should generally be included first #include"HttpLog.h"
NS_IMETHODIMP HTTPSRecordResolver::OnLookupComplete(nsICancelable* aRequest,
nsIDNSRecord* aRecord,
nsresult aStatus) {
MutexAutoLock lock(mMutex); if (!mTransaction || mDone) { // The transaction is not interesed in a response anymore.
mCnameRequest = nullptr;
mHTTPSRecordRequest = nullptr; return NS_OK;
}
if (aRequest == mHTTPSRecordRequest) {
nsCOMPtr<nsIDNSHTTPSSVCRecord> record = do_QueryInterface(aRecord);
mHTTPSRecordRequest = nullptr; if (!record || NS_FAILED(aStatus)) { // When failed, we don't want to wait for the CNAME.
mCnameRequest = nullptr;
MutexAutoUnlock unlock(mMutex); return InvokeCallback();
}
mHTTPSRecord = record;
// Waiting for the address record. if (mCnameRequest) { return NS_OK;
}
// Having mCnameRequest indicates that we are interested in the address // record. if (mCnameRequest && aRequest == mCnameRequest) {
nsCOMPtr<nsIDNSAddrRecord> addrRecord = do_QueryInterface(aRecord);
mCnameRequest = nullptr; if (!addrRecord || NS_FAILED(aStatus)) { // If we are still waiting for HTTPS RR, don't invoke the callback. if (mHTTPSRecordRequest) { return NS_OK;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.