Pdf-Viewer icon indicating copy to clipboard operation
Pdf-Viewer copied to clipboard

[BUG] Missing Content-Length for PDF behind Cloudflare

Open michalkierasinski opened this issue 10 months ago • 10 comments

📝 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

michalkierasinski avatar Apr 08 '24 08:04 michalkierasinski

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!

github-actions[bot] avatar Apr 08 '24 08:04 github-actions[bot]

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.

github-actions[bot] avatar May 09 '24 02:05 github-actions[bot]

+1

michalkierasinski avatar May 10 '24 09:05 michalkierasinski

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.

github-actions[bot] avatar Jun 10 '24 02:06 github-actions[bot]

+1

michalkierasinski avatar Jun 10 '24 05:06 michalkierasinski

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.

github-actions[bot] avatar Jul 11 '24 02:07 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Jul 17 '24 02:07 github-actions[bot]

+1

PElfimov avatar Aug 20 '24 07:08 PElfimov

Is there a fix for this issue?

jimmy-jos avatar Sep 10 '24 13:09 jimmy-jos

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?

mark-kraemer avatar Sep 19 '24 20:09 mark-kraemer