Skip to content
Myr

Added Range test

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 435a256 · Browse files · 1 file+20 added−0 removed
This commit

State

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

Diff stats

1 file+20 added−0 removed

  • tests:+20 added−0 removed

1 file+20 added−0 removed

modified:test/response.test.js+20 added
232 unmodified lines
233 { url: '/large.json' },234 { headers: { 'Accept-Ranges': 'bytes' }});235 },236 237 'test #sendfile() Range': function(assert){238 var app = express.createServer();239 240 app.set('stream threshold', 1024);241 242 app.get('/*', function(req, res, next){243 var file = req.params[0],244 path = __dirname + '/fixtures/' + file;245 res.sendfile(path);246 });247248 assert.response(app,249 { url: '/large.json', headers: { 'Range': 'bytes=0-499' }},250 { headers: {251 'Content-Type': 'application/json',252 'Content-Length': 500,253 'Content-Range': 'bytes 0-499/2535'254 }, status: 206 });255 },256 257 'test #download()': function(assert){258 var app = express.createServer();259 260 app.get('/json', function(req, res, next){
82 unmodified lines