juanparati/MooUpload — Issue #13: Mooupload Class - getallheader
Author: minhna
Created: 2011-10-22 00:44:31+00:00
State: open

Hi,
Firstly, thank you for created a awesome upload tool.
Then I found a minor issue. You used getallheaders() function to read header from request. But you know, currently almost shared webserver use PHP-CGI version 5.2.x and that function doesn't work. The getallheaders function only available in php module mode (almost version of PHP).

I had to modify like this bellow:
if (function_exists('getallheaders')) {
$headers	= getallheaders();
}
else {
$headers = array();
$headers['X-File-Id']	= $_SERVER['HTTP_X_FILE_ID'];
$headers['X-File-Name']	= $_SERVER['HTTP_X_FILE_NAME'];
$headers['Content-Length']	= $_SERVER['CONTENT_LENGTH'];
$headers['X-File-Resume']	= $_SERVER['HTTP_X_FILE_RESUME'];
$headers['X-File-Size']	= $_SERVER['HTTP_X_FILE_SIZE'];
}

It works for me.
Thank you.
Minh