mirror of
https://github.com/webrecorder/browsertrix-crawler.git
synced 2025-10-19 06:23:16 +00:00
don't exclude 204s
This commit is contained in:
parent
bc201be7f1
commit
ea9639f0bd
2 changed files with 4 additions and 4 deletions
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue