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

Extract gzip data from transfer-encoded WARC #493

Closed
ianmilligan1 opened this issue Aug 10, 2020 · 1 comment
Closed

Extract gzip data from transfer-encoded WARC #493

ianmilligan1 opened this issue Aug 10, 2020 · 1 comment

Comments

@ianmilligan1
Copy link
Member

ianmilligan1 commented Aug 10, 2020

Describe the bug
As reported in our Slack (and apologies in advance if I butcher the technical description here, this is at the edge of my knowledge).

Some WARC files keep compressed payload (as opposed to transfer-encoding), so we will have WARCs that are text/html but have compressed gzip data. Even though the content is gzipped within the WARC, as it is text/html it would be ideal to be able to provide the information.

Ilya Kreymer suggested on Slack:

probably the 'best' way to read this is, if a warc record has transfer-encoding: chunked, attempt to dechunk, if failed, assume not chunked. if a warc record has content-encoding: gzip, attempt to ungzip, otherwise assume not gzipped. the warcio library provides a method to read with both of these checks

To Reproduce
Load a WARC with this form of content, extract content, and see gzip'ed material instead of the text.

Expected behavior
If the webpage has text, it would be good to see the text not the compressed material.

ruebot added a commit that referenced this issue Oct 7, 2020
ruebot added a commit that referenced this issue May 18, 2022
* fix discardDate issue
* update tests for #494
* add test for #493
* add test for #532
* move issue specific tests to their own directory
* add copyright statement to SparklingArchiveRecord
* move webarchive-commons back to 1.1.9
* resolves #532
* resolves #494
* resolves #493
* resolves #492
* resolves #317
* resolves #260
* resolves #182
* resolves #76
* resolves #74
* resolves #73
* resolves #23
* resolves #18
@ruebot
Copy link
Member

ruebot commented May 20, 2022

This will be resolved with #533. A build test was added to account for it, and it passes.

@ruebot ruebot closed this as completed in c8fa256 May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants