mirror of
https://github.com/zebrajr/express.git
synced 2025-12-06 12:19:51 +01:00
deps: send@0.14.1
This commit is contained in:
parent
c762b16f62
commit
fc40702cb7
18
History.md
18
History.md
|
|
@ -1,11 +1,15 @@
|
|||
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 some redirect handling in `res.sendFile`/`res.sendfile`
|
||||
* 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
|
||||
|
|
@ -38,6 +42,20 @@ 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.1
|
||||
- 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
|
||||
- Fix redirect error when `path` contains raw non-URL characters
|
||||
- Fix redirect when `path` starts with multiple forward slashes
|
||||
- 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
|
||||
|
|
|
|||
|
|
@ -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.1",
|
||||
"serve-static": "~1.10.2",
|
||||
"type-is": "~1.6.13",
|
||||
"utils-merge": "1.0.0",
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user