Question

I have a php-download script that looks like this:

<?php
header("Pragma: public"); // required
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false); // required for certain browsers 
header("Content-Description: File Transfer");
header("Content-Disposition: attachment; filename=\"$file\"");
header("Content-Type: $mimeType");
header("Content-Transfer-Encoding: binary");
header("Content-Length: $size");
// Read the file from disk
readfile($path);
?>

Normally with this I can force my E-Book-Reader (a Sony PRS-T1) to download a file. However, if I use the same script inside of a folder with .htaccess-authentication, the download fails.

On my computer, the download works, no matter if there is a .htaccess-authentication or not.

Can you help me to find the reason for this behaviour of my Ebook-Reader and make downloads inside of protected folders possible?

Thank you!

[edit] The PRS-T1 runs Android. Maybe this issue (link) is the answer - it is simply not possible...?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top