Skip to content

Commit

Permalink
deps: send@0.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Jun 7, 2016
1 parent c762b16 commit a67ca6b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
15 changes: 15 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
unreleased
==========

* Add `acceptRanges` option to `res.sendFile`/`res.sendfile`
* Add `cacheControl` option to `res.sendFile`/`res.sendfile`
* Add `options` argument to `req.range`
- Includes the `combine` option
* Fix Windows absolute path check using forward slashes
* Improve error with invalid arguments to `req.get()`
* Improve performance for `res.json`/`res.jsonp` in most cases
* Improve `Range` header handling in `res.sendFile`/`res.sendfile`
* deps: accepts@~1.3.3
- Fix including type extensions in parameters in `Accept` parsing
- Fix parsing `Accept` parameters with quoted equals
Expand Down Expand Up @@ -38,6 +41,18 @@ unreleased
- Add `combine` option to combine overlapping ranges
- Fix incorrectly returning -1 when there is at least one valid range
- perf: remove internal function
* deps: send@0.14.0
- Add `acceptRanges` option
- Add `cacheControl` option
- Attempt to combine multiple ranges into single range
- Correctly inherit from `Stream` class
- Fix `Content-Range` header in 416 responses when using `start`/`end` options
- Fix `Content-Range` header missing from default 416 responses
- Ignore non-byte `Range` headers
- deps: http-errors@~1.5.0
- deps: range-parser@~1.2.0
- deps: statuses@~1.3.0
- perf: remove argument reassignment
* deps: type-is@~1.6.13
- Fix type error when given invalid type to match against
- deps: mime-types@~2.1.11
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"proxy-addr": "~1.1.2",
"qs": "6.2.0",
"range-parser": "~1.2.0",
"send": "0.13.1",
"send": "0.14.0",
"serve-static": "~1.10.2",
"type-is": "~1.6.13",
"utils-merge": "1.0.0",
Expand Down
22 changes: 22 additions & 0 deletions test/res.sendFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,14 @@ describe('res', function(){
})
})

describe('.sendFile(path, options)', function () {
it('should pass options to send module', function (done) {
request(createApp(path.resolve(fixtures, 'name.txt'), { start: 0, end: 1 }))
.get('/')
.expect(200, 'to', done)
})
})

describe('.sendfile(path, fn)', function(){
it('should invoke the callback when complete', function(done){
var app = express();
Expand Down Expand Up @@ -702,6 +710,20 @@ describe('res', function(){
})
})

describe('.sendfile(path, options)', function () {
it('should pass options to send module', function (done) {
var app = express()

app.use(function (req, res) {
res.sendfile(path.resolve(fixtures, 'name.txt'), { start: 0, end: 1 })
})

request(app)
.get('/')
.expect(200, 'to', done)
})
})

function createApp(path, options, fn) {
var app = express();

Expand Down

0 comments on commit a67ca6b

Please sign in to comment.