Skip to content

Commit

Permalink
warcinfo: fix version to 1.1 to avoid confusion (part of #553) (#557)
Browse files Browse the repository at this point in the history
Ensure warcinfo record is also WARC/1.1
  • Loading branch information
ikreymer committed Apr 19, 2024
1 parent dece69c commit 15d2b09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/crawler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1090,12 +1090,12 @@ self.__bx_behaviors.selectMainBehavior();
}

async createWARCInfo(filename: string) {
const warcVersion = "WARC/1.0";
const warcVersion = "WARC/1.1";
const type = "warcinfo";

const info = {
software: this.infoString,
format: "WARC File Format 1.0",
format: "WARC File Format 1.1",
};

const warcInfo = { ...info, ...this.params.warcInfo };
Expand Down
2 changes: 1 addition & 1 deletion tests/warcinfo.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ test("check that the warcinfo file works as expected on the command line", async
expect(
string.match(/Browsertrix-Crawler \d[\w.-]+ \(with warcio.js \d[\w.-]+\)/),
).not.toEqual(null);
expect(string.indexOf("format: WARC File Format 1.0")).toBeGreaterThan(-1);
expect(string.indexOf("format: WARC File Format 1.1")).toBeGreaterThan(-1);
});

0 comments on commit 15d2b09

Please sign in to comment.