HTTP_Download
| From: | Sebastian Baran | Date: | Tue, 20 Apr 2004 10:25:08 +0000 |
| Subject: | HTTP_Download | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-11965@lists.php.net to get a copy of this message | ||
Hi all!
Has somebody tried to use HTTP_Download to send PDF file as 'inline'?
I'm just trying to do that and I get following error:
Warning: fread(): Length parameter may not be negative in
D:\Programy\krasnal\php\pear\HTTP\Download.php on line 510
which is:
echo(fread($this->_handle, $length+$rb));
Sending PDF as attachment or sending other type of file works ok. I've
found that probably Acrobat Reader (v5) is trying to download file in
parts. I put $_SERVER var_dump() into send() method, in part for
partial downloads and I got this:
'HTTP_RANGE' => 'bytes=628970-630121, 645439-645919, 7913-102580'
where file is 645920 bytes long.
Is that a bug or am I doing something wrong?
--
Best regards,
Sebastian