[Tickets #8612] Re: Download All Attachments (in .zip file) link generates corrupted zip files
bugs at horde.org
bugs at horde.org
Thu Oct 1 15:09:14 UTC 2009
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/8612
------------------------------------------------------------------------------
Ticket | 8612
Updated By | horde_contact at auchan.com
Summary | Download All Attachments (in .zip file) link generates
| corrupted zip files
Queue | IMP
Version | 4.3.4
Type | Bug
State | Feedback
Priority | 1. Low
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
horde_contact at auchan.com (2009-10-01 11:09) wrote:
After lots of debugging, I've found that the 0x0a character is added
by the PHP header() function:
- If I remove the call to downloadHeaders function in view.php, I have
no extra character.
- if I replace the call to downloadHeaders with only one header() call
(content-length one for example), I do have the extra 0x0a character
before $body.
In any case, the zip file generated by $horde_compress->compress(...)
is OK (wrote it down to a file, and tested it successfully with zip -T)
What I've done, is setting the content-Length header with
strlen($body)+1. Thus, I still have an extra character in the
beginning of the zip file (which does not prevent winzip from openning
it), but I do not miss the last byte of the zip file.
Does anyone have an Idea of why header() acts like this or should I
open a bug on PHP bugtracker ?
Anyway, you can close this ticket, as it is not horde/imp related.
Thanks for your help.
More information about the bugs
mailing list