View Single Post
Old 10-12-2012, 02:24 AM   #135
Northguy
Member
Northguy began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Oct 2011
Device: Sony PRS-T1
Quote:
Originally Posted by akenarf View Post

//readfile($config['calibre_internal_directory'] . $file);
header('Content-Length: ' . filesize($config['calibre_internal_directory'] . $file));
fpassthru(fopen($config['calibre_internal_directory'] . $file, 'rb'));

not sure why this is the case, but it all works great now..! :-)
@Vlad59:
Whan patching this code, will this also work as a replacement for the code I needed to implement on my machine?

Quote:
Edit the file fetch.php and put // before the last two lines.

// header("Content-Type: application/force-download");

// header ($config['cops_x_accel_redirect'] . ": " . $config['calibre_internal_directory'] . $file);

Add this line below the lines above.

readfile($config['calibre_internal_directory'] . $file);
Maybe it is possible while patching to make the code more uniform and make this an optional feature, based on the choice of setting
Quote:
$config['cops_x_accel_redirect'] = "location";
If the option is generic I can do a Git Pull without the need of first saving my personal modification.
Northguy is offline   Reply With Quote