Bug 1910586: Improve https telemetry within OpenSearchLoader, r=daleharvey

Differential Revision: https://phabricator.services.mozilla.com/D218056
This commit is contained in:
Christoph Kerschbaumer 2024-07-31 10:54:14 +00:00
Родитель 06c7e5c950
Коммит da98b58ef1
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -166,6 +166,11 @@ function loadEngineXML(sourceURI, lastModified) {
Ci.nsIContentPolicy.TYPE_DOCUMENT
);
// we collect https telemetry for all top-level (document) loads.
chan.loadInfo.httpsUpgradeTelemetry = sourceURI.schemeIs("https")
? Ci.nsILoadInfo.ALREADY_HTTPS
: Ci.nsILoadInfo.NO_UPGRADE;
if (lastModified && chan instanceof Ci.nsIHttpChannel) {
chan.setRequestHeader("If-Modified-Since", lastModified, false);
}