Pdf-Viewer
Pdf-Viewer copied to clipboard
[BUG] Missing Content-Length for PDF behind Cloudflare
📝 Describe the Bug
PDF behind Cloudflare does not work because Content-Length is not available. Library logs java.io.IOException: Incomplete download.
Cloudflare removes information about Content-Length
when Accept-Encoding
have gzip
value.
Maybe you can remove gzip
value from that header?
📖 Library Version
- Since 2.1.0
Thank you for creating your first issue. We appreciate your help in making this project better. We will look into it, and get back to you soon. Need help or want to discuss this issue? Join our Discord community here to ask questions and discuss this issue live!
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
+1
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
+1
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
+1
Is there a fix for this issue?
I'm in a similar situation where the content length is unavailable from my file server. Is there another way to check that the file download is complete apart from the content length here https://github.com/afreakyelf/Pdf-Viewer/blob/a2f11aa01fbfa4bdfaee5c7789c6504acb6c519f/pdfViewer/src/main/java/com/rajat/pdfviewer/PdfDownloader.kt#L107?