Bug 1871963: Implement zstd content-encoding support r=necko-reviewers,valentin,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D205109
This commit is contained in:
@@ -1539,6 +1539,8 @@ HttpBaseChannel::DoApplyContentConversions(nsIStreamListener* aNextListener,
|
||||
mode = 2;
|
||||
} else if (from.EqualsLiteral("br")) {
|
||||
mode = 3;
|
||||
} else if (from.EqualsLiteral("zstd")) {
|
||||
mode = 4;
|
||||
}
|
||||
Telemetry::Accumulate(Telemetry::HTTP_CONTENT_ENCODING, mode);
|
||||
}
|
||||
@@ -1643,6 +1645,14 @@ HttpBaseChannel::nsContentEncodings::GetNext(nsACString& aNextEncoding) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!haveType) {
|
||||
encoding.BeginReading(start);
|
||||
if (CaseInsensitiveFindInReadable("zstd"_ns, start, end)) {
|
||||
aNextEncoding.AssignLiteral(APPLICATION_ZSTD);
|
||||
haveType = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Prepare to fetch the next encoding
|
||||
mCurEnd = mCurStart;
|
||||
mReady = false;
|
||||
|
||||
Reference in New Issue
Block a user