Chrome refuses to accept file from webserver.

34 views
Skip to first unread message

Chad B

unread,
Nov 10, 2015, 12:07:17 PM11/10/15
to Chromium Apps
Now to understand this problem it may take a little technical know how.

First of all this isn't unique to me - this issue happens for everyone.

Alright so basically, I'm trying to serve a zip file - filled with other zip files to the user and chrome just sticks on "starting" until the inevitable "network error" message.

Here's my headers - 
    header('Content-type: application/octet-stream');
    header('Content-disposition: attachment; filename="'. $zipname .'"');
    header('Content-Transfer-Encoding: binary');
    header('Content-Length: ' . filesize($zipname));

here's how i'm streaming it -

    ob_end_flush();
    $fp = fopen($zipname, "r");
    if($fp != FALSE)
    {
        fpassthru($fp);
        fclose($fp);
    }

Language is PHP

Somethings to note;

Works fine with Firefox and Internet Explorer

PhistucK

unread,
Nov 10, 2015, 1:30:15 PM11/10/15
to Chad B, Chromium Apps
I admit I never heard of Content-Transfer-Encoding: binary, but if you use a different one, does it work?
This old paper suggests that it is not meant to be used over the internet -
"Thus there are no circumstances in which the "8bit" or "binary" Content-Transfer-Encoding is actually legal on the Internet"
But I am probably mixing different concepts here.

Anyway, is this a Chrome applications issue, or is it a regular website issue?
If it is the latter (which I suspect), you should post this to net-dev.


PhistucK

--
You received this message because you are subscribed to the Google Groups "Chromium Apps" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-app...@chromium.org.
To post to this group, send email to chromi...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-apps/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Chad B

unread,
Nov 10, 2015, 2:04:12 PM11/10/15
to Chromium Apps, thezyra...@gmail.com
Content-Transfer-Encoding values of "binary," "8bit," etc. may seem unimportant, in that all of them really mean "none"
saying binary just tells the browser there's no encoding. doesn't effect the status either way. Also thanks for linking me the proper forum - googles forum layout is quite confusing to me compared to something like mybb etc.
Reply all
Reply to author
Forward
0 new messages