Skip to content
Myr

docs

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 7bfb589 · Browse files · 1 file+0 added−23 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+0 added−23 removed

  • other:+0 added−23 removed

1 file+0 added−23 removed

modified:lib/request.js-23 removed
146 unmodified lines
147 * NOTE: remember that ranges are inclusive, so148 * for example "Range: users=0-3" should respond149 * with 4 users when available, not 3.150 *151 * Examples:152 *153 * app.get('/users', function(req, res){154 * var range = req.range(users.length);155 * 156 * switch (range) {157 * // unsatifiable158 * case -1:159 * return res.send(416);160 * // invalid or no Range161 * case -2: 162 * case undefined:163 * return res.send(users);164 * // inclusive Range165 * default:166 * if ('users' != range.type) return res.send(416);167 * range = range.shift();168 * res.status(206); // partial content169 * res.set('Content-Range', 'users ' + range.start + '-' + range.end + '/' + users.length);170 * res.send(users.slice(range.start, ++range.end));171 * }172 * });173 *151 * @param {Number} size152 * @return {Array}153 * @api public154 */
303 unmodified lines