Skip to content

Commit

Permalink
Merge pull request #356 from harvard-lil/temporary-zstd-handling
Browse files Browse the repository at this point in the history
Temporary workaround for zstd compression
  • Loading branch information
matteocargnelutti authored Jul 9, 2024
2 parents 2694c2b + 6b64465 commit b939af4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Scoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,16 @@ export class Scoop {

const context = await this.#browser.newContext({
...this.intercepter.contextOptions,
userAgent
userAgent,
// NOTE:
// This is a temporary workaround.
// Most browsers now accept zstd, but part of the web archiving stack (indexing, playback ...) is not fully ready to handle it yet.
// This line wants to be removed once the ecosystem is ready for zstd.
// More on zstd: https://datatracker.ietf.org/doc/html/rfc8878
// TODO: Remove whenever possible.
extraHTTPHeaders: {
'Accept-Encoding': 'gzip, compress, deflate, br'
}
})

const page = await context.newPage()
Expand Down

0 comments on commit b939af4

Please sign in to comment.