Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporary workaround for zstd compression #356

Merged
merged 3 commits into from
Jul 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading