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

Decode encoded HTTP content for extra-data #4415

Open
gasinvein opened this issue Sep 15, 2021 · 0 comments
Open

Decode encoded HTTP content for extra-data #4415

gasinvein opened this issue Sep 15, 2021 · 0 comments

Comments

@gasinvein
Copy link
Member

An HTTP server can compress the response body for transfer (setting Content-Encoding header). When downloading a file, Flatpak ignores this encoding and stores the HTTP response body as is.
The problem with this is that content encoding isn't deterministic. HTTP server may decide on its own to compress the file or not, use different compression methods, set different compression levels, set non-zero timestamp in gzip header, etc.
This can result in extra-data size and checksum being different for different clients, depending on the server decision.

Proposed solution: decode encoded content automatically when downloading extra-data and apply size/checksum checks to the decoded content. This will make the checks deterministic, regardless of Content-Encoding setting.

Related issue flathub-infra/flatpak-external-data-checker#159

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant