[GH-ISSUE #181] Attachments download fail or lag #148

Closed
opened 2026-02-25 21:34:18 +03:00 by kerem · 4 comments
Owner

Originally created by @szilardx on GitHub (Mar 31, 2017).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/181

Originally assigned to: @jasonmunro on GitHub.

I have one strange issue with Cypht:
Firefox cannot download attachments from imap (tested with gmail and outlook), Chromium can download, but the download lags, for example it stops at 1mb for a 1,5 mb pdf.

I have tested with nginx, tried multiple settings in the config.
Just tested with a standard apache install, it has the same problems. DevTools in Firefox shows that nothing gets actually transferred, and then it timeouts, and download fails.

Have you experienced this? Can you advice me about nginx config, or anything?

Thanks!

Originally created by @szilardx on GitHub (Mar 31, 2017). Original GitHub issue: https://github.com/cypht-org/cypht/issues/181 Originally assigned to: @jasonmunro on GitHub. I have one strange issue with Cypht: Firefox cannot download attachments from imap (tested with gmail and outlook), Chromium can download, but the download lags, for example it stops at 1mb for a 1,5 mb pdf. I have tested with nginx, tried multiple settings in the config. Just tested with a standard apache install, it has the same problems. DevTools in Firefox shows that nothing gets actually transferred, and then it timeouts, and download fails. Have you experienced this? Can you advice me about nginx config, or anything? Thanks!
kerem 2026-02-25 21:34:18 +03:00
  • closed this issue
  • added the
    bug
    imap
    labels
Author
Owner

@jasonmunro commented on GitHub (Mar 31, 2017):

I have not experienced this, but I will try to reproduce and let you know what I find!

<!-- gh-comment-id:290740123 --> @jasonmunro commented on GitHub (Mar 31, 2017): I have not experienced this, but I will try to reproduce and let you know what I find!
Author
Owner

@jasonmunro commented on GitHub (Mar 31, 2017):

I can reproduce this with a 1.5 MB PDF and firefox, and I think I see the problem. We are sending the content-length header, but it's incorrectly reporting the size of the file. Chrome seems to handle this ok, but firefox simply fails. Removing the length header makes it work. I'm not sure I can predetermine the size of the file, so removing the header might be the only fix. If you want to test and see if that works for you, comment out line 383 of modules/imap/modules.php.

I will update this issue once I commit a fix.

<!-- gh-comment-id:290797827 --> @jasonmunro commented on GitHub (Mar 31, 2017): I can reproduce this with a 1.5 MB PDF and firefox, and I think I see the problem. We are sending the content-length header, but it's incorrectly reporting the size of the file. Chrome seems to handle this ok, but firefox simply fails. Removing the length header makes it work. I'm not sure I can predetermine the size of the file, so removing the header might be the only fix. If you want to test and see if that works for you, comment out line 383 of modules/imap/modules.php. I will update this issue once I commit a fix.
Author
Owner

@szilardx commented on GitHub (Apr 2, 2017):

Commenting out the line fixed the issue quickly, and attachments are downloaded instantly.

Thank you very much! 👍 :)

<!-- gh-comment-id:290985209 --> @szilardx commented on GitHub (Apr 2, 2017): Commenting out the line fixed the issue quickly, and attachments are downloaded instantly. Thank you very much! :+1: :)
Author
Owner

@jasonmunro commented on GitHub (Apr 3, 2017):

Thanks for testing this out! Committed in github.com/jasonmunro/cypht@9590feeff2

<!-- gh-comment-id:291045981 --> @jasonmunro commented on GitHub (Apr 3, 2017): Thanks for testing this out! Committed in https://github.com/jasonmunro/cypht/commit/9590feeff237fc10b5f78adc3505dcf25115a48d
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#148
No description provided.