Skip to content

Commit

Permalink
don't exclude 204s
Browse files Browse the repository at this point in the history
  • Loading branch information
ikreymer committed Jan 17, 2024
1 parent bc201be commit ea9639f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/util/recorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ export class Recorder {
}

async serializeToWARC(reqresp: RequestResponseInfo) {
if (reqresp.shouldSkip()) {
if (reqresp.shouldSkipSave()) {
const { url, method, status, payload } = reqresp;
logNetwork("Skipping request/response", {
url,
Expand Down
6 changes: 3 additions & 3 deletions src/util/reqresp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,12 @@ export class RequestResponseInfo {
return true;
}

shouldSkip() {
// skip OPTIONS/HEAD responses, and 304, 204 or 206 responses
shouldSkipSave() {
// skip OPTIONS/HEAD responses, and 304 or 206 responses
if (
!this.payload ||
(this.method && ["OPTIONS", "HEAD"].includes(this.method)) ||
[204, 206, 304].includes(this.status)
[206, 304].includes(this.status)
) {
return true;
}
Expand Down

0 comments on commit ea9639f

Please sign in to comment.