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

Download files come out with wrong filename (without .pdf file extension) #426

Open
Popolechien opened this issue Dec 3, 2024 · 1 comment
Labels
bug Something isn't working enhancement New feature or request headers Use case for HTTP headers

Comments

@Popolechien
Copy link

Reported by user (Kiwix for Windows, 2.3.1) with the Milne textbooks zim where PDF files can be downloaded:
Image

Image
Image

And here note the filename:
Image

Adding .pdf at the end does not work, one needs to fully rename the file (e.g. fubar.pdf) for it to be downloaded successfully.

I know this isn't exactly a bug but since this is not expected behaviour I'm still flagging it as such (but feel free to remove tag).

@Popolechien Popolechien added bug Something isn't working enhancement New feature or request labels Dec 3, 2024
@benoit74 benoit74 changed the title PDF files come out without .pdf file extension Download files come out with wrong filename (without .pdf file extension) Dec 3, 2024
@benoit74
Copy link
Collaborator

benoit74 commented Dec 3, 2024

The problem is that online website resort on a special response header on the download request:

content-disposition: attachment; filename*=UTF-8''ACElectricalCircuitAnalysis.pdf;

Visible at https://milneopentextbooks.org/ac-electrical-circuit-analysis-a-practical-approach/

Currently we cannot store such headers in the ZIM, or replay them. This is typically a very good illustration of a case where we need to store and replay headers.

Not something going to happen soon without proper funding (need modifications of ZIM specification / libzim, probably readers, and warc2zim). But very important to keep track / open.

This is anyway a warc2zim issue, so I'm transferring there.

@benoit74 benoit74 transferred this issue from openzim/zimit Dec 3, 2024
@rgaudin rgaudin added help wanted Extra attention is needed headers Use case for HTTP headers and removed help wanted Extra attention is needed labels Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request headers Use case for HTTP headers
Projects
None yet
Development

No branches or pull requests

3 participants