From a24a983ec40bf9d9f6154eb3e7adcdfdc0d7630e Mon Sep 17 00:00:00 2001 From: Pam Date: Thu, 4 Sep 2014 16:59:40 -0400 Subject: [PATCH] Tell the client that the server can accept byte ranges even if it hasn't requested them. This allows streaming to work in IE11, which will not try to request a byte range unless it gets this header first. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 20fb102..3961c42 100644 --- a/index.js +++ b/index.js @@ -231,14 +231,14 @@ var downloadHeader = function (res, info) { "Cache-Control": "public; max-age=" + settings.maxAge, Connection: "keep-alive", "Content-Type": info.mime, - "Content-Disposition": "inline; filename=" + info.file + ";" + "Content-Disposition": "inline; filename=" + info.file + ";", + "Accept-Ranges": "bytes" }; if (info.rangeRequest) { // Partial http response code = 206; header.Status = "206 Partial Content"; - header["Accept-Ranges"] = "bytes"; header["Content-Range"] = "bytes " + info.start + "-" + info.end + "/" + info.size; } }