deps: send@0.14.1
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent c762b16 · Browse files · 3 files·+41 added−1 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+41 added−1 removed
- tests:+22 added−0 removed
- other:+19 added−1 removed
Provenance
- Commit
fc40702- Tree
74b2550- Author
Douglas Christopher Wilson <doug@somethingdoug.com>- Committer
Douglas Christopher Wilson <doug@somethingdoug.com>- Parent
c762b16
3 files changed+41 added−1 removed
modified:test/res.sendFile.js+22 added
284 unmodified lines285 .expect(200, 'got it', done);286 })287 })288 289+ describe('.sendFile(path, options)', function () {290+ it('should pass options to send module', function (done) {291+ request(createApp(path.resolve(fixtures, 'name.txt'), { start: 0, end: 1 }))292+ .get('/')293+ .expect(200, 'to', done)294+ })295+ })296+297 describe('.sendfile(path, fn)', function(){298 it('should invoke the callback when complete', function(done){299 var app = express();300 var cb = after(2, done);408 unmodified lines709 })710 })711 })712 713+ describe('.sendfile(path, options)', function () {714+ it('should pass options to send module', function (done) {715+ var app = express()716+717+ app.use(function (req, res) {718+ res.sendfile(path.resolve(fixtures, 'name.txt'), { start: 0, end: 1 })719+ })720+721+ request(app)722+ .get('/')723+ .expect(200, 'to', done)724+ })725+ })726+727 function createApp(path, options, fn) {728 var app = express();729 730 app.use(function (req, res) {5 unmodified linesmodified:History.md+18 added
1 unreleased2 ==========3 4+ * Add `acceptRanges` option to `res.sendFile`/`res.sendfile`5+ * Add `cacheControl` option to `res.sendFile`/`res.sendfile`6 * Add `options` argument to `req.range`7 - Includes the `combine` option8+ * Fix some redirect handling in `res.sendFile`/`res.sendfile`9 * Fix Windows absolute path check using forward slashes10 * Improve error with invalid arguments to `req.get()`11 * Improve performance for `res.json`/`res.jsonp` in most cases12+ * Improve `Range` header handling in `res.sendFile`/`res.sendfile`13 * deps: accepts@~1.3.314 - Fix including type extensions in parameters in `Accept` parsing15 - Fix parsing `Accept` parameters with quoted equals16 - Fix parsing `Accept` parameters with quoted semicolons24 unmodified lines41 * deps: range-parser@~1.2.042 - Add `combine` option to combine overlapping ranges43 - Fix incorrectly returning -1 when there is at least one valid range44 - perf: remove internal function45+ * deps: send@0.14.146+ - Add `acceptRanges` option47+ - Add `cacheControl` option48+ - Attempt to combine multiple ranges into single range49+ - Correctly inherit from `Stream` class50+ - Fix `Content-Range` header in 416 responses when using `start`/`end` options51+ - Fix `Content-Range` header missing from default 416 responses52+ - Fix redirect error when `path` contains raw non-URL characters53+ - Fix redirect when `path` starts with multiple forward slashes54+ - Ignore non-byte `Range` headers55+ - deps: http-errors@~1.5.056+ - deps: range-parser@~1.2.057+ - deps: statuses@~1.3.058+ - perf: remove argument reassignment59 * deps: type-is@~1.6.1360 - Fix type error when given invalid type to match against61 - deps: mime-types@~2.1.1162 * deps: vary@~1.1.03065 unmodified linesmodified:package.json+1 added-1 removed
45 unmodified lines4647484950505152535437 unmodified lines45 unmodified lines "path-to-regexp": "0.1.7", "proxy-addr": "~1.1.2", "qs": "6.2.0", "range-parser": "~1.2.0", "send": "0.13.1", "send": "0.14.1", "serve-static": "~1.10.2", "type-is": "~1.6.13", "utils-merge": "1.0.0", "vary": "~1.1.0"37 unmodified lines