Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.4

Bug #3263 Acrobat hangs on multiple ranges
Submitted: 2005-01-21 22:38 UTC
From: sbaturzio at satellite1 dot 191 dot it Assigned: mike
Status: Closed Package: HTTP_Download
PHP Version: 4.3.10 OS: Linux 2.6.9 (Debian unstable)
Roadmaps: (Not assigned)    
Subscription  


 [2005-01-21 22:38 UTC] sbaturzio at satellite1 dot 191 dot it
Description: ------------ Downloading a big PDF file (> 30KB), with disposition inline, to a Acrobat Reader plug-in (v 5.0.10) the file is sent in chunks but the download is not completed. Seems the multibyte ranges are not managed correctly. Reproduce code: --------------- A simple download using: $fileName = 'bigFile.pdf'; $mimeType = 'application/pdf'; $aParams = array('file' => $fileName, 'contenttype' => $mimeType, 'contentdisposition' => array(HTTP_DOWNLOAD_INLINE, $bigFile), ); $error = HTTP_Download::staticSend($aParams, false); is what I used. Small PDF files are downloaded in a single chunk and they works. A workaround to this problem is to commenting the line 170 of Download.php in: // 'Accept-Ranges' => 'bytes', In this way the download is done in one single chunk and Acrobat Reader works fine. Expected result: ---------------- Acrobat reader download and show big PDF downloaded file. Actual result: -------------- Acrobat Reader is loaded by the browser but instead of showing its interface, button bars, thumbnail tab on the left and main window with document page inside, it shows a completely blank browser window. Looking at the headers transmitted to and from the browser I see HTTP/Download send a first 200 HTTP code, then 206 code to answer to a partial request. Maybe a second chunk is sent to the Acrobat Reader but then nothing is transmitted.

Comments

 [2005-01-21 22:41 UTC] sbaturzio at satellite1 dot 191 dot it
Forgot to say that I'm using apache 1.3.33 and the browser used are Mozilla Firefox (on Linux and Windows) and IExplorer 6 (Windows)
 [2005-01-21 22:56 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-01-23 01:14 UTC] sbaturzio at satellite1 dot 191 dot it
Sorry Helgi, but I need to download files with disposition 'inline'. Actually I've made a workaround at this problem extending the Download class and adding a method which let me change the $headers['Accept-Ranges'] without modify the original class: function setAcceptRanges($param) { if ($param == 'bytes') { $this->headers['Accept-Ranges'] = $param; } else { $this->headers['Accept-Ranges'] = 'none'; } }
 [2005-01-24 11:34 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-01-24 13:09 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!