From fe373199967cc54b74be463653d33274d1430f09 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Wed, 25 Oct 2023 04:29:37 +0200 Subject: [PATCH] [DOM] Ignore status 206 and vary header checking for opaque responses in the Cache API. --- dom/cache/TypeUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/cache/TypeUtils.cpp b/dom/cache/TypeUtils.cpp index 1af5ee9458..89fe2a62fb 100644 --- a/dom/cache/TypeUtils.cpp +++ b/dom/cache/TypeUtils.cpp @@ -190,7 +190,7 @@ TypeUtils::ToCacheResponseWithoutBody(CacheResponse& aOut, aOut.statusText() = aIn.GetUnfilteredStatusText(); RefPtr headers = aIn.UnfilteredHeaders(); MOZ_DIAGNOSTIC_ASSERT(headers); - if (HasVaryStar(headers)) { + if (aIn.Type() != ResponseType::Opaque && HasVaryStar(headers)) { aRv.ThrowTypeError(); return; }