Welcome Guest, Not a member yet? Register   Sign In
force_download cutting off last few lines
#2

[eluser]dmorin[/eluser]
After thinking about this a little more, I realized what the issue was. The download helper includes this line:

Code:
header("Content-Length: ".strlen($data));

This approach to setting the content-length is flawed when using multi-byte strings IF strlen has been overloaded with mb_strlen in which case it will return the number of characters in the string as it is supposed to instead of the byte length.

Commenting out this line, which is not ideal, seems to have fixed my problem for now until I take the time to figure out how to calculate the actual byte length of the string.


Messages In This Thread
force_download cutting off last few lines - by El Forum - 04-10-2008, 08:02 PM
force_download cutting off last few lines - by El Forum - 04-11-2008, 07:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB