From 3d53d71a966f73e046a6631771c3ed8feb627339 Mon Sep 17 00:00:00 2001 From: Todd Evanoff Date: Thu, 14 Dec 2023 20:48:39 -0800 Subject: [PATCH] bail early on 304 responses --- src/resource-archive/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/resource-archive/index.ts b/src/resource-archive/index.ts index 4bb38575..a7d9fb77 100644 --- a/src/resource-archive/index.ts +++ b/src/resource-archive/index.ts @@ -136,6 +136,12 @@ class Watcher { return; } + // There's no reponse body for us to archive on 304s + if (responseStatusCode === 304) { + await this.clientSend(request, 'Fetch.continueRequest', { requestId }); + return; + } + const requestUrl = new URL(request.url); this.firstUrl ??= requestUrl;