Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #6 from bf/master

Allow custom-set "Accept-Ranges" header
  • Loading branch information...
commit 2ebf61639954d6e447aee76f80bccf68bf427ae0 2 parents 666682c + f2f61f6
@tj tj authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/send.js
View
2  lib/send.js
@@ -454,7 +454,7 @@ SendStream.prototype.type = function(path){
SendStream.prototype.setHeader = function(stat){
var res = this.res;
- res.setHeader('Accept-Ranges', 'bytes');
+ if (!res.getHeader('Accept-Ranges')) res.setHeader('Accept-Ranges', 'bytes');
if (!res.getHeader('ETag')) res.setHeader('ETag', utils.etag(stat));
if (!res.getHeader('Date')) res.setHeader('Date', new Date().toUTCString());
if (!res.getHeader('Cache-Control')) res.setHeader('Cache-Control', 'public, max-age=' + (this._maxage / 1000));
Please sign in to comment.
Something went wrong with that request. Please try again.