Forum Moderators: phranque

Message Too Old, No Replies

Serving large files - download fails on https, works on http?

Difference seems to be file-chunking (206 vs 200)

         

SumGuy

12:59 am on Aug 3, 2021 (gmt 0)

5+ Year Member Top Contributors Of The Month



Occasionally I give people a direct link to a file on our server (a software update). It's a zip file, about 95 mb. Now the server setup is a bit quirky - http requests (ie port 80) are handled by IIS4 (this is running on NT4) and https are handled by Abyss (running on same machine). Practically all http file requests are 301 to https but these large zip files are not.

For these software update files, I just make sure there is a copy of the files on both web-roots so either IIS or Abyss will serve them depending on if the hit is http or https.

Most browsers today will assume https when you enter "domain.com / file.zip" in the address bar, and indeed I don't specify when I give the url to the user.

I'm dealing recently with a guy in Greece (I'm in Canada) and his browser keeps telling him the download failed. I look at the server logs and see his browser (Chrome on Win-10) is making lots of 206 requests for the file (206 is the result code in the logs) and something screws up along the way I guess. I've tried it just now (Win-7, FF 52) and indeed I am also getting download failures when I specifically use HTTPS. However, HTTP works fine (and a faster download rate). I've looked at the server logs today looking for when these files have been requested on HTTP and I almost always see them as a single request (http code 200, not 206) and the entire file is downloaded in a single request.

Where does this fragmentation or segmentation take place? Is the browser making a decision to download the file in chunks (and makes the chunk request to the server which completes each request with a 206 code) or is the server in control of this?

phranque

3:03 am on Aug 3, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



i would examine the request to insure that it was properly defined and the response to insure that it was properly constructed:
https://httpwg.org/specs/rfc7233.html#status.206

Where does this fragmentation or segmentation take place?

the server should only respond with a 206 status code when the user agent sends the Range header and the web server has successfully served the requested range(s) of data.