Merge tag '3.15.3' into 4.7.x

This commit is contained in:
Douglas Christopher Wilson 2014-08-04 17:35:42 -04:00
commit d8237b976b
4 changed files with 41 additions and 1 deletions

View File

@ -1,6 +1,10 @@
unreleased
==========
* fix `res.sendfile` regression for serving directory index files
* deps: send@0.7.4
- Fix incorrect 403 on Windows and Node.js 0.11
- Fix serving index files without root dir
* deps: serve-static@~1.4.4
- deps: send@0.7.4
@ -342,6 +346,17 @@ unreleased
- `app.route()` - Proxy to the app's `Router#route()` method to create a new route
- Router & Route - public API
3.15.3 / 2014-08-04
===================
* fix `res.sendfile` regression for serving directory index files
* deps: connect@2.24.3
- deps: serve-index@~1.1.5
- deps: serve-static@~1.4.4
* deps: send@0.7.4
- Fix incorrect 403 on Windows and Node.js 0.11
- Fix serving index files without root dir
3.15.2 / 2014-07-27
===================

View File

@ -38,7 +38,7 @@
"path-to-regexp": "0.1.3",
"proxy-addr": "1.0.1",
"range-parser": "1.0.0",
"send": "0.7.3",
"send": "0.7.4",
"serve-static": "~1.4.4",
"type-is": "~1.3.2",
"vary": "0.1.0",

1
test/fixtures/blog/index.html vendored Normal file
View File

@ -0,0 +1 @@
<b>index</b>

View File

@ -165,6 +165,30 @@ describe('res', function(){
});
})
it('should transfer a file', function (done) {
var app = express();
app.use(function (req, res) {
res.sendfile('test/fixtures/name.txt');
});
request(app)
.get('/')
.expect(200, 'tobi', done);
});
it('should transfer a directory index file', function (done) {
var app = express();
app.use(function (req, res) {
res.sendfile('test/fixtures/blog/');
});
request(app)
.get('/')
.expect(200, '<b>index</b>', done);
});
describe('with an absolute path', function(){
it('should transfer the file', function(done){
var app = express();