Skip to content
Myr

Added utils.parseRange() tests

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 699ed4e · Browse files · 3 files+13 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+13 added−4 removed

  • tests:+10 added−1 removed
  • other:+3 added−3 removed

3 files+13 added−4 removed

modified:lib/express/response.js+1 added-2 removed
145 unmodified lines
146 self.req.next(err);147 }148 }149150 if (ranges) ranges = parseRange(ranges);151150 fs.stat(path, function(err, stat){151 if (err) return error(err);152 if (stat.size >= streamThreshold) {153 if (ranges) ranges = parseRange(stat.size, ranges);154 var status = 200;155 if (ranges) {156 var stream = fs.createReadStream(path, ranges[0]),157 start = ranges[0].start,
203 unmodified lines
modified:lib/express/utils.js+2 added-1 removed
modified:test/utils.test.js+10 added-1 removed